Drop TaskArguments models, in favor of validate_arguments

This issue is not yet well defined, but we will have to do something in this direction.

Let's discuss this.
Are we talking about moving argument defaults from the python function to the pydantic models? In that case, the Python functions would loose a lot of value in respect to being usable standalone and I wouldn't be a fan.
How do other libraries using pydantic handle that?

TL;DR
Further review of this issue showed us a slightly different, and promising, way forward (all details below, as part of a verbose log); we are not trying to move from a basic example to something that can actually work. If it does work, then:

We fully remove the redundancy issue concerning types and defaults
We would need to find a workaround to include extra information in the JSON Schemas (e.g. argument descriptions), but that looks like a reasonable trade-off.

Are we talking about moving argument defaults from the python function to the pydantic models? In that case, the Python functions would loose a lot of value in respect to being usable standalone and I wouldn't be a fan.

There's more than "just" the defaults (although I agree that removing the defaults from the function signature would be the most relevant change). The information that we can encode for each argument includes:

Its default value, as in fun(x=1, ...).
Its type hint, as in fun(x: int), fun(x: Optional[int]), .
A type hint + casting rule, as in TaskArguments(BaseModel): x: int.
Note some differences with the previous one:

This one is such that TaskArguments("1").x is the integer 1 (and not the string "1").
The previous one is standard Python type hint, that can be used for static code analysis (e.g. via mypy, or plugins for many IDEs).

Possibly all attributes of pydantic.Field, which includes some useful ones (e.g. description), some possibly-useful ones (e.g. title and examples) and many probably-irrelevant ones.

How do other libraries using pydantic handle that?

I'm not aware of someone using it the same way as we (plan to) do. This is partly because enforcing type hints at runtime is not a common practice in Python, and partly because we also want to use Pydantic for additional purposes (i.e. generating JSON Schemas).
For the moment:

We use a Pydantic model to preprocess the arguments of a task function (this is similar to "enforcing type hints at runtime"):

We take an existing set of arguments (typically from a JSON file like args.json) and use it to create a TaskArguments instance args_instance.
This performs basic validation: if a required argument is missing, it raises an error.
This performs variable type casting: if an argument x="123" is a string but an integer is needed, it is converted to 123 (with an error raised if the casting fails).
This assigns default values (if present) to unset attributes.
If the instance was created without errors, we switch back to a Python dictionary (by using the .dict()method ofargs_instance`), and use this dictionary as the set of arguments for the task function.

We plan to also use  the same TaskArguments Pydantic model to generate a schema compliant with the JSON Schema specification, through the schema() method of Pydantic v1 (renamed to model_json_schema in Pydantic v2).

This two-fold purpose leads to the redundancy issue: where is each information declared? In the function signature and/or in the Pydantic model?
If we stick with point 1, then in principle we could move to an even better solution, where we simply never declare a Pydantic model. This would be via the @validate_arguments decorator (note that is technically a beta feature, but it's been there for 5 minor releases already..):

The validate_arguments decorator allows the arguments passed to a function to be parsed and validated using the function's annotations before the function is called. While under the hood this uses the same approach of model creation and initialization; it provides an extremely easy way to apply validation to your code with minimal boilerplate.

This would immediately close this issue: all information would strictly belong to the function call signature, since there wouldn't even exist a Pydantic model. What is missing, however, is that we still need to generate the JSON Schema, and we'd still need a Pydantic model for that purpose.

In fact, I just realized that this model could still be extracted from the Pydantic validate_arguments function, although it uses a not-so-well-documented feature -- see example
from devtools import debug
from typing import Optional
from pydantic import validate_arguments

def fun(
        x: int,
        y: Optional[str],
        z: dict = {"a": "b"},
        ):
    pass

debug(validate_arguments(fun).model.schema())

which outputs something similar to what we need
{
  "title": "Fun",
  "type": "object",
  "properties": {
    "x": {
      "title": "X",
      "type": "integer"
    },
    "v__duplicate_kwargs": {
      "title": "V  Duplicate Kwargs",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "y": {
      "title": "Y",
      "type": "string"
    },
    "z": {
      "title": "Z",
      "default": {
        "a": "b"
      },
      "type": "object"
    },
    "args": {
      "title": "Args",
      "type": "array",
      "items": {}
    },
    "kwargs": {
      "title": "Kwargs",
      "type": "object"
    }
  },
  "required": [
    "x",
    "y"
  ],
  "additionalProperties": false
}

Note that apart from understanding and then removing some spurious properties (v__duplicate_kwargs, args, kwargs), this would be quite close to our target. It's true that we wouldn't be able to include (e.g.) descriptions (or any other of the pydantic.Field attributes), but we can likely find other places to define them. There would be an additional cost for including these extra details, but we would get the basic feature (both type-hint enforcing and schema generation) in a single place.
A comment about Pydantic version
The example above is with Pydantic v1, which is in bug-fixes-only state, so that it will keep working. Pydantic v2 will refactor this feature, but without removing it. Thus I'd say that it's something we can safely rely upon.

TL;DR
Further review of this issue showed us a slightly different, and promising, way forward (all details below, as part of a verbose log); we are not trying to move from a basic example to something that can actually work. If it does work, then:

We fully remove the redundancy issue concerning types and defaults
We would need to find a workaround to include extra information in the JSON Schemas (e.g. argument descriptions), but that looks like a reasonable trade-off.

As of 87a38b5, we have a first implementation of this new approach - which seems to work.
What is left (apart from further tests) is

[ ] To decide how/where we could define argument descriptions. Note that the question only concerns the place where we should define them, but injecting them into the JSON Schema should not be too complex (at least if we neglect nesting).
Question: can we simply get them from the docstring? Note that this could be error-prone, but an error in the definition of a description is a relatively minor issue (plus we can add tests also for this, e.g. checking that all arguments have a description). The obvious advantage would be to have everything in the same place (function call signature + docstring).
[ ] To write a test with a function like def function(channels: list[Channel] = []), to make sure

Re-opening, since this is not yet complete with #369 (see to-do list in previous comment)

(closing since what was left is not part of #386)


Java.Lang.NoSuchMethodError: no non-static method

Please check all of the platforms you are having the issue on (if platform is not listed, it is not supported)

[] iOS
[YES] Android - Target Version 8.0. Deployed on device with 5.1
[] tvOS
[] macOS
[] .NET Standard
UWP IS NOT SUPPORTED DURING THE BETA PERIOD - ONLY PRs ARE WELCOME FOR NOW

Version of OS(s) listed above with issue
Windows 10 64bit
Version of Library
Latest cloned from GitHub
Expected Behaviour
Trying the sample code. Expected the application to run properly
Actual Behavior
Application gets build and deployed, but throws exception in MainActivity.cs on line#34
this.RequestPermissions(new []
            {
                Manifest.Permission.AccessCoarseLocation,
                Manifest.Permission.BluetoothPrivileged
            }, 0);

Unhandled Exception:
Java.Lang.NoSuchMethodError: no non-static method "Landroid/app/Activity;.requestPermissions([Ljava/lang/String;I)V" occurred
Code of Conduct

No Library Update Requests
No Timeline Requests
Please read through the documentation and FAQs
Please be respectful of my time. I put a lot of effort into my libraries.  I try to support the issue requests within a day.  I'm not psychic, so please take the time to fill out the above form as complete as possible

I don’t test often with anything below android 6 anymore.  You can comment out as necessary

Thanks, Tested on Android 7.1 device. Worked well.


Represent JSP language states better

Want ability to specify that a String literal is part of a tag (giving it context), versus a String literal as part of Java code.
Maybe create MatchingStateOptionValue Implements MatchingStateOption

Will be handled by #105


METRON-1446: Fix openjdk issue with Ubuntu

Contributor Comments
https://issues.apache.org/jira/browse/METRON-1446
Spin up full dev for Ubuntu. It should run successfully all the way through, but specifically it should make it past "TASK [java_jdk : Install openjdk repository]"
Note, I had issues with Vagrant 1.8.1 that caused trouble with outdated Hashicorp URLs that will give you a 404. Vagrant 2.0.2 worked fine.
Pull Request Checklist
In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following:
For all changes:

[x] Is there a JIRA ticket associated with this PR? If not one needs to be created at Metron Jira.
[x] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
[x] Has your PR been rebased against the latest commit within the target branch (typically master)?

For code changes:

[x] Have you included steps to reproduce the behavior or problem that is being changed or addressed?

[x] Have you included steps or a guide to how the change may be verified and tested manually?

[x] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh

[x] Have you written or updated unit tests and or integration tests to verify your changes?

[x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

[x] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?

Was this tested against Vagrant 2.0.2 or 1.8.1 ?

2.0.2

+1 LGTM.  I have not been able to replicate this problem, which I am really confused about.  Although this seems harmless enough of a change.


DOM Fallback Implementation.

Hi,
I’m using relatively old and obscure hardware (AMD A8-3850 APU), and have noticed that webgl2 is not available in electron/chrome. In the future, will Xray support some sort of DOM fallback for text_plane.js? If not, how difficult would it be to utilize Atom’s current text-editor*.js implementation to create a fallback DOMRenderer class for TextPlane?

Hello @ZehCnaS34, thanks for this question. Our current plan is to implement a WebGL1 fallback when WebGL2 isn't available. WebGL1 support seems to be pretty widespread and we should first consider that before investing time in a DOM implementation which, based on our experience on Atom, would be much slower.
According to https://caniuse.com/#feat=webgl, support for WebGL1 on desktop machines is almost 99% (WebGL2, by comparison, is supported only on ~75% of the tracked desktop machines), so I think it's very likely it would be supported on your machine as well.


please make web ui for Oauth authorize code request & response value field

Hi Pokesi,
please make web ui for Oauth authorize code request because I'm make changes for made dockerized version on my fork & deploy it to railway , but after deployed request me to visit generated oauth link & input value & in railway deploy log console can't type anything (answer of oauth link) . please make changes on your youtube upload section code to send oath link & ask response field to web or any possible way to upload video to youtube without oauth authorize webbase needed.
waiting for your response
finest regards

Hey, the google OAuth code isn't handled by this code, it's handled by a google website that should pop up under a non-docker deployment.
TL;DR You can't run this in docker.


Can't get data from options page

I am not sure is this issue, but I can't get data from the options page in graphQL, can you assist maybe?
I create options page using ACF function acf_add_options_page, but can't find it in qraphQL.

I will reply

This is not an issue, but I will leave solution here if someone have issue with this.
First of all when you create a page you have to set settings show_in_graphql to true, so my function for creating Options page looks like:
if( function_exists('acf_add_options_page') ) {
acf_add_options_page(array('page_title' => 'Options Page', 'show_in_graphql' => true));
}
And then you can find it in GraphQL:
allWp {
nodes {
optionsPage {
options_page {
    }
  }
}

}


Bug in moments_match_ep for Heaviside link function

When using a Heaviside link function, the moments_match_ep method in likelihoods.Bernoulli has a variable a which is undefined, in this line

I believe this was a typo, and a should have been z


adding iframe video support (youtube for now) per request #67

Description of Change
the proposed changes of this PR includes the following:

adding frameSrc in csp.json to whitelist youtube domain for embeded video support

adding function convertYoutubeUrl to convert inline youtube video text into iframe

default to true for allowInlineCode in case env ALLOW_INLINE_CODE is not set

Related Issue
this is an attempt to add support as requested by issue #67
Checklist

[x] Ran npm run lint and updated code style accordingly
[x] npm run test passes
[x] PR has a description and all contributors/stakeholder are noted/cc'ed
[NA] tests are updated and/or added to cover new code
[NA] relevant documentation is changed and/or added

@isaacwhite Thanks for review. Regarding the setting of ALLOW_INLINE_CODE, I changed the default just for the convenience of development, without considering the potential security implication. I  will restore the original setting and update the PR description.


get rid of SConstruct, switch to CMake

This project should switch to CMake.
I'm using many C++ libraries, and most of them support CMake nowadays. SConstruct is rare and not used much for C++. Out of a couple hundred C++ projects and libraries that I depend on, none of them are using SConstruct. SConstruct causes integration issues with CMake, and CMake is in widespread use for C++ projects.
So unfortunately when we see a project like Thrust with a build system that does not fit in easily, we have to skip/avoid it in order to save time, because there are many other projects and issues to deal with.

Already in progress.


Support dynamic element size when getting tensor data in runtime

Currently, getTensorData in runtime assumes element size of tensor data is always 4 bytes(c++ float).
This should be updated to correctly calculate allocated memory of data returned.
Blocks tt-torch#95 where seg fault occurs trying to access 1MB of data out of 0.5MB allocated.

Making this change is not required since we can use memcpy instead to copy Tensors.


prefer_const_constructors missing in dartfix

I have recently discovered the tool dartfix and I successfully used it to apply some quick fixes to a moderate size project after including more strict lint rules from the package lint.
The issue is that some fixes that are implemented already in the SDK, are not available in dartfix.
One that I found which I think is pretty useful for Flutter projects is the fix for prefer_const_constructors. I've built the SDK from source and I included a LintFixInfo for that rule in the allFixes variable in https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/lib/src/edit/fix/dartfix_info.dart
With that simple change I was able to use dartfix to modify the whole project using dartfix --overwrite --fix prefer_const_constructors
Other fix that I found missing is the one for the rule prefer_const_declarations. I opted to file the issue because I don't know if simply adding fixes to that list can have other implications in other places.
Thanks for all the tooling available!
Dart SDK: 2.8.0-dev.20.0

No, adding fixes to the list of allFixes doesn't impact other tooling and is the correct way to add new fixes to dartfix. We'd be happy to take your contribution if you're interested in making one.

@bwilkerson Ok, thanks! I have just submitted the changes for review.


need add @startmindmap .etc support

Dear aklt :
The plantuml.vim need update for support MindMap. I saw the plantuml.jar has supported but vim plugin is not supposed.

Thanks for letting me know, I would like to have a look at implementing that.

Hi @zhuyeqing5828 , just FYI I added a start to this in this commit which highlights
mindmap like constructs, let me know if you have any comments :-)
https://github.com/aklt/plantuml-syntax/commit/9995b99e5de4431cc3a6fe09e7027cad77ed8ba7#diff-bd0db7d5b132f9ca94a952efa05c5ef1R129

Hi @aklt ,The highLight show had solved .But it still have issue like

Error detected while processing function slumlord#updatePreview[15]..44_mungeDiagramInTmpFile[2]..44_convertNonAsciiSupportedSyntax:
The test file source is
`
@startmindmap

Debian
** Ubuntu
*** Linux Mint
*** Kubuntu
*** Lubuntu
*** KDE Neon
** LMDE
** SolydXK
** SteamOS
** Raspbian with a very long name
*** Raspmbc => OSMC
*** Raspyfi => Volumio
@endmindmap
`
May be we should do more work to solve It.

Hi @zhuyeqing5828 you are right the syntax highlight of the mindmap
needs some work, I hope to be able to address it.
But the error you show looks to have to do with slumlord
have you tried asking them?

I just ran this without errors from slumlord, so I will close.


#2027 clarify reference_date in derive_vars_dy()

Thank you for your Pull Request! We have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.
Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the devel branch until you have checked off each task.

[x] Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
[x] Code is formatted according to the tidyverse style guide. Run styler::style_file() to style R and Rmd files
[x] Updated relevant unit tests or have written new unit tests, which should consider realistic data scenarios and edge cases, e.g. empty datasets, errors, boundary cases etc. - See Unit Test Guide
[x] If you removed/replaced any function and/or function parameters, did you fully follow the deprecation guidance?
[x] Update to all relevant roxygen headers and examples, including keywords and families. Refer to the categorization of functions to tag appropriate keyword/family.
[x] Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
[x] Address any updates needed for vignettes and/or templates
[x] Update NEWS.md if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers)
[x] Build admiral site pkgdown::build_site() and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.
[x] Address or fix all lintr warnings and errors - lintr::lint_package()
[x] Run R CMD check locally and address all errors and warnings - devtools::check()
[x] Link the issue in the Development Section on the right hand side.
[x] Address all merge conflicts and resolve appropriately
[x] Pat yourself on the back for a job well done! Much love to your accomplishment!

I have not changed the details section of the function, which reads:
#'   The relative day is derived as number of days from the reference
#'   date to the end date. If it is nonnegative, one is added. I.e., the
#'   relative day of the reference date is 1. Unless a name is explicitly
#'   specified, the name of the resulting relative day variable is generated
#'   from the source variable name by replacing DT (or DTM as appropriate) with
#'   DY.
It mentions end date, which may be confusing if we supply an end date to reference_date. Do you think the phrasing needs to be changed?

I have not changed the details section of the function, which reads:
#' The relative day is derived as number of days from the reference #' date to the end date. If it is nonnegative, one is added. I.e., the #' relative day of the reference date is 1. Unless a name is explicitly #' specified, the name of the resulting relative day variable is generated #' from the source variable name by replacing DT (or DTM as appropriate) with #' DY.
It mentions end date, which may be confusing if we supply an end date to reference_date. Do you think the phrasing needs to be changed?

Yes, please update such that it refers to source_vars.


Fix broken links

@Youssef1313 FYI

Oh, I didn't notice the warnings on my PR. Sorry for that

Thanks Maira!


Don't deploy old docs site on every merge to main

We can still manually deploy it if it ever changes

@fibonacci1729 @endocrimes learneded me about keeping the auto action but only triggering on relevant changes so I'm gonna do that instead


BooleanRavenDBProvider consider not creating a new document store each time for performance reasons

The caching decorator can be used for this so closing


Ssnpm cannot emulate U-mode pointer masking configuration like Smnpm can

While implementing pointer masking in Linux, I noticed that there is no way for S-mode to emulate accesses using the U-mode pointer masking configuration, like M-mode can with mstatus.MPRV. This means that for S-mode to dereference pointers passed from U-mode, it must either

manually apply the ignore transformation to each pointer in software, or
configure itself to have the same pointer masking configuration as U-mode.

Option 1 requires invasive software changes, plus the overhead of the transformation. Option 2 requires a call into firmware during each context switch if PMLEN differs between userspace processes, and prevents S-mode from using longer tags for its own purposes.
What is the feasibility of defining a sstatus.MPRV bit that behaves like mstatus.MPRV and affects pointer masking?
sstatus.SUM exists, but it does not seem appropriate for that bit to affect the pointer masking configuration.

Thanks for bringing this up, and also for talking through it in yesterday's J Extension meeting. The resolution was that these are indeed the two main options. The rationale why each of these is feasible is the following:
Applying the transformation in software
We assume the cost of applying the transformation in software is acceptable (a load and an AND when it is known or expected that a pointer comes from user mode). The mask can be pre-computed per process, which is (I think) what at least one implementation of untagged_addr is already doing:
https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/uaccess_64.h
The transformation could either happen once when entering the kernel or when the address is used.
Enable pointer masking at the kernel level
I agree that fine-grained switching is not plausible in this case. However, there is (as far as I know) currently no use case in the kernel that would take advantage of PMLEN=16, and HWASAN in user mode is expected to use PMLEN=7. It is therefore plausible for psABI to define that only the top 7 bits be used for tagging (and the 8th bit from the top set to 0), and for the kernel to always have pointer masking with PMLEN=7 switched on. It is plausible that runtime systems in user mode (managed or otherwise) will use PMLEN=16 if it is available, but those are also the workloads for which it is easy to untag addresses before passing them to the kernel.
Hardware support for user mode accesses
If the use case that the kernel needs PMLEN=16 becomes common, I think it would be plausible to add some hardware feature for this – but this would probably be a future extension and would need a strong rationale. However, code would still need to be changed to use the new extension (which is probably the same implementation effort as doing the transformation in software, so it would only make sense if the performance cost is an issue).
Does this address your concern? If not, please do push back – I think it's an important point.

Closing the loop on the issue: I will leave the issue open for now in case there is more discussion around these topics, but currently, there are no plans to change the ISA.

Pointer masking has now been ratified; closing this issue.


Refactor TupleSymbols

Description
I refactor and clean the Analyzer/TupleSymbol/*.php.
Changes

improving naming (for example: changing $x to $tuple or $nodeEnvironment to $env)
apply extract method refactoring for almost every else I saw
use named constructor (AnalyzerException::withLocation()) to help the creation of an AnalyzerException
extract chunks of logic in private methods to keep the level of abstraction easy-peasy to understand
no functionality was changed

Thanks a lot. Merged it!


Is this the correct path format? It claims the repo is empty

I have in my dropbox folder repos/test2 directory, which is a git repo with a committed file. But then I do this:
git clone "dropbox://repos/test2"
Cloning into 'test2'...
info: repository is empty
warning: You appear to have cloned an empty repository.

It claims it is empty, and git status in my new cloned dir says it is an initial commit.
Why is this?

git-remote-dropbox's on-disk format isn't exactly the same as Git's format (e.g. we don't do packfiles).
See https://github.com/anishathalye/git-remote-dropbox/issues/22#issuecomment-148544185 and https://github.com/anishathalye/git-remote-dropbox/issues/22#issuecomment-148560656.
So you need to create a repo locally, push it to Dropbox using git-remote-dropbox, and then you can clone it using git-remote-dropbox.

Thanks, I got it working.
This is really quite fascinating. All the stars and forks on this repo seem to suggest it is widely used. In your honest opinion, is this worthy of maintaining production code?

Yeah, it does seem like a bunch of people use it (I wish I had exact statistics, though).
I do believe it is stable enough. I personally use it for a bunch of my own projects.
Also, the way git-remote-dropbox is designed, it's really easy to reconstruct a git repo given just the folder from Dropbox (see here). So this should give you additional peace of mind.

One thing that would be kinda cool is if I could use the tools in SourceTree (a popular Git GUI), but iti appears it can't easily link up with the helper (see attached). Not a big deal, I can change my habits a bit.

re: my last comment, i just found this so I shall try: https://github.com/anishathalye/git-remote-dropbox/issues/44

Yeah, that should work for you.
Sent from my iPhone

On Dec 16, 2016, at 7:43 PM, andrew stoeckley<EMAIL_ADDRESS>wrote:
re: my last comment, i just found this so I shall try: #44
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.


Intra-day Activity and Heart Rate is not working properly

Using the example, the df is returned as just having one data point (for activity) or having NULL data for heart rate.

I'll check 👀


num_diffn_timesteps

Thank you for the great work! In the ./example/predict_structure directory, I noticed that the diffusion step is set to 200 by default. I wonder if we could slightly decrease this value to reduce inference time while still maintaining decent results.
Allen

Hi Allen,
We've seen pretty good results with less diffusion steps, though the other diffusion params (i.e. https://github.com/chaidiscovery/chai-lab/blob/306f53c7f45a6dd082aabd0d82a36d64fcf51f82/chai_lab/chai1.py#L500) might need to be changed. If you want to reduce to e.g. 80 steps then the current params are fine. If you want to go below that then I'd recommend trying different values of s_min, s_churn, and s_noise (ordered by importance). I found that
S_churn \in (40.0, 80.0)
S_tmax=120.0
S_tmin=0.005
S_noise=1.005
works pretty well even in the 40-80 step range. To go below 40 steps you will need to use the scaling trick (\eta term in AF3 Algorithm 18 "Sample Diffusion"). This actually helps a lot with very few timesteps.
Also, if you're running on larger molecules just remember that the time spent in the trunk is usually much longer than the time spent in the diffusion module (O(L^3) vs O(SL^2) where S is the number of diffusion steps).

Thank you for the insightful reply! @MattMcPartlon


Receipt Email

Has anyone got an example of sending a receipt_email value through via the CreateChargeWithToken or even an example of another way to create a charge. Would be most helpful.

Apologizes for the delayed response.
Currently you cannot send a receipt_email parameter through the StripeClient. We will be adding a pull request to update all of the methods related to the Stripe Charges API Endpoints.

@aj2110
please review and download the latest version of the repository and report any issues related to this issue request

Good Evening, I've updated my application through Nuget to the latest version and can not find any issues at present. However please could you tell me how to send through the capture and receiptEmail parameters as i currently only get 4 options using CreateCharge() however when i download and build the project from Github i get alot more?
Many thanks, Fantastic Library by the way. I recommended it to Stripe for them to use advertise it on their page for .Net integrations.
Thanks for your time.
Adam
Date: Tue, 7 Jul 2015 11:30:25 -0700
From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>CC<EMAIL_ADDRESS>Subject: Re: [stripe-dotnet] Receipt Email (#23)
@aj2110
please review and download the latest version of the repository and report any issues related to this issue request
—
Reply to this email directly or view it on GitHub.

@aj2110
the NuGet Package download is out of sync with the current state of the repository, just as you have observed building the project locally.
I would recommend you "manually" install the package into your solution from the local repository build you've obtained.
@nberardi @paulirwin  when would the next update to the NuGet package be scheduled?

Good Morning,
Many thanks for your response. That is exactly what I tried after I emailed you and its working superbly!!
Just thought you might want to know about the Nuget Package in case other developers are using this method and just using the Nuget Updater Tool?
Once again many thanks. If I encounter any issues I'll send the the error stack trace and as much info as I can to help you, if that's okay?
Adam
Date: Wed, 15 Jul 2015 18:14:16 -0700
From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>CC<EMAIL_ADDRESS>Subject: Re: [stripe-dotnet] Receipt Email (#23)
@aj2110
the NuGet Package download is out of sync with the current state of the repository, just as you have observed building the project locally.
I would recommend you "manually" install the package into your solution from the local repository build you've obtained.
@nberardi @paulirwin  when would the next update to the NuGet package be scheduled?
—
Reply to this email directly or view it on GitHub.

@aj2110 that would be perfect. thank you again.


Point out that MFT_PROCESS_OUTPUT_REGENERATE_LAST_OUTPUT flag is only…

… used by video processing MFTs.

@jbrianceau : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Not recognizing worker in celery-exporter logs.

Hello, I am building out a monitoring stack for a django project. I am using celery, redis, and flower. Everything is running in docker containers.
The worker is recognized through flower, but when I check the logs for the celery exporter, I get this message
2023-08-03 15:54:22 2023-08-03 22:54:22.160 | INFO     | src.exporter:track_timed_out_workers:188 - Have not seen cc2ae99afb58 for 25201.57 seconds. Removing from metrics
The tasks are being sent and recorded correctly in flower, but when I do the celery_tasks_received_total metric, none of them are registering.
I have events enables and have the worker sending out a heartbeat every 10 seconds. celery-exporter connects to the broker. I am not sure what is going on or how to even approach this anymore. Hoping someone could guide me in the right direction.

@adinhodovic

The cleanup of metrics happens when workers are timed out, it helps to lower label cardinality but this can be disabled. You do not see any metrics in your prometheus tsdb?

The timeout happens for me on startup and going forward. I have access to some metrics but not all of them. This is what i see from the metrics endpoint. But even the metrics that are being sent is not including the complete list of tasks which should be firing.
# HELP celery_task_sent_total Sent when a task message is published.
# TYPE celery_task_sent_total counter
celery_task_sent_total{hostname="76a4d3cbc22a",name="scheduler.tasks.send_unresponded_notifications",queue_name="celery"} 390.0
# HELP celery_task_sent_created Sent when a task message is published.
# TYPE celery_task_sent_created gauge
celery_task_sent_created{hostname="76a4d3cbc22a",name="scheduler.tasks.send_unresponded_notifications",queue_name="celery"} 1.691126270735308e+09
# HELP celery_task_received_total Sent when the worker receives a task.
# TYPE celery_task_received_total counter
# HELP celery_task_started_total Sent just before the worker executes the task.
# TYPE celery_task_started_total counter
# HELP celery_task_succeeded_total Sent if the task executed successfully.
# TYPE celery_task_succeeded_total counter
# HELP celery_task_failed_total Sent if the execution of the task failed.
# TYPE celery_task_failed_total counter
# HELP celery_task_rejected_total The task was rejected by the worker, possibly to be re-queued or moved to a dead letter queue.
# TYPE celery_task_rejected_total counter
# HELP celery_task_revoked_total Sent if the task has been revoked.
# TYPE celery_task_revoked_total counter
# HELP celery_task_retried_total Sent if the task failed, but will be retried in the future.
# TYPE celery_task_retried_total counter
# HELP celery_worker_up Indicates if a worker has recently sent a heartbeat.
# TYPE celery_worker_up gauge
celery_worker_up{hostname="6a2aba40f48b"} 1.0
# HELP celery_worker_tasks_active The number of tasks the worker is currently processing
# TYPE celery_worker_tasks_active gauge
celery_worker_tasks_active{hostname="6a2aba40f48b"} 0.0
# HELP celery_task_runtime Histogram of task runtime measurements.
# TYPE celery_task_runtime histogram
# HELP celery_queue_length The number of message in broker queue.
# TYPE celery_queue_length gauge
celery_queue_length{queue_name="celery"} 0.0
# HELP celery_active_consumer_count The number of active consumer in broker queue.
# TYPE celery_active_consumer_count gauge
celery_active_consumer_count{queue_name="celery"} 1.0
# HELP celery_active_worker_count The number of active workers in broker queue.
# TYPE celery_active_worker_count gauge
celery_active_worker_count{queue_name="celery"} 1.0
# HELP celery_active_process_count The number of active processes in broker queue.
# TYPE celery_active_process_count gauge
celery_active_process_count{queue_name="celery"} 4.0

Are your workers picking up the tasks and executing them? The metrics above just indicate that the client has sent tasks to the queue (note celery_task_sent_total), but actually none of the metrics that indicate that work is being done is there e.g celery_task_received_total (worker has received the task).

Yeah I have metrics enabled for the worker and the tasks are being executed. The tasks are being picked up correctly through flower as well.

Try running it with debug logging.

@adinhodovic
These are the logs. It registers the heartbeat but still times out the worker. I have the workers sending a heartbeat every 10 seconds.
2023-08-08 16:48:25 2023-08-08 23:48:25.805 | DEBUG    | src.exporter:track_worker_heartbeat:316 - Received event='worker-heartbeat' for worker='7e7bf8bb1670' 2023-08-08 16:48:25 2023-08-08 23:48:25.806 | DEBUG    | src.exporter:track_worker_heartbeat:324 - Updated gauge='celery_worker_tasks_active' value='0' 2023-08-08 16:48:25 2023-08-08 23:48:25.806 | DEBUG    | src.exporter:track_worker_heartbeat:327 - Updated gauge='celery_worker_up' value='1' 2023-08-08 16:48:26 2023-08-08 23:48:26.368 | INFO     | src.exporter:track_timed_out_workers:188 - Have not seen 7e7bf8bb1670 for 25200.56 seconds. Removing from metrics 2023-08-08 16:48:26 2023-08-08 23:48:26.368 | DEBUG    | src.exporter:forget_worker:147 - Updated gauge='celery_worker_tasks_active' value='0' 2023-08-08 16:48:26 2023-08-08 23:48:26.368 | DEBUG    | src.exporter:forget_worker:150 - Updated gauge='celery_worker_up' value='0'
The individual tasks also end up getting registered in the statistics, but the metrics aren't showing up correctly.
2023-08-08 16:48:47 2023-08-08 23:48:47.249 | DEBUG    | src.exporter:track_task_event:257 - Received event='task-started' for task='scheduler.tasks.send_unresponded_notifications' 2023-08-08 16:48:47 2023-08-08 23:48:47.277 | DEBUG    | src.exporter:track_task_event:257 - Received event='task-sent' for task='scheduler.tasks.send_notification'
I did notice that the everytime it does time out the worker, the time is always 25000+ seconds. I'm curious if that might be the issue.

@adinhodovic
These are the logs. It registers the heartbeat but still times out the worker. I have the workers sending a heartbeat every 10 seconds.
` 2023-08-08 16:48:25 2023-08-08 23:48:25.805 | DEBUG | src.exporter:track_worker_heartbeat:316 - Received event='worker-heartbeat' for worker='7e7bf8bb1670'
2023-08-08 16:48:25 2023-08-08 23:48:25.806 | DEBUG | src.exporter:track_worker_heartbeat:324 - Updated gauge='celery_worker_tasks_active' value='0'
2023-08-08 16:48:25 2023-08-08 23:48:25.806 | DEBUG | src.exporter:track_worker_heartbeat:327 - Updated gauge='celery_worker_up' value='1'
2023-08-08 16:48:26 2023-08-08 23:48:26.368 | INFO | src.exporter:track_timed_out_workers:188 - Have not seen 7e7bf8bb1670 for 25200.56 seconds. Removing from metrics
2023-08-08 16:48:26 2023-08-08 23:48:26.368 | DEBUG | src.exporter:forget_worker:147 - Updated gauge='celery_worker_tasks_active' value='0'
2023-08-08 16:48:26 2023-08-08 23:48:26.368 | DEBUG | src.exporter:forget_worker:150 - Updated gauge='celery_worker_up' value='0' `
The individual tasks also end up getting registered in the statistics, but the metrics aren't showing up correctly.
` 2023-08-08 16:48:47 2023-08-08 23:48:47.249 | DEBUG | src.exporter:track_task_event:257 - Received event='task-started' for task='scheduler.tasks.send_unresponded_notifications'
2023-08-08 16:48:47 2023-08-08 23:48:47.277 | DEBUG | src.exporter:track_task_event:257 - Received event='task-sent' for task='scheduler.tasks.send_notification' `
I did notice that the everytime it does time out the worker, the time is always 25000+ seconds. I'm curious if that might be the issue.

It seems to be working fine, events are received and metrics seem to be generated. Why your worker times out, I'm not sure of - but nothing to do with the exporter. I'd still expect metrics in your Prometheus TSDB being scraped.

I run everything in my environment inside containers, so for me, it had something to do with timezone.
In my case all workers had 14400 seconds "not responding", not by coincidence that's my timezone shift to GMT.
src.exporter.track_timed_out_workers:
    def track_timed_out_workers(self):
        now = time.time()
        # Make a copy of the last seen dict so we can delete from the dict with no issues
        for hostname, worker_status in list(self.worker_last_seen.items()):
            since = now - worker_status["ts"]
            if since > self.worker_timeout_seconds and not worker_status["forgotten"]:
                logger.info(
                    f"Have not seen {hostname} for {since:0.2f} seconds. "
                    "Removing from metrics"
                )
                self.forget_worker(hostname)

            if self.purge_offline_worker_metrics_after_seconds > 0:
                if since > self.purge_offline_worker_metrics_after_seconds:
                    logger.info(
                        f"Have not seen {hostname} for {since:0.2f} seconds. "
                        "Purging worker metrics"
                    )
                    self.purge_worker_metrics(hostname)

so if the exporter timezone (time.time()) is something different than reported by celery (worker_status["ts"]), you may have a problem.
I've fixed setting the exporter timezone environment to mine (TZ=America/Detroit)

Something similar happened to me.
The metrics did not show any tasks but did show some information about the workers:
$ curl localhost:9808/metrics
# HELP celery_task_sent_total Sent when a task message is published.
# TYPE celery_task_sent_total counter
# HELP celery_task_received_total Sent when the worker receives a task.
# TYPE celery_task_received_total counter
# HELP celery_task_started_total Sent just before the worker executes the task.
# TYPE celery_task_started_total counter
# HELP celery_task_succeeded_total Sent if the task executed successfully.
# TYPE celery_task_succeeded_total counter
# HELP celery_task_failed_total Sent if the execution of the task failed.
# TYPE celery_task_failed_total counter
# HELP celery_task_rejected_total The task was rejected by the worker, possibly to be re-queued or moved to a dead letter queue.
# TYPE celery_task_rejected_total counter
# HELP celery_task_revoked_total Sent if the task has been revoked.
# TYPE celery_task_revoked_total counter
# HELP celery_task_retried_total Sent if the task failed, but will be retried in the future.
# TYPE celery_task_retried_total counter
# HELP celery_worker_up Indicates if a worker has recently sent a heartbeat.
# TYPE celery_worker_up gauge
celery_worker_up{hostname="worker-host"} 1.0
# HELP celery_worker_tasks_active The number of tasks the worker is currently processing
# TYPE celery_worker_tasks_active gauge
celery_worker_tasks_active{hostname="worker-host"} 0.0
# HELP celery_task_runtime Histogram of task runtime measurements.
# TYPE celery_task_runtime histogram
# HELP celery_queue_length The number of message in broker queue.
# TYPE celery_queue_length gauge
celery_queue_length{queue_name="celery"} 0.0
celery_queue_length{queue_name="trigger"} 0.0
# HELP celery_active_consumer_count The number of active consumer in broker queue.
# TYPE celery_active_consumer_count gauge
# HELP celery_active_worker_count The number of active workers in broker queue.
# TYPE celery_active_worker_count gauge
celery_active_worker_count{queue_name="celery"} 0.0
celery_active_worker_count{queue_name="trigger"} 1.0
# HELP celery_active_process_count The number of active processes in broker queue.
# TYPE celery_active_process_count gauge
celery_active_process_count{queue_name="celery"} 0.0
celery_active_process_count{queue_name="trigger"} 12.0

And in the logs I saw:
2024-02-08 13:19:39.093 | INFO     | src.http_server:start_http_server:66 - Started celery-exporter at host='<IP_ADDRESS>' on port='9808'
2024-02-08 13:19:43.771 | INFO     | src.exporter:track_timed_out_workers:189 - Have not seen worker-host for 10801.08 seconds. Removing from metrics
2024-02-08 13:19:43.771 | INFO     | src.exporter:track_timed_out_workers:197 - Have not seen worker-host for 10801.08 seconds. Purging worker metrics

where 10800 is 3 hours difference (I'm in UTC−03:00). So it seems that clearing the metrics is just created by this difference in the timestamps due to the difference in timezones.
Adding a TZ environment variable with the correct timezone fixed the problem.


OLS-809: Migrate to Watsonx AI

Description
Migrate to Watsonx AI
Type of change

[x] Refactor
[ ] New feature
[ ] Bug fix
[ ] CVE fix
[ ] Optimization
[ ] Documentation Update
[x] Configuration Update
[ ] Bump-up dependent library
[ ] Bump-up library or tool used for development (does not change the final image)

Related Tickets & Documents

Related Issue #OLS-809

/hold

/unhold

/retest

/override "Red Hat Konflux / lightspeed-service-on-pull-request"

/retest

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

Project coverage is 95.64%. Comparing base (587fa12) to head (8d339c2).
Report is 9 commits behind head on main.

Additional details and impacted files

@@            Coverage Diff             @@
##             main    #1218      +/-   ##
==========================================
- Coverage   95.66%   95.64%   -0.03%
==========================================
  Files          56       56
  Lines        2586     2410     -176
==========================================
- Hits         2474     2305     -169
+ Misses        112      105       -7

Files
Coverage Δ

ols/src/llms/providers/provider.py
100.00% <100.00%> (ø)

ols/src/llms/providers/watsonx.py
96.96% <100.00%> (ø)

... and 6 files with indirect coverage changes

/retest

/lgtm

/approve


Incorrect backend URL

I tried creating this proxy by plugging in the values in the screenshot and I got an error, "Infinite loop detected when trying to call a local function or proxy from a proxy."
Shouldn't it be ? https://%HELLO_HOST%/api/httptriggercsharp1

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

ID: cef2688f-faa5-5209-ea5f-23228851c6ec
Version Independent ID: 2d621670-0e4e-e4c7-bb27-a4700fa8fd36
Content: Create a serverless API using Azure Functions
Content Source: articles/azure-functions/functions-create-serverless-api.md
Service: functions
GitHub Login: @mattchenderson
Microsoft Alias: mahender

@vincpa Thanks for the feedback! We are currently investigating and will update you shortly.

@MicrosoftDocs/azure-cxp-triage Can you please reassign to @alexkarcher-msft?

Under "Create your first proxy", in step #3, it should be stressed that does not include the "https://" portion.

Can anyone explain why Proxy help micro-services?

Could you please update the Backend-URL:
https://%HELLO_HOST%/api/hello leads to the infinite loop as correctly pointed out by Bryan.
It has to point to the real method e.g. https://%HELLO_HOST%/api/HttpTrigger1.
Please update as well in the proxies.json example for the Mock-API GetUserByName
PS: I've used https with code= which works fine

It looks like this tutorial is set up to have two separate Function Apps, one for the functions and one for the proxies. In that configuration there is no problem with the proxies causing a loop.
I can change around the text and image to make the scenario work for people using one site to learn everything, but this tutorial is designed to demonstrate proxies connecting to an external API, and without the two site topology there is not much value to using proxies in this scenario.


GPC_4T - execute 4 threaded program

compile & simulate a  program that simultaneously execute  4 different calculations

so cool

Good job - This is great!
It would be even cooler to make them work together to calculate together to accelerate calculation time.
Like a distributed Computation of a prime factor of a number. (each thread will search for prime factors within a Range(

Could the Sieve of Eratosthenes can be an interesting example for that? In its basic approach I feel it can be executed concurrently, but the naive approach may lead to some redundant work
https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes


[stable/postgres] fix host standby can not work

Fix issue
Signed-off-by: Xiang Dai<EMAIL_ADDRESS>

Thanks so much for the PR @daixiang0 ! I just gave it a try and it seems it doesn't solve the issue. "Write actions" seem to hang forever...
This is what I tried:
$ cat values.yaml
image:
  repository: bitnami/postgresql
  tag: 9.6.15

replication:
  enabled: true
  slaveReplicas: 2
  synchronousCommit: "on"
  numSynchronousReplicas: 1

postgresqlPassword: my-custom-password

persistence:
  enabled: true
  size: 10Gi
$ helm install stable/postgresql/ -f values.yaml --name my-release
$ kubectl exec my-release-postgresql-slave-0 -- grep "synchronous" /opt/bitnami/postgresql/conf/postgresql.conf
# - Asynchronous Behavior -
synchronous_commit = 'on'
synchronous_standby_names = '1 ("my_application")'
$ export POSTGRES_PASSWORD=$(kubectl get secret --namespace default my-release-postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)
$ kubectl run my-release-postgresql-client --rm --tty -i --restart='Never' --namespace default --image docker.io/bitnami/postgresql:9.6.15 --env="PGPASSWORD=$POSTGRES_PASSWORD" --command -- psql --host my-release-postgresql -U postgres -p 5432
If you don't see a command prompt, try pressing enter.

postgres=# CREATE DATABASE "grafana";

^CCancel request sent
WARNING:  canceling wait for synchronous replication due to user request
DETAIL:  The transaction has already committed locally, but might not have been replicated to the standby.
CREATE DATABASE
postgres=# \q

@juan131 i would look into it tomorrow, now is late for me, but i think we are close to the root cause, i wish you can work with me if possible.

It is not helm issue indeed, close.


LANGUAGE SUPPORT for Jupyter Notebooks '.ipynb'

Love this but is there a way to make it work in a Jupyter notebook with multiline comments? If so please explain, if not, can it be added as a feature please? I would really appreciate it because otherwise I love this extension!

I will definitely have a look into it, as I myself use notebooks quite a lot, thanks for the input 🙂

A jupyter notebook is basically a json
Therefore you can see that a multiline comment here is a \"\"\" string instead of """
That might be the reason why but I am not sure
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "test()\n",
    "\n",
    "# sup bois\n",
    "# sup bois\n",
    "# ~ a\n",
    "\n",
    "\n",
    "\"\"\"\n",
    "~ a\n",
    "\"\"\""
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "latest",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "name": "python",
   "version": "3.12.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}

I will investigate if there is a simple fix, I have to take into account the fact that jupyter notebook is not only for python but also can deal with other languages such as R, shellscript, .........
SO might be not as straightforward

Seems to be working fine on my own testing, closing the issue


3D Secure will adding to history

3D Secure will adding to history, and it result i need back twice to return previous page
i know result just because iframe update src, so how can i know when need back twice in handleActions: true

pls not closed; my problems still not be resolved.

Thanks for flagging that you're still seeing this issue, @preflower.
We'll re-open and investigate a mitigation for the behavior you're seeing.

Thanks for flagging that you're still seeing this issue, @preflower.
We'll re-open and investigate a mitigation for the behavior you're seeing.

thx, i hope have a good resolution if possible; because my project is SPA project,it's return depends on the browser history

Same issue here. Any updates?


TODO: add shell completions hints to arguments

This adds a it of complexity to the code, so currently put on old.


Show sign now button on mobile by default

fixes #500
It's display: none on desktop in the css, so we don't have to worry about that.

hm. good point.
looks like waypoint loads at first, but we see the button animating off the screen if the sign form is above the fold.
so I'll think about another approach.

Now everything seems to be working whether or not the sign form is above or below the fold @schuyler1d

so the team reviewed this issue and decided that we should do a more careful UI round before making changes.  so @hi0ctane is point on changes here.
@jparkrr sorry for wasting your time.  I think this might still be useful, but we need to wait for some more thought on how to improve signatures by putting some CTA 'above the fold'.

No worries. I'll close this PR and leave the branch around just in case. We can also see it referenced from #500


Fix read file for 'helm lint -f some-file'

Fix #7985, the description for 'helm lint -f some-file'  seems wrong, and this PR is going to fix this. @bacongobbler
Signed-off-by: lou-lan<EMAIL_ADDRESS>

I do not believe it is correct behavior to trap a parse error and then attempt to open the result as a file handle. Please explain why proper behavior would be to try to open the file when the file name was unparsable.
Also, there is no test.

If helm lint -f specifies a local file, such as values.yaml, calling url.Parse parsing will get an error, u is a nil pointer. calling p.ByScheme(u.Scheme) will panic.
https://github.com/helm/helm/blob/2139e82c68e160a713cf19eb3ac55e91aef21cde/pkg/cli/values/options.go#L107-L121

First, check whether filePath equals -, then check if it's a network file, in other cases, we should regard it as a local path.

Can you provide a test case? Perhaps that would better explain the justification for this change. I'm still not understanding why a URL parse error should result in an attempt to open the file.

I added the test case, and I'm not sure if that solves it better, or want a better way to get schmea.

I am not suggesting that the error should panic. I am suggesting that on error, you should not just blindly ignore the error and attempt to read the file. That is a dangerous behavior. The best behavior is probably to just return the error. A second object would be to Stat the file and see if it exists, and then create an appropriate URL object.
Consider this code:
package main

import (
	"fmt"
	"net/url"
)

func main() {

	urls := []string{
		"/var/run/foo",
		"file:///var/run",
		"http://example.com/foo/bar",

	}
	for _, u := range urls {
		p, err := url.Parse(u)
		if err != nil {
			fmt.Printf("failed parse: %s\n", err)
		} else {
			fmt.Printf("Scheme of %q is %s\n", u, p.Scheme)
		}
	}
}

Note that even the regular file path correctly parses.
We use the URL parser for two things:

To sanity check the data that is passed in
To allow plugins to override protocol handlers

Your patch circumvents the regular scheme handling code, attempting a raw read on the file system after the URL parser has indicated that there was an error parsing the path. That's not what we intended to do.
Returning an error is fine here. Perhaps, though, there are cases where a character is illegal in a URL, but legal on the local filesystem. If you really want to run a secondary validation, you can os.Stat instead of reading... but please don't just do a raw file read and return. That's not how the code is supposed to work.
The test looks fine, but note that it passes even without your patch. What is the case that you believe your patch is fixing?

I am not suggesting that the error should panic. I am suggesting that on error, you should not just blindly ignore the error and attempt to read the file. That is a dangerous behavior. The best behavior is probably to just return the error. A second object would be to Stat the file and see if it exists, and then create an appropriate URL object.
Consider this code:
package main

import (
	"fmt"
	"net/url"
)

func main() {

	urls := []string{
		"/var/run/foo",
		"file:///var/run",
		"http://example.com/foo/bar",

	}
	for _, u := range urls {
		p, err := url.Parse(u)
		if err != nil {
			fmt.Printf("failed parse: %s\n", err)
		} else {
			fmt.Printf("Scheme of %q is %s\n", u, p.Scheme)
		}
	}
}

Note that even the regular file path correctly parses.
We use the URL parser for two things:

To sanity check the data that is passed in
To allow plugins to override protocol handlers

Your patch circumvents the regular scheme handling code, attempting a raw read on the file system after the URL parser has indicated that there was an error parsing the path. That's not what we intended to do.
Returning an error is fine here. Perhaps, though, there are cases where a character is illegal in a URL, but legal on the local filesystem. If you really want to run a secondary validation, you can os.Stat instead of reading... but please don't just do a raw file read and return. That's not how the code is supposed to work.
The test looks fine, but note that it passes even without your patch. What is the case that you believe your patch is fixing?

Thank you for your patience in viewing the code, it was my carelessness. I have updated the code, please check again.


feat(react): context-based versions of Consumer, Form, Field

#60

Pull Request Test Coverage Report for Build 211

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 209:
0.0%

Covered Lines:
485

Relevant Lines:
485

💛  - Coveralls


FieldSpec

@Emilgardis What do you think about this?

@Emilgardis So what your judgment?

bors r=@Emilgardis

bors retry

bors r=@Emilgardis

bors retry


Gone from the Nexus - why?

Sadly no more automatic updates via Vortex? What's behind the decision and will it be possible to still load the CET ZIPs via Vortex for updates?

You can always load a mod via Vortex no matter the source. Simply open Vortex's mod tab and drag and drop a file (archive) into the "Drop File(s)" section. If the folder structure in CET's archive stays the same with future updates you don't have to do anything else to make it work. The only thing that won't work anymore is the "Check for updates" feature.

it was removed because the nexus moderation staff asked him to remove the telemetry and he said "no"


Module missing on Windows Server 2022, Windows 10 and Windows 11?

Hi,
I am trying to install and utilize the VPN client can you provide the steps to install this module.
It seems that Install-Module does not work. I also tried downloading the latest version of PowerShell and no luck.
I am sure there is something I am missing here.
Even better if these were just integrated within Windows 10, 11 and Server 2022. So user does not need to install
Thanks,
Ward

@ward-horsfall Hello,
Could you provide a link to the module documentation that you are trying to use?


KSES: don’t strip page attachment URLs

Summary
Got an error report saying that the link was dropped when using page attachments.
This PR fixes that.
Relevant Technical Choices

To-do

User-facing changes

Testing Instructions

Log in as author
Add page attachment to story
View story on frontend
Page attachment link should work correctly

Fixes #5728

Seems to be no other attributes that are valid.


fix accidental extra column in update user

The missing backslash escape character produces an extra column in the feeRate parameter that prevents the description to be displayed.


Broken links in your documentation

Hello,
Today I found some broken links in your documentation. I think everything was fine yesterday.

https://rasa.com/docs/rasa/rasa-x/  -> 404

I attached links to the issue:
https://prnt.sc/obsfen
https://prnt.sc/obsfw2

starter-pack-rasa-nlu -> 404
https://github.com/RasaHQ/starter-pack-rasa-nlu

Hey @boqnognqnov! Thanks for pointing these out. Number 3 is indeed newly broken, as we've deprecated that repo, so we should remove that from the documentation. Number 1 looks like a bad link, the correct should be https://rasa.com/docs/rasa-x. As for number 2, that seems to be an issue connecting to the server on which we host the interactive tutorials.
Could you please let me know what pages you found links #1 and #3 on?

I attached a file related to #1.
About #3, obviously it is not a real issue because I tried to open one of
my stored bookmarks in my browser.
Thank you!
On Sun, 7 Jul 2019 at 22:33, Ella Rohm-Ensing<EMAIL_ADDRESS>wrote:

Hey @boqnognqnov https://github.com/boqnognqnov! Thanks for pointing
these out. Number 3 is indeed newly broken, as we've deprecated that repo,
so we should remove that from the documentation. Number 1 looks like a bad
link, the correct should be https://rasa.com/docs/rasa-x. As for number
2, that seems to be an issue connecting to the server on which we host the
interactive tutorials.
Could you please let me know what pages you found links #1
https://github.com/RasaHQ/rasa/issues/1 and #3
https://github.com/RasaHQ/rasa/pull/3 on?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/RasaHQ/rasa/issues/3952?email_source=notifications&email_token=ACVBRYKALJKXP5X5W53SBOLP6JAIHA5CNFSM4H6WMD4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZLRU3A#issuecomment-509024876,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACVBRYNZOJ4W7UEOOHI5OHTP6JAIHANCNFSM4H6WMD4A
.

Hi, I don't think attachments to emails make it into the github threads unfortunately -- just a link to the docs page in the reply, or even the name of the page in the docs would be fine :) thanks!

Oh, yes. I'm sorry
This is the screenshot url: https://prnt.sc/obzki1
This is on page: https://rasa.com/docs/rasa/user-guide/rasa-tutorial/
The button "Try Rasa X" bellow on the page
On Mon, 8 Jul 2019 at 08:42, Ella Rohm-Ensing<EMAIL_ADDRESS>wrote:

Hi, I don't think attachments to emails make it into the github threads
unfortunately -- just a link to the docs page in the reply, or even the
name of the page in the docs would be fine :) thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/RasaHQ/rasa/issues/3952?email_source=notifications&email_token=ACVBRYK7MMPHYJ4WAMFD66DP6LHTRA5CNFSM4H6WMD4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZMAVZA#issuecomment-509086436,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACVBRYIBP4JC27HS6C337STP6LHTRANCNFSM4H6WMD4A
.

Awesome, thanks! Would you be interested in contributing a PR to fix that broken link? Here’s the file you’d have to change (the button path at the bottom): https://github.com/RasaHQ/rasa/blob/master/docs/user-guide/rasa-tutorial.rst


Valgrind outputs errors for POSIX port

Describe the bug
When running a Posix port and using vTaskEndScheduler() valgrind raises memory leaks.
System information

Run on PC x86_64, Ubuntu 18.04.4 LTS
Used FreeRTOS-kernel, commit hash: 464695a4f
Project: local unit tests

Expected behavior
No errors are found by valgrind.
To reproduce
Steps to reproduce the behavior:

Configure FreeRTOS with FreeRTOSConfig.h:

#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H

#define configUSE_PREEMPTION                       1
#define configUSE_PORT_OPTIMISED_TASK_SELECTION    0
#define configMAX_PRIORITIES                       ( 7 )
#define configTICK_RATE_HZ                         ( 1000 )
#define configMINIMAL_STACK_SIZE                   ( ( unsigned short ) 60 )
#define configTOTAL_HEAP_SIZE                      ( ( size_t ) ( 2048U * 1024U ) )
#define configMAX_TASK_NAME_LEN                    ( 15 )
#define configUSE_TRACE_FACILITY                   0
#define configUSE_16_BIT_TICKS                     0
#define configIDLE_SHOULD_YIELD                    1
#define configUSE_CO_ROUTINES                      0
#define configUSE_MUTEXES                          0
#define configUSE_RECURSIVE_MUTEXES                0
#define configQUEUE_REGISTRY_SIZE                  0
#define configUSE_APPLICATION_TASK_TAG             1
#define configUSE_COUNTING_SEMAPHORES              0
#define configUSE_ALTERNATIVE_API                  0
#define configNUM_THREAD_LOCAL_STORAGE_POINTERS    3      /* FreeRTOS+FAT requires 2 pointers if a CWD is supported. */
#define configRECORD_STACK_HIGH_ADDRESS            0

/* Hook function related definitions. */
#define configUSE_TICK_HOOK                        0
#define configUSE_IDLE_HOOK                        0
#define configUSE_MALLOC_FAILED_HOOK               0
#define configCHECK_FOR_STACK_OVERFLOW             0

/* Software timer related definitions. */
#define configUSE_TIMERS                           1
#define configTIMER_TASK_PRIORITY                  ( configMAX_PRIORITIES - 1 )
#define configTIMER_QUEUE_LENGTH                   5
#define configTIMER_TASK_STACK_DEPTH               ( configMINIMAL_STACK_SIZE * 2 )

/* Event group related definitions. */
#define configUSE_EVENT_GROUPS                     0

/* Run time stats gathering definitions. */
#define configGENERATE_RUN_TIME_STATS    0

/* Co-routine definitions. */
#define configUSE_CO_ROUTINES                   0
#define configMAX_CO_ROUTINE_PRIORITIES         ( 2 )

#define configSUPPORT_DYNAMIC_ALLOCATION        1
#define configSUPPORT_STATIC_ALLOCATION         1

/* Set the following definitions to 1 to include the API function, or zero
 * to exclude the API function. */
#define INCLUDE_vTaskPrioritySet                1
#define INCLUDE_uxTaskPriorityGet               1
#define INCLUDE_vTaskDelete                     1
#define INCLUDE_vTaskCleanUpResources           0
#define INCLUDE_vTaskSuspend                    1
#define INCLUDE_vTaskDelayUntil                 1
#define INCLUDE_vTaskDelay                      1
#define INCLUDE_uxTaskGetStackHighWaterMark     1
#define INCLUDE_xTaskGetSchedulerState          1
#define INCLUDE_xTimerGetTimerTaskHandle        0
#define INCLUDE_xTaskGetIdleTaskHandle          0
#define INCLUDE_xQueueGetMutexHolder            1
#define INCLUDE_eTaskGetState                   1
#define INCLUDE_xEventGroupSetBitsFromISR       1
#define INCLUDE_xTimerPendFunctionCall          1
#define INCLUDE_xTaskGetCurrentTaskHandle       1
#define INCLUDE_xTaskAbortDelay                 1

#define configUSE_STATS_FORMATTING_FUNCTIONS    0

#define configINCLUDE_DEMO_DEBUG_STATS       0

#define configCOMMAND_INT_MAX_OUTPUT_SIZE    0

/* The platform that FreeRTOS is running on. */
#define configPLATFORM_NAME    "Linux"

#endif /* FREERTOS_CONFIG_H */

Run the code:

int main(int argc, char* argv[])
{
    xTaskCreate(
        [](void*) {
            vTaskEndScheduler();
            vTaskDelete(nullptr);
        },
        "TestRunner",
        2048,
        nullptr,
        1,
        nullptr);

    vTaskStartScheduler();

    return 0;
}

Compile and execute the program:

valgrind --leak-check=full ./a.out

See the output:

kacper ~/Workspace/JunglesOsHelpers/build (master) $ valgrind --leak-check=full ./TestBuild
==7996== Memcheck, a memory error detector
==7996== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==7996== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==7996== Command: ./TestBuild
==7996==
TEST FreeRTOS: Starting scheduler
TEST FreeRTOS: Running tests.
TEST FreeRTOS: Stopping scheduler
==7996== Thread 2:
==7996== Syscall param setitimer(&value->it_interval) points to uninitialised byte(s)
==7996==    at 0x5A6FE57: setitimer (syscall-template.S:78)
==7996==    by 0x1E7C40: vPortEndScheduler (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1E40B1: vTaskEndScheduler (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1453E2: main::{lambda(void*)#1}::operator()(void*) const (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x145448: main::{lambda(void*)#1}::_FUN(void*) (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1E801E: prvWaitForStart (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x4E436DA: start_thread (pthread_create.c:463)
==7996==    by 0x5ABB88E: clone (clone.S:95)
==7996==  Address 0x698ad70 is on thread 2's stack
==7996==  in frame #1, created by vPortEndScheduler (???:)
==7996==
==7996== Syscall param rt_sigaction(act->sa_mask) points to uninitialised byte(s)
==7996==    at 0x4E4E95D: __libc_sigaction (sigaction.c:62)
==7996==    by 0x1E7C6B: vPortEndScheduler (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1E40B1: vTaskEndScheduler (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1453E2: main::{lambda(void*)#1}::operator()(void*) const (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x145448: main::{lambda(void*)#1}::_FUN(void*) (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1E801E: prvWaitForStart (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x4E436DA: start_thread (pthread_create.c:463)
==7996==    by 0x5ABB88E: clone (clone.S:95)
==7996==  Address 0x698ac38 is on thread 2's stack
==7996==  in frame #0, created by __libc_sigaction (sigaction.c:47)
==7996==
TEST FreeRTOS: Scheduler stopped, finished, leaving.
==7996==
==7996== HEAP SUMMARY:
==7996==     in use at exit: 17,408 bytes in 5 blocks
==7996==   total heap usage: 30 allocs, 25 frees, 92,372 bytes allocated
==7996==
==7996== Thread 1:
==7996== 288 bytes in 1 blocks are possibly lost in loss record 2 of 5
==7996==    at 0x4C31988: calloc (vg_replace_malloc.c:711)
==7996==    by 0x40134A6: allocate_dtv (dl-tls.c:286)
==7996==    by 0x40134A6: _dl_allocate_tls (dl-tls.c:530)
==7996==    by 0x4E44227: allocate_stack (allocatestack.c:627)
==7996==    by 0x4E44227: pthread_create@@GLIBC_2.2.5 (pthread_create.c:644)
==7996==    by 0x1E7AE8: pxPortInitialiseStack (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1E3657: prvInitialiseNewTask (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1E3489: xTaskCreate (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1454C4: main (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==
==7996== 288 bytes in 1 blocks are possibly lost in loss record 3 of 5
==7996==    at 0x4C31988: calloc (vg_replace_malloc.c:711)
==7996==    by 0x40134A6: allocate_dtv (dl-tls.c:286)
==7996==    by 0x40134A6: _dl_allocate_tls (dl-tls.c:530)
==7996==    by 0x4E44227: allocate_stack (allocatestack.c:627)
==7996==    by 0x4E44227: pthread_create@@GLIBC_2.2.5 (pthread_create.c:644)
==7996==    by 0x1E7AE8: pxPortInitialiseStack (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1E3657: prvInitialiseNewTask (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1E33A2: xTaskCreateStatic (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1E4016: vTaskStartScheduler (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1454F1: main (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==
==7996== 288 bytes in 1 blocks are possibly lost in loss record 4 of 5
==7996==    at 0x4C31988: calloc (vg_replace_malloc.c:711)
==7996==    by 0x40134A6: allocate_dtv (dl-tls.c:286)
==7996==    by 0x40134A6: _dl_allocate_tls (dl-tls.c:530)
==7996==    by 0x4E44227: allocate_stack (allocatestack.c:627)
==7996==    by 0x4E44227: pthread_create@@GLIBC_2.2.5 (pthread_create.c:644)
==7996==    by 0x1E7AE8: pxPortInitialiseStack (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1E3657: prvInitialiseNewTask (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1E33A2: xTaskCreateStatic (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1E6B63: xTimerCreateTimerTask (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1E404B: vTaskStartScheduler (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==    by 0x1454F1: main (in /home/kacper/Workspace/JunglesOsHelpers/build/TestBuild)
==7996==
==7996== LEAK SUMMARY:
==7996==    definitely lost: 0 bytes in 0 blocks
==7996==    indirectly lost: 0 bytes in 0 blocks
==7996==      possibly lost: 864 bytes in 3 blocks
==7996==    still reachable: 16,544 bytes in 2 blocks
==7996==         suppressed: 0 bytes in 0 blocks
==7996== Reachable blocks (those to which a pointer was found) are not shown.
==7996== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==7996==
==7996== For counts of detected and suppressed errors, rerun with: -v
==7996== Use --track-origins=yes to see where uninitialised values come from
==7996== ERROR SUMMARY: 6 errors from 5 contexts (suppressed: 0 from 0)
kacper ~/Workspace/JunglesOsHelpers/build (master) $

Additional context
Originates in: https://github.com/aws/amazon-freertos/issues/1864#issue-589565527
Thank you!

@alfred2g can you please comment? Thank you!

Hi @KKoovalsky
I will be looking into the issue, I will get back to you if I have any questions
Thanks,

I fixed the first 2 errors of uninitialized memory, I will push the commit soon.
I will continue looking into the possibly lost memory leak issues, for some reason, pthread_join is not being called to free the memory

I ran locally with valgrind, no trace of any memory leaks,
==21880== LEAK SUMMARY:
==21880==    definitely lost: 0 bytes in 0 blocks
==21880==    indirectly lost: 0 bytes in 0 blocks
==21880==      possibly lost: 0 bytes in 0 blocks
==21880==    still reachable: 20,784 bytes in 7 blocks
==21880==         suppressed: 0 bytes in 0 blocks
==21880==
==21880== For counts of detected and suppressed errors, rerun with: -v
==21880== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Built target run-test
Could you please share the test you are performing, if you can provide a runnable program source with a makefile/cmake it would be great
Thanks,
Alfred

Hi,
Pushed a pull request to address the uninitialized variables
https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/56
Alfred

Hello,
sorry for such a late reply. You could clone, build and run the project in this repository:
https://github.com/KKoovalsky/JunglesOsHelpers
The code I pasted in this issue comes from that project.

Hi @KKoovalsky,
Thanks for the link, i was able to reproduce the exact same valgrind error you were seeing.
I think this is a case of a false positive, as the memory is coming from pthread_create in 3 places.

The timer thread (https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/master/timers.c#L548)
The task thread (https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/master/tasks.c#L3392)
The user thread

which are not supposed to end (first 2 with infinite loops), and suspend scheduler is not exiting as well (we could change that to exit if necessary)  main is exiting before the threads
Thanks,
Alfred

@alfred2g do you know whether there is a way to somehow suppress those errors or get rid of them? The thing is that I could ignore them, but it's really hard to figure out which errors come from my application and which come from the FreeRTOS kernel.

You might replace the infinite loop with a global variable that it could check to exit the loop, then try to pthread join it
you could also make it return from vTaskEndScheduler, and kill the thread, then try to join it
Second way, is to disallow dynamic memory allocation in the kernel, like using xTaskCreateStatic for example (and change the config file to turn configSUPPORT_DYNAMIC_ALLOCATION off)
Lastly, you could have a script to parse the results ,and ignore these 3 false positives
Hope this helps

Code to fix the uninitialized references [Pull Request] (https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/56)
I will close the issue, Please reopen if anything changes.


[99][sig-policy] PolicySet rollout

Followup to:

#99

ref: https://issues.redhat.com/browse/ACM-6523

/cc @gparvin

/hold


Unable to type a URL with multiple "directories" and "navigate"

Version
4.1.1
Test Case
Running on Chrome and web-pack-dev.
Can load to github if this would be helpful
Steps to reproduce
Used snippet from https://reacttraining.com/react-router/web/example/basic.
Home page loaded
Clicked "Topics" Link
Clicked "Rendering with React" Link
Content Changes and url in address bar shows http://localhost:3000/topics/rendering
Cutting and Repasting that link into the address bar
Expected Behavior
Shows the "Rendering with React" component
Actual Behavior
fails (sends a server request).
I suspect it is a issue with a secondary directory since it works when I try http://localhost:3000/topics

You need to configure your server to support this: https://github.com/ReactTraining/react-router/blob/v3/docs/guides/Histories.md#configuring-your-server

Thanks Tim!
I was thinking that React caught the url navigation before it was sent to
the server.
I am using web-pack-dev-server so I'll need to check how it can always
return index.html on these routes.
On Tue, May 16, 2017 at 11:21 AM, Tim Dorr<EMAIL_ADDRESS>wrote:

You need to configure your server to support this: https://github.com/
ReactTraining/react-router/blob/v3/docs/guides/Histories.
md#configuring-your-server
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ReactTraining/react-router/issues/5125#issuecomment-301835855,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AbNyaVJmfnA8iohkX1aqke8JKqyFGuYcks5r6c0kgaJpZM4NcrTS
.


use proper english (fix for test branch)

since I couldn't
https://github.com/pivpn/pivpn/commit/5b404ccd9c7a2cacfe27a4eb6056af17c8a88e36

Please be more clear what are you trying to achieve with this merge request.

Please be more clear what are you trying to achieve with this merge request.

do you want more specifics in the commit message or is what I have done above ok?

do you want more specifics in the commit message or is what I have done above ok?

was a bit confusing, what i meant was in the  PR description actually, but i seem to have understood what this is about.
LGTM

was a bit confusing, what i meant was in the  PR description actually, but i seem to have understood what this is about.
LGTM


[ISSUE 4029] TagMapper and TagRelationMapper part

Make sure that:

[ ] You have read the contribution guidelines.
[ ] You submit test cases (unit or integration tests) that back your changes.
[ ] Your local test passed ./mvnw clean install -Dmaven.javadoc.skip=true.

Codecov Report

Merging #4086 (e46709e) into master (5f0e635) will decrease coverage by 0.38%.
The diff coverage is 8.82%.

@@             Coverage Diff              @@
##             master    #4086      +/-   ##
============================================
- Coverage     70.02%   69.63%   -0.39%
+ Complexity     6811     6773      -38
============================================
  Files           939      939
  Lines         25604    25638      +34
  Branches       2298     2299       +1
============================================
- Hits          17928    17854      -74
- Misses         6273     6377     +104
- Partials       1403     1407       +4

Impacted Files
Coverage Δ

...tance/consul/ConsulInstanceRegisterRepository.java
28.33% <8.82%> (-25.52%)
:arrow_down:

...ache/shenyu/plugin/grpc/cache/GrpcClientCache.java
68.75% <0.00%> (-31.25%)
:arrow_down:

.../client/server/consul/ShenyuConsulConfigWatch.java
60.41% <0.00%> (-25.00%)
:arrow_down:

...controller/ShenyuClientHttpRegistryController.java
77.77% <0.00%> (-22.23%)
:arrow_down:

...ruptor/RegisterClientServerDisruptorPublisher.java
52.94% <0.00%> (-11.77%)
:arrow_down:

...henyu/plugin/grpc/resolver/ShenyuNameResolver.java
52.12% <0.00%> (-11.71%)
:arrow_down:

...a/org/apache/shenyu/common/utils/VersionUtils.java
67.85% <0.00%> (-10.72%)
:arrow_down:

...va/org/apache/shenyu/plugin/cache/CachePlugin.java
81.57% <0.00%> (-7.90%)
:arrow_down:

.../apache/shenyu/admin/model/dto/BatchCommonDTO.java
50.00% <0.00%> (-7.15%)
:arrow_down:

...apache/shenyu/admin/model/dto/AuthPathWarpDTO.java
57.14% <0.00%> (-7.15%)
:arrow_down:

... and 32 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Fix prev.location.params bug

Closes #354. Unless you can imagine this causing any regressions?

v4.0.1
On Sun, Dec 11, 2016 at 9:45 PM Tim Wisniewski<EMAIL_ADDRESS>wrote:

Merged #355 https://github.com/yoshuawuyts/choo/pull/355.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/yoshuawuyts/choo/pull/355#event-889674819, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACWlerRbolJNRmoBPBLgcrINgChBAlT0ks5rHGD7gaJpZM4LKBwi
.


docs/alloy-models: add new folder for Alloy models along w/ model for Linear Fee Function bug fix

Alloy Models
This PR adds a new Alloy Model, which is a method of "lightweight formal models"
written using the Alloy model checker and language.
Compared to typical formal methods, Alloy is a bounded model checker,
considered a lightweight method to formal analysis.
Lightweight formal methods are easier to use than fully
fledged formal methods as rather than attempting to prove the that a model is
always correct (for all instances), they instead operate on an input of a set
of bounded parameters and iterations. These models can then be used to specify
a model, then use the model checker to find counter examples of a given
assertion. If a counter example can't be found, then the model may be valid.
Alloy in particular is an expressive, human readable language for formal
modeling. It also has a nice visualizer which can show counter examples, aiding
in development and understanding.
Alloy is useful as when used during upfront software design (or even after the
fact), one can create a formal model of a software system to gain better
confidence re the correctness of a system. The model can then be translated
to code. Many times, writing the model (either before or after the code) can
help one to better understand a given software system. Models can also be used
to specify protocols in p2p systems such as Lightning (as it supports temporal
logic, which enables creation of state machines and other interactive transcripts),
serving as a complement to a written specification.
Linear Fee Function
In this PR, we add the first Alloy model, for the  Linear Fee
Function fee bumping mechanism in lnd.
This model was inspired by a bug fix, due to an off-by-one error in the
original code: https://github.com/lightningnetwork/lnd/issues/8741.
The bug in the original code was fixed in this PR:
https://github.com/lightningnetwork/lnd/pull/8751.
Model & Bug Fix Walk-through
The model includes an assertion that captures the essence of the bug:
max_fee_rate_before_deadline:
// max_fee_rate_before_deadline is the main assertion in this model. This
// captures a model violation for our fee function, but only if the line in
// fee_rate_at_position is uncommented.
//
// In this assertion, we declare that if we have a fee function that has a conf
// target of 4 (we want a few fee bumps), and we bump to the final block, then
// at that point our current fee rate is the ending fee rate. In the original
// code, assertion isn't upheld, due to an off by one error.
assert max_fee_rate_before_deadline {
  always req_num_blocks_to_conf[4] => bump_to_final_block => eventually (
    all f: LinearFeeFunction | f.position = f.width.sub[1] &&
                               f.currentFeeRate = f.endingFeeRate
  )
}

We can modify the model to find the bug described in the original issue.

First, we modify the model by forcing a check on the
max_fee_rate_before_deadline assertion:

```alloy
check max_fee_rate_before_deadline
```

Next, we'll modify the fee_rate_at_position predicate to re-introduce
the off by one error:

```alloy
p >= f.width => f.endingFeeRate // -- NOTE: Uncomment this to re-introduce the original bug.
```

If we hit Execute in the Alloy Analyzer, then we get a counter example:

We can hit Show in the analyzer to visualize it:

We can see that even though we're one block (position) before the deadline
(width), our fee rate isn't at the ending fee rate yet.
If we modify the fee_rate_at_position to have the correct logic:
p >= f.width.sub[1] => f.endingFeeRate

Then Alloy is unable to find any counterexamples:

How does this improve over fuzzing?
At least for the fee function bug it seems a fuzz test would be simpler and more readable.

How does this improve over fuzzing?

I don't think one can necessarily compare them like that. This is a simplified formal specification of the fee bumping algorithm, it exists independent of the code implementing the algorithm, but can be used to gain more confidence in the algorithm by leveraging the Alloy model checker. Fuzzing can help us find bugs in our code, formal modeling can help us find defects in our design.

At least for the fee function bug it seems a fuzz test would be simpler and more readable.

Consider if this was written before/during the original implementation, the model checker would've found a counter example before the code was even written. Fuzzing operates on an entirely different level of abstraction, you can't fuzz a design of a system. Formal methods are yet another tool in our tool box which includes: fuzzing, property based tests, mutation testing, etc, etc.
I recommend checking out these blog posts to help answer the "why" behind my motivations:

Using Formal Methods at Work

With this PR, we're at the "Showcasing a bug" step.

Why Don't People Use Formal Methods
Formally Modeling Database Migrations

A more hands on post that shows how one can use Alloy to specify and analyze a database migration before the code is even written.

Zooming out: we have some components in the LN spec that after all this time, are still somewhat poorly understood, lack comprehensive test vectors, and/or have insufficient specifications. Tools like Alloy can allow us to elevate the spec further, capturing the desired semantics in a formal model, with the ability to rule out certain invariants, and also serve as another guide for implementers.
One such example is the channel state machine, which is pretty much the cornerstone of LN interactions. We can use tools such as Alloy to better specify a model of the channel state machine, which can increase our understanding as a hole, and potentially find new gaps in the channel state machine beyond what's commonly known by implementors. Alloy supports temporal logic, so we can model both expected execution, and also error cases. Consider the following fragment that could be used to verify invariants around sending empty sigs in the protocol:
assert empty_sig_leads_to_error {
    always no pending_changes
    eventually (some commit_dance)
    eventually (some empty_sig_errors)
}

From here I plan to write a trivial model for the way ping/ping works in the protocol to get a better feel of how to best model message passing. From there, I plan to write a model for the stfu protocol, as a more advanced warm up, before eventually tackling the LN state machine. I think a model of splicing would also be very useful, development uncovered a number of edge cases which right now are demonstrated in the form of somewhat elaborate acsii diagrams. We can capture all this with a formal model, to better advance our understanding, and potentially even find more subtle bugs/iteractions.

As far as readability goes, IMO Alloy is the most readable of any of the formal specification languages I've come across. Compare the syntax in this PR to TLA+:
---- MODULE hourclock ----
EXTENDS Naturals
\* TODO: two clocks
(*--algorithm hourclock
variable hr = 1; \* hour

begin
  A:
    while TRUE do
        if hr = 12 then
          hr := 1;
        else
            hr := hr + 1;
        end if;
    end while;
end algorithm; *)
====

It may look unfamiliar to you, but that's because you don't yet have exposure to it, just as any new langauge.

Posted revision 3: https://reviewable.io/reviews/lightningnetwork/lnd/8943

I think in addition to being used to analyze the specs, it should also be helpful for all the subsystems used in lnd?

Yep! Depending at which point in the design/implementation/testing/review cycle we insert things in, it can help to refine thinking of a new system, or even help model concurrent interactions with other systems. The blog I linked above even has an example where they use it to model a DB migration, and find some issues with the design in general.
Part of the learning curve is figuring out which level of abstraction is sufficient for the model. Eg: if we were trying to model the channel state machine, we could add things like: payment hashes, commit txn construction, signs, etc. Or, we can have the model operate at a higher level, and use a more abstract notion of a inbox/queue for new changes and acked/unacked set, etc.
One other example that pops to mind would be some of the repeated bug fixes and refactoring we've done w.r.t the router's payment/HTLC dispatch. So how to handle timeouts, updating the main state, etc, etc. Nice part is that it can also idrectly help to generate diagrams of everything via the visualizer. The visualzer also has a lot of settings to make what it generates more useful w/ colors, diff shapes, focusing on certain aspect, etc. etc

still reading through the tutorials🤓

If you haven't already, it'll also be useful to download the Analyzer and run the model in it. Throughput the process I either had Vim open and then used the Analyzer to run stuff (using the reload), or just ran things directly in the Analyzer. It also has a REPL like interface that can be used to debug stuff or just see how it would evaluate certain expressions/statements.

Also right now CI doesn't do much, but in the future we can have it run the Java binary for Alloy on the models checked in to make sure they don't have obvious counter examples and have valid syntax, etc.

@proofofkeags: review reminder
@roasbeef, remember to re-request review from reviewers when ready


Issue after updating to latest version

Getting the following spammed in my console:
Exception in template helper: Error: Match error: Unknown key in field route

I'm using active-route on about 8 routes. Removed the package and references and this fixed the problem.

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/21933902-issue-after-updating-to-latest-version?utm_campaign=plugin&utm_content=tracker%2F522373&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F522373&utm_medium=issues&utm_source=github).

Which version? Iron:router or flow-router? Template helper or javascript helper? Which syntax? {{isActiveRoute 'home'}} or {{IsActiveRoute regex='home'}} or some other syntax?

So I'm 99% sure you're using {{isActiveRoute route="home"}} instead of {{isActiveRoute name="home"}}.
Maybe I should make route an alias for name for the isActiveRoute/isNotActiveRoute helpers.

I choose name for the isActiveRoute helpers because I thought it would make it clearer that isActiveRoute matches the route's name instead of path

Yes I'm using "route".. It should work if I switch to "name"? That's good to know. Thanks z1mme keep up the good work. Indeed "name" is better.

Yes, and some version ago I actually made it possible to use this syntax too, {{isActiveRoute 'home'}}


Rotation by 90 degrees must switch layout

https://github.com/ARK-Builders/ARK-Retouch/assets/581023/a30940cc-3928-4db9-8df9-fff84700e95e

Implemented in #82


remove widget references after widget has been destroyed

assign the widget to NULL after the widget has been destroyed.

this is how we used to do with backbone, I guess marko widgets is missing to remove the this reference it self.
destroy: function(){
			//COMPLETELY UNBIND THE VIEW
		    this.undelegateEvents();
		    this.$el.removeData().unbind();

		    //Remove view from DOM
		    this.remove();
		    Backbone.View.prototype.remove.call(this);
        }

There is not enough information to act on this issue. In the<EMAIL_ADDRESS>we dropped the this.widgets collection so no cleanup is required. In the<EMAIL_ADDRESS>we do remove widgets out of the this.widgets collection using the following code:
https://github.com/raptorjs/marko-widgets/blob/5658cae45a85ccc5bbae4849c09a847bd687f392/lib/Widget.js#L59-L64
Can you please provide more details?

Doing some house cleaning. If this is still an issue please let me know, but I'm going to go ahead and close it.


add new cli arg --render-index

Turn on --render-index to render index.html when requested a directory automaically.

Merged


[Feature Request] Add api/stream endpoint useful for visualization

I was looking at old projects specifically Winamp visualizers from a decade past.
Example: Winamp Visualizations
The old school visualizers work on audio data. And I was thinking what if we used sentence encoding for inputs and outputs from Ollama for the data being used in the visualizers.
To do something like this, it would be useful to have an API endpoint like api/stream that receives data as the inputs and outputs occur.  The sentence encodings would be useful if they are vectorized and it's up to the visualizer to render them.
It would just be something interesting to look at. And of course the endpoint could be connected to RGB hardware which means your room lights would flicker when you prompt and when you get a response. It's a visual que "hey look over here" .

To do something like this, it would be useful to have an API endpoint like api/stream that receives data as the inputs and outputs occur.

Ollama's default is to stream output. See https://github.com/ollama/ollama/blob/main/docs/api.md#generate-a-completion
We're excited to see the results of your project!
I'm going to close this now. If you have any issues with the streaming API, please let us know in a new issue. We're here to help!


Should change unfair lock to unfair recursive lock in Sink?

when AnyCancellable calls cancel function automatically in DEINIT, Sink's cancel function will be called, then terminateAndConsumeLock will be called. As the result, the receiveValue block and receiveCompletion block will be set to nil. Then objects in receiveValue block or receiveCompletion block may be destroyed. If there is an object that in block, it will call same sink's receive completion to finish in object's DEINIT function. That will make a crash cause call lock's lock function twice without unlock.

Do you have a code snippet that triggers the crash?

https://github.com/ArthurChi/OpenCombineDemo

@ArthurChi thank you for taking the time to report this bug! I've fixed it and will prepare a new release shortly.

I notice the MR's checks of this bug is failed, I submitted a MR to this branch to fix it

@broadwaylamb Could you please release a new version this week?


feat(sso): Allow reading SSO clientID from a secret.

This change adds support for reading the SSO client ID value from a secret, just like the client secret is read already. That will make it easier to provide that the client ID value externally, via facilities like external secrets, which in turn makes rotating secrets much easier.
Checklist:

[ ] Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
[x] The title of the PR is (a) conventional, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
[x] I've signed the CLA.
[x] I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
[ ] My builds are green. Try syncing with master if they are not.
[x] My organization is added to USERS.md.

@vladlosev I'm online today and I'd love to get this merged today

See #3216

@alexec you want to merge that one first and have this one rebased?

Also, updated the PR description with the explanation of the manual testing performed.

Thanks for helping with this!