Adding base class for PagedResponse

Reopened from https://github.com/Azure/autorest-clientruntime-for-java/pull/590

Adds ability for the given RestProxy interface below, to deserialize this into a PagedResponse<T> without any user implemented classes.
Users can implement their own Page<T> for @ReturnValueWireType, if the returned response does not match the generally known pagination patterns (ie. "value" with "nextPageLink"/"nextLink".)

interface FooService {
    @POST("anything/json")
    @ExpectedResponses({200})
    @ReturnValueWireType(KeyValuePage.class)
    PagedResponse<KeyValue> getPage(@BodyParam(ContentType.APPLICATION_JSON) Page<KeyValue> values);

    @POST("anything/json")
    @ExpectedResponses({200})
    @ReturnValueWireType(Page.class)
    Mono<PagedResponse<KeyValue>> getPageAsync(@BodyParam(ContentType.APPLICATION_JSON) Page<KeyValue> values);
}

In MockHttpClient, adds an "echo.org" so it returns the request body in the response. (Httpbin.org and the other ones added headers and other values that made it hard to test.)

@anuchandy One of the tests is failing because the JacksonSerializer won't throw an exception if I have an unknown property in the JSON that doesn't match the object.

Is there a way to workaround this?
Is it a common scenario to have JSON returned from our services that don't match our objects?

Here's that code that configures it not to fail:
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
Fixes #3135

Correct me if I'm wrong, but couldn't these classes be placed inside the implementation package so that they are not considered part of the public API? If I understand correctly, they will still be transformed before being returned to end users, so they should never be part of the service client public API?

Can one of the admins verify this patch?

@conniey it is expected to ignore wire properties those are not in the model. Services are allowed to introduce optional and readonly properties to models of existing api-version, we don't want published SDKs to break when it happens. So mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) is by design.

@JonathanGiles Good catch. I had placed it there because that's where ResponseBase is. Do you want me to move that class in another PR?

@anuchandy Thanks for the clarification. :) I've updated that failing test based on this design.

If this should never be in public API, then yes, it should be moved into implementation. If it could ever be in public API - let's discuss. If you move it now or in a follow-up PR, I don't mind either way.


fix: Expose webapp acess

the example was not functional to the point of pulling and running, it needed some simple modifications to make it even easier for more people to use.
NOTE: There was no problem with the code, just to make it easier to use, exposing access to the Webapp and jsreport services.

Thank you for contributing.
Hm, the example demonstrates how to run in visual studio.
It doesn't work for you with simple open and F5 there?

I'm on linux, there is no visual studio.

Yes, I will split the readme into two parts, one for VS instructions and one for VS Code instructions. So no-one gets confused. Thanks.


track coins

Describe please.

this feature should come in later. Its to track a specific coin price change.


cilium/cmd: mark tests as unprivileged

Commit 4eb58b80a640 ("cmd: mark tests as privileged") marked these as
privileged, but the BPF functionality no longer seems to be imported by
these tests so they run just fine as unprivileged tests.

Travis CI (which runs all unprivileged tests) passed. Running Jenkins CI not necessary.

test-me-please


fdist software download error

Hi,
I follow the method you provide:
#fdist
RUN mkdir fdist2
WORKDIR /fdist2
RUN wget http://www.maths.bris.ac.uk/~mamab/software/fdist2.zip
RUN unzip fdist2.zip
RUN gcc -o fdist2 -O fdist2.c -lm
RUN gcc -o cplot -O cplot.c as100.c as99.c -lm
RUN gcc -o pv -O pv.c as100.c as99.c -lm
RUN gcc -o datacal -O datacal.c -lm
RUN cp datacal pv cplot fdist2 /usr/bin
WORKDIR /
RUN rm -rf fdist2
But I can't access the " http://www.maths.bris.ac.uk/~mamab/software/fdist2.zip"!
Can you send me this software.
My<EMAIL_ADDRESS>Thanks.

Thanks for the report.
I removed fdist2 and a some other software that is not supported by Biopython anymore.
It should work now. Tell me if not.

Hi,
@tiagoantao
When I tried access the URL:https://people.maths.bris.ac.uk/~mamab/software/
I get :


Pin patch versions of serde and serde_json

Why is this? Are we having version issues?

Some other libraries depend on serde and the respective versions were only being updated on the .lock file. (eg.: https://github.com/safe-global/safe-client-gateway/pull/868)
Since we use serde directly in the project I think it's better to pin them to a specific version (including the patch part).

Why is this? Are we having version issues?

Some other libraries depend on serde and the respective versions were only being updated on the .lock file. (eg.: #868)
Since we use serde directly in the project I think it's better to pin them to a specific version (including the patch part).

Makes sense, thanks for explaining!


Adjust links and branch references

Some scripts have branch references that should be removed.

Closing, resolved with release v0.1.0


CLOUD-754 - Fix CVEs in text and net modules and update golang to 1.18

Test name
Status

api-tests
passed


[WIP] PL-to-XIR converter

Context:
Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues:

This PR is no longer relevant to Jet.


[issue-CARBONDATA-16] BLOCK distribution in query is not correct in query when number of executors are less than the cluster size.

Fixed https://issues.apache.org/jira/browse/CARBONDATA-16

can u please provide more detail about the issue...:)

Currently the scenario when no executor is in active  mode, the block distribution will not be possible.
Since the current implementation is expecting the active node.
Before getting the list of active executor node we have to request the required no of executor.

Closing this PR raised similar PR in incubator branch
https://github.com/apache/incubator-carbondata/pull/20


First week of the month always moved to the left

Hello, as in the description, the first week is moved to the left of the first row. Here is how my calendar view looks like:
<com.kizitonwose.calendarview.CalendarView
        android:id="@+id/calendarView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="19dp"
        app:cv_dayViewResource="@layout/calendar_day"
        app:cv_monthHeaderResource="@layout/calendar_header"
        app:cv_orientation="horizontal"
        app:cv_scrollMode="paged" />

I have tried setting hasBoundaries together with all possible inDates configurations, none of them worked as expected. However, it worked fine on the previous versions of the library:
This is how it works on the version above 0.4.0:

This is how it works on version 0.4.0

Would be nice to reproduce this using one of the examples so I can easily take a look.


Is @property missing, or is the search broken?

Just read this article by Una Kravets:
https://web.dev/blog/at-property-baseline
Which says @property is now Baseline.
When trying to search for it, first tried "property" returned only 1 result (not it)
https://webstatus.dev/?q=property

Then tried I "@property" and got an error:
https://webstatus.dev/?q=%40property

Hi @aarontgrogg,
When you search without a term, we search based on id and name for a feature.
Features ids come from the file names in this folder from this external repository. And each file has a name field that we read.
The feature name you are looking for is registered-custom-properties.
The error you see about the grammar is because currently, no names or ids start with the @ sign.
On a related note, I have created this issue on how to index and search on more fields to help with finding features in the future. Let me know if you have any other thoughts. Otherwise, I will close this out


Fixed some typos

Hi Pooja/Online team - I've made some minor changes, mostly typos - please review and merge if it makes sense.
Thanks!

Thank you!


python312Packages.green: remove failing test

Description of changes
test_command fails with:
AttributeError: 'Distribution' object has no attribute 'tests_require'. Did you mean: 'extras_require'?
Upstream issue has been reported to:
https://github.com/CleanCut/green/issues/299
Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

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

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
Result of nixpkgs-review pr 335757 run on aarch64-darwin 1

4 packages built:

python311Packages.green
python311Packages.green.dist
python312Packages.green
python312Packages.green.dist

The following issues got detected with the above build packages.
Please fix at least the ones listed with your changed packages:

python311Packages.green.dist:

Package is missing maintainers.
If the package is using runCommand please make sure to inherit or list one or more maintainers.
got build log for '/nix/store/iy850lq6kzrz98qxki5lf1hblfmg5wz0-python3.11-green-4.0.2-dist' from 'daemon'
When evaluating attribute ‘python311Packages.green.dist’:
warning: maintainers-missing
Package does not have a maintainer. Consider adding yourself?
Near pkgs/development/python-modules/green/default.nix:51:5:
   |
51 |     maintainers = [ ];
   |     ^

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/maintainers-missing.md

python311Packages.green:

Package is missing maintainers.
If the package is using runCommand please make sure to inherit or list one or more maintainers.
got build log for '/nix/store/876cs87n2v0mjhl3xc1ak6gxvlvi34ka-python3.11-green-4.0.2' from 'daemon'
When evaluating attribute ‘python311Packages.green’:
warning: maintainers-missing
Package does not have a maintainer. Consider adding yourself?
Near pkgs/development/python-modules/green/default.nix:51:5:
   |
51 |     maintainers = [ ];
   |     ^

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/maintainers-missing.md

python312Packages.green.dist:

Package is missing maintainers.
If the package is using runCommand please make sure to inherit or list one or more maintainers.
got build log for '/nix/store/ldyn50jvn7wr4f1rfr25ma5xgw9f8www-python3.12-green-4.0.2-dist' from 'daemon'
When evaluating attribute ‘python312Packages.green.dist’:
warning: maintainers-missing
Package does not have a maintainer. Consider adding yourself?
Near pkgs/development/python-modules/green/default.nix:51:5:
   |
51 |     maintainers = [ ];
   |     ^

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/maintainers-missing.md

python312Packages.green:

Package is missing maintainers.
If the package is using runCommand please make sure to inherit or list one or more maintainers.
got build log for '/nix/store/gj1ki4lykgp0pgbwlp5n1y8j09vc3rs8-python3.12-green-4.0.2' from 'daemon'
When evaluating attribute ‘python312Packages.green’:
warning: maintainers-missing
Package does not have a maintainer. Consider adding yourself?
Near pkgs/development/python-modules/green/default.nix:51:5:
   |
51 |     maintainers = [ ];
   |     ^

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/maintainers-missing.md


hyprchan: add disable options

Describe your PR, what does it fix/add?
A lot of people complained about how hard it is to disable Hyprchan while still keeping the default Hyprland logo wallpaper. This fixes the issue by allowing users to disable Hyprchan wallpapers from being selected when randomising the wallpaper, or completely remove the wallpaper from the Hyprland installation (if installed with Meson).

meson: add option (not) to include hyprchan
misc: add disable_hypr_chan option

Addresses https://github.com/hyprwm/Hyprland/issues/2930.
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
No.
Is it ready for merging, or does it need work?
Ready.

idk why a meson opt is needed if we disable it via the config though. What if someone builds without and then enables in the config?

Good question. Dropped meson option.

make a commit to the wiki too please


Unable to Build (Syntax Error involving reserved word 'Await')

When attempting to build, the following error is encountered:

<EMAIL_ADDRESS>build
vite build

file:///home/sunkencity999/chevron-2.1.0/node_modules/vite/bin/vite.js:7
await import('source-map-support').then((r) => r.default.install())
^^^^^
SyntaxError: Unexpected reserved word
at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
at async link (internal/modules/esm/module_job.js:42:21)

It seems to be a known issue of vite
https://github.com/vitejs/vite/issues/9582
You need to update your Node.js version

That resolved the issue


Rename density functions, clean up methods and use read in functions

This PR closes #18, #19, #20.
#19, #20 are minor changes that are described in the issue.
#18 is a breaking change due to the renaming of the functions in_situ_density and potential_density to get_ρ and get_σₚ respectively.

Merging but will wait for #3 and #4 to be finished before new release.


Suggestion List does not disappear after focus out

I have the following configuration:
<tags-input ng-model="query_circles" placeholder="Çevre Seçiniz" display-property="name" replace-spaces-with-dashes="false" min-length="1" add-from-autocomplete-only="true"  add-on-blur="false">
    <auto-complete source="cevrelisteleForSearch()" load-on-empty="true" load-on-focus="true" select-first-match="false"></auto-complete>
</tags-input>

Problem:
When I select from suggestion list, list remains open => OK.
But when I click on outside, the list does not disappear.
Screen Video: http://www.screencast.com/t/MYs22KwT
Installed Version: 3
I've made a fix on 2.3 but I my solution did not work with new version.
Thanks

Sorry for not replying sooner.
That's odd. The autocomplete list should be closed as soon as the element loses focus.
I wonder if you could provide a plunker showing the problem you're experiencing? You can use this template.

I've got the same problem with the example on the main page: http://mbenford.github.io/ngTagsInput/
Steps to reproduce with Chrome on Windows:

Click in text field so that it gets the focus
Cursor down
Click on the Scroll down button (arrow down) of the suggestion list (text field looses focus, suggestions list is still there)
Now, you can click everywhere and the suggestion list doesn't disappear.

This issue was selected to be spring-cleaned by a script. More information can be found here.
If anyone thinks this was a mistake and this issue should be reopened, please leave a message below explaining why. Before doing so, please consider reading the CONTRIBUTING file.


Countdown/Tip of the game screen appears borked

Running the R6 beta - the countdown screen/tip of the game looks borked/misaligned.
[[Image(http://img685.imageshack.us/img685/1450/countdownh.png)]]
This appears different to R5 where it looked fine
[[Image(http://img269.imageshack.us/img269/820/tmp5507j.jpg)]]
Imported from trac ticket #144,  created by notjarvis on 07-15-2010 at 20:49, last modified: 08-11-2010 at 20:40
CCing<EMAIL_ADDRESS>

Tip of the Day can have Nix info removed...
Trac comment by freyja on 07-16-2010 at 07:49

both domains in the new image are down or the sites are incorrect
Trac comment by Imago on 07-18-2010 at 09:50

r751
Trac comment by Imago on 07-18-2010 at 10:30

R5 screenshot shows CortUI Missionbrief.
Trac comment by pkk on 08-11-2010 at 20:40


make scylla-server.service stopped state when scylla_on_first_boot=false

Currently, when scylla_on_first_boot set to false, scylla-server.service
becomes failed state by returning non-zero in scylla_prepare script.
But systemd may automatically tries to start scylla-server.service again
when daemon is reloaded or any other services is manipulated.
Instead, we should make scylla-server.service stopped state, by running
systemctl stop scylla-server.service.
Fixes #234

Jenkins test passed:
https://jenkins.scylladb.com/view/master/job/scylla-master/job/releng-testing/job/next-machine-image/247/

ping @yaronkaikov


Update Dockerfile to greatly minimize final image size

When you don't use apt-get's --no-install-recommends flag, you install all the recommended packages for the package and the package itself. By implementing this parameter, I was able to decrease my image size by ~20% on my various arch. builds.  I haven't calculated the build time savings yet.
An older reference to why this can be meaningful for this project - https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends .

This is awesome! I admit the Docker container was a bit of an afterthought but I’m happy to take any improvements.
I’m out of town until Sunday but I’ll fully review this (and your other PRs, thanks again!) once I get back and get them merged in

Anytime.  Glad I could help.  Keep up the great work!

Thank you!  Have a great week.


fix: now linters in general do not run on #guard_msgs itself

The #guard_msgs command runs the command it is attached to as if it were a top-level command. This is because the top-level command elaborator runs linters, and we are interested in capturing linter warnings using #guard_msgs. However, the linters will run on #guard_msgs itself, leading sometimes to duplicate warnings (like for the unused variable linter).
Rather than special-casing #guard_msgs in every affected linter, this PR special-cases it in the top-level command elaborator itself. Now linters are only run if the command doesn't contain #guard_msgs. This way, the linters are only run on the sub-command that #guard_msgs runs.
It would probably be best to require that #guard_msgs only be runnable as a top-level command, since there are ways to suppress linting with the current setup.

Note to self/whoever gets to address this first: when this lands, batteries also has such as hack which can be removed now.


Integrate ICN from CompositionalNetworks.jl

Codecov Report

Merging #20 (134b5b1) into main (ddebd87) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main       #20   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           14        14
  Lines          329       329
=========================================
  Hits           329       329

Impacted Files
Coverage Δ

src/LocalSearchSolvers.jl
100.00% <ø> (ø)

src/models/sudoku.jl
100.00% <ø> (ø)

Continue to review full report at Codecov.

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

Codecov Report

Merging #20 (134b5b1) into main (ddebd87) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main       #20   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           14        14
  Lines          329       329
=========================================
  Hits           329       329

Impacted Files
Coverage Δ

src/LocalSearchSolvers.jl
100.00% <ø> (ø)

src/models/sudoku.jl
100.00% <ø> (ø)

Continue to review full report at Codecov.

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


add skip_none argument

Question / Feature Request
Suppose that I have a class like this:
class Jake(BaseModel):
    foo: Optional[str]

When I serialize it, I only want to serialize optional values when they are not null.  The skip_defaults flag does something similar to what I am looking for but has this weird case:
>>> j = Jake()
>>>
>>> # This is the behavior I expect:
... j.dict(skip_defaults=True)
{}
>>>
>>> # Set the foo property:
>>> j.foo = "baz"
>>>
>>> # This is also the behaviour I expect:
... j.dict(skip_defaults=True)
{'foo': 'baz'}
>>>
>>>
>>> # Unfortunately, this is not the behavior that I expect:
... j.foo = None
>>> j.dict(skip_defaults=True)
{'foo': None}

Right now after I serialize to dict, I walk the dict and remove all of the None values recursively, but I would rather not have to do this.  Is this built into Pydantic?  Is the behavior that I am seeing a bug?

This behavior is actually not a bug (I found it a little confusing at first too) -- it is intended so that you can tell precisely which fields were set on the object during instance initialization, vs. taking the default value based on the class definition. (I've included an example below to show why this might be useful.)
Removing None from the dicts seems most commonly relevant to serialization logic; based on this comment this seems explicitly outside the scope of pydantic.
For what it's worth, FastAPI has a function (fastapi.encoders.jsonable_encoder) that is specifically intended for converting (nested) pydantic models to dicts, and it has an include_none parameter that does what you want. If you want this capability in the context of serialization, you might find this function useful, even if only as a reference implementation (it handles a number of other serialization edge cases as well).

Here's a concrete example of how the skip_defaults=True logic can be useful in the case of a REST resource with optional properties:
Imagine you want to store a user's username, and optionally an email.
class User(BaseModel):
    user_id: uuid.UUID
    username: str
    email: Optional[str]

A clean way to implement updates is to have a corresponding model where all fields are optional. Imagine you have the following update function and model:
def update_user(user_id: uuid.UUID, **update_kwargs):
    for key, value in update_kwargs.items():
        set_user_attribute(user_id, key, value)

class UserUpdate(BaseModel):
    user_id: uuid.UUID
    username: Optional[str]
    email: Optional[str]

Then
user_update = UserUpdate(user_id=<user_id><EMAIL_ADDRESS>update_user(**user_update.dict(skip_defaults=True))

makes sure that you only update the fields that were specified; in this case, only the email address. (This is a common pattern for the HTTP PATCH method.)
If the skip_defaults=True logic always removed None, then it would no longer be possible to specify that you want to change the email attribute from a non-None value back to None.

great answer @dmontagu

@samuelcolvin - Is this the kind of functionality that you would consider for Pydantic?  Could we leave this open as a feature request?
(Thanks @dmontagu great explanation of that behaviour!)

I'd accept skip_none keyword argument to dict() and friends.

Here's an idea in case it's useful to anyone:
>>> class C(BaseModel):
...  a: str
...  b: Optional[str] = '__undefined__'

Then to serialize:
{k: v for (k, v) in c.dict().items() if v != '__undefined__'}

Result:
>>> c = C(a='asdf')
>>> c.dict()
{'a': 'asdf'}


Bugs when updating drink

http://tipsyology.com/recipe/5055-pina-colada
Updated content for this drink and few issues seem to show after you approved it.

image didn't appear, upload showed success.
Duplicated ingredients. Bottom 3 were my updates to the servings.
Directions appearing incorrectly.

@sirtastic : The pic is never going to show up until it's been reviewed and approved.

@sirtastic : I'll see if I can fix the other things.

@sirtastic : sorry about these errors. The ingredients issue didn't show up in testing b/c it only affected drinks that had never been revised before.
commit 0eac0ced8ed632f7cf5abe4121daabf6a4198312
Date:   Wed Sep 9 15:28:35 2015 -0700
Fix duplication of ingredients when making first Revision on a Drink.  Fixes #99

@entrity The pina-colada drink is still displaying the duplicates. Can you fix and close?

@sirtastic : that's a data issue. Just make a revision (after I made the code changes) and publish it.


add Harness version 1.20.9, Harness Delegate version 24.01.82108

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

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

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

Issue(s)

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

[ ] Tested Locally
[ ] Optional Screen Shoot.

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


Using BtreeMap instead of HashMap would make the scripts be ordered by key.

@Plommonsorbet I think this is a great idea. Intended doing something along these lines but didn't get around to it :)


running autoflake in multiple directories?

I am looking to find all python files in my d:\ and run autoflake on it? how would i do this?
I saw a mention of the -r parameter but it did not work for me.

This should work:
autoflake -r directory_path_here

but it did not work for me.

Can you provide additional details on your test case ?

I saw what my problem was and was able to fix it. thanks.
On another note, I want to create a backup of files only where autoflake was run. How would I do this?

autoflake doesn't support making backup files. But feel free to create an issue (or pull request) for that enhancement.


Is CustomConsumingRegexComponent incapable of declaring the start of a match?

Description
I believe I have found a missing capability in CustomConsumingRegexComponent 2 and I would like to confirm that I'm not simply using it wrong.
To implement CustomConsumingRegexComponent you must implement consuming(_:startingAt:in:) which returns (upperBound: String.Index, output: Self.RegexOutput)?. Notice how the tuple only contains an upperBound. There is no lowerBound and there is no Range. As far as I know there is no way for a CustomConsumingRegexComponent to declare where the start of the match is.
In the short term this missing capability should be documented.
In the long term, it would be beneficial to pitch an implementation of this to Swift Evolution.
Reproduction
Consider the following test data:
let dateStringHaystacks = [
  "2023-04-15 some other text",
  "some other text 2023-04-15",
  "some 2023-04-15 other text"
]

All three of these strings pass the following test:
@Test(arguments: dateStringHaystacks)
func dateRegex(string: String) throws {
  // Create a Regex using RegexBuilder for YYYY/MM/DD
  let dateRegex = Regex {

    Repeat(OneOrMore(.digit), count: 4)  // Matches exactly 4 digits for the year (YYYY)
    "-"
    Repeat(OneOrMore(.digit), count: 2)   // Matches exactly 2 digits for the month (MM)
    "-"
    Repeat(OneOrMore(.digit), count: 2)   // Matches exactly 2 digits for the day (DD)
  }

  let ranges = string.ranges(of: dateRegex)
  let range = try #require(ranges.first)
  let foundString = String(string[range])
  #expect(foundString == "2023-04-15")
}

which yields the following results:
// input: "2023-04-15 some other text" ✅ test passes
// input: "some other text 2023-04-15" ✅ test passes
// input: "some 2023-04-15 other text" ✅ test passes

I then implemented a CustomConsumingRegexComponent wrapper around NSDataDetector:
public struct DateDataDetector: CustomConsumingRegexComponent {
  public typealias RegexOutput = Date

  public init() {}

  public func consuming(
    _ input: String,
    startingAt index: String.Index,
    in bounds: Range<String.Index>
  ) throws -> (upperBound: String.Index, output: Date)? {
    let detector = try NSDataDetector(types: NSTextCheckingResult.CheckingType.date.rawValue)
    let range = NSRange(index..<bounds.upperBound, in: input)
    guard let match = detector.firstMatch(in: input, options: [], range: range),
          let date = match.date else {
      return nil
    }
    let upperBound = input.index(
      input.startIndex,
      offsetBy: match.range.upperBound
    )
    return (upperBound: upperBound, output: date)
  }
}

This custom regex component correctly identifies dates however, the ranges are wrong. The start of the range is always the beginning of the string, even if that is not where the beginning of the match was. Furthermore, because there is no upperBound in the tuple, I can see no way to implement declaring the beginning of the range when a match is found.
The following tests fail, but only fail when the date is not found at the beginning of the string. (They pass even if there is text after the match.)
  @Test(arguments: dateStringHaystacks)
  func rangesOf_valid(string: String) throws {
    let regex = Regex {
      DateDataDetector()

    }
    let ranges = string.ranges(of: regex)
    #expect(ranges.count == 1)

    let range = try #require(ranges.first)
    let foundString = String(string[range])
    #expect(foundString.starts(with: "2023-04-15"))
    #expect(foundString == "2023-04-15")
  }

  @Test(arguments: dateStringHaystacks)
  func firstRangeOf_valid(string: String) throws {
    let regex = Regex {
      DateDataDetector()

    }
    let range = try #require(string.firstRange(of: regex))

    let foundString = String(string[range])
    #expect(foundString.starts(with: "2023-04-15"))
    #expect(foundString == "2023-04-15")
  }

  @Test(arguments: dateStringHaystacks)
  func matches_valid(string: String) throws {
    let regex = Regex {
      OneOrMore(DateDataDetector())

    }
    let matches = string.matches(of: regex)
    #expect(matches.count == 1)
    let match = try #require(matches.first)
    #expect(match.output == "2023-04-15")
  }

which yields the following results:
// input: "2023-04-15 some other text", ✅ test passes
// input: "some other text 2023-04-15" ❌ match.output = "some other text 2023-04-15"
// input:  "some 2023-04-15 other text" ❌ match.output = "some 2023-04-15"

As you can see the match behavior is different for RegexBuilder than it is for CustomConsumingRegexComponent. The RegexBuilder begins the match at the beginning of the match, but the CustomConsumingRegexComponent matches at the beginning of the string, no matter what. It's highly likely that I'm "using it wrong". However, if that is the case, I simply do not know how to tell the Regex system where the beginning of the match is. I can reliably tell it where the end of the match is (the upperBound) but there is no way to return the beginning of the match (a lowerBound).
Expected behavior
See reproduction.
Environment
swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-<IP_ADDRESS>.10 clang-16<IP_ADDRESS>)
Target: arm64-apple-macosx15.0
Additional information
I also posted about this in the Swift forums here to try to figure out if this is missing or not.
wes1 helpfully pointed to evidence that suggests that CustomConsumingRegexComponent was only meant to implement prefixMatch by design. If CustomConsumingRegexComponent is not currently up to feature parity with any other RegexComponent then this should be documented.

@hamishknight I think this needs a transfer.


WebSocket Performance Issues with Large(ish) Messages (OSX?)

Cowboy is very slow to process large(ish) binary websocket data. We are sending binary messages over websockets (typically about 2 MB per message) and the speeds are roughly 7x slower than sending the same message to a simple python ws server. When sending WS data locally, the speeds are roughly 50-100x slower.
Normally, I find Elixir/Erlang is I/O bound, but I am only able to saturate 15% of a gig Ethernet link with WS if I connect to cowboy (around 140 Mbps), whereas I can get 90+% of potential bandwidth connecting to simple Python server (around 730 Mbps).
We're using Cowboy 2.9
Thanks in advance!
ps here is a repo to reproduce the issue:
https://github.com/madasebrof/cowboy-ws-test
to cowboy ws server (on OSX, Mac M1):
python client -> cowboy ws server
FPS = 8.62, websocket send time = 116.0ms
FPS = 8.55, websocket send time = 117.0ms
FPS = 8.70, websocket send time = 115.0ms
FPS = 8.33, websocket send time = 120.0ms

python client ->  python ws server (on OSX, Mac M1)
python client -> python ws server
FPS = 55.56, websocket send time = 18.0ms
FPS = 50.01, websocket send time = 20.0ms
FPS = 58.81, websocket send time = 17.0ms
FPS = 52.63, websocket send time = 19.0ms

EDIT
Looks like it might be somehow OSX specific??? Still around 20% slower vs. Python, but that's not a big deal.
Just ran PC -> Ubuntu...
python client -> cowboy ws server on ubuntu
FPS = 47.59, websocket send time = 21.0ms
FPS = 46.77, websocket send time = 21.4ms
FPS = 50.51, websocket send time = 19.8ms
FPS = 49.91, websocket send time = 20.0ms
FPS = 47.73, websocket send time = 21.0ms
FPS = 46.72, websocket send time = 21.4ms
FPS = 50.02, websocket send time = 20.0ms
FPS = 99.99, websocket send time = 10.0ms
FPS = 50.00, websocket send time = 20.0ms
FPS = 49.89, websocket send time = 20.0ms
FPS = 50.00, websocket send time = 20.0ms
FPS = 50.00, websocket send time = 20.0ms
FPS = 33.35, websocket send time = 30.0ms
FPS = 50.00, websocket send time = 20.0ms
FPS = 50.03, websocket send time = 20.0ms

python client -> python server
FPS = 142.86, websocket send time = 7.0ms
FPS = 166.70, websocket send time = 6.0ms
FPS = 23.26, websocket send time = 43.0ms
FPS = 166.73, websocket send time = 6.0ms
FPS = 167.07, websocket send time = 6.0ms
FPS = 999.83, websocket send time = 1.0ms
FPS = 23.70, websocket send time = 42.2ms
FPS = 82.95, websocket send time = 12.1ms
FPS = 117.39, websocket send time = 8.5ms
FPS = 93.33, websocket send time = 10.7ms
FPS = 85.83, websocket send time = 11.7ms
FPS = 22.29, websocket send time = 44.9ms
FPS = 167.11, websocket send time = 6.0ms
FPS = 27.13, websocket send time = 36.9ms
FPS = 159.19, websocket send time = 6.3ms
FPS = 18.16, websocket send time = 55.1ms
FPS = 23.77, websocket send time = 42.1ms
FPS = 152.29, websocket send time = 6.6ms
FPS = 124.92, websocket send time = 8.0ms
FPS = 142.88, websocket send time = 7.0ms
FPS = 66.72, websocket send time = 15.0ms
FPS = 496.66, websocket send time = 2.0ms
FPS = 200.04, websocket send time = 5.0ms
FPS = 199.99, websocket send time = 5.0ms

Just spent the past few days digging in to this, trying over 10 gig ethernet, etc. It does look like the Erlang/Cowboy WS is tuned for large number of connections and small messages, vs. fewer connections and large messages. Although, just looking through the WS Erlang code (which I partially understand--I know Elixir--but I can follow the logic in Erlang as it's so similar), it all seems pretty clean and straightforward.
Anyway, if you do dig in to this, maybe just do some testing with bigger binary messages to see if you see anything odd and/or easily fixable?
Thanks!!!

There's probably a frame size threshold at which point it is more efficient to do a recv than receiving messages passively. That said, the size of the buffer values will also matter here and they're probably not tweaked well for larger messages by default (buffer, recvbuf and sndbuf). Have you tried tweaking those?

Thanks for the reply! I was looking for those options, but I couldn't find them!
Night and day difference. Posting here just in case someone else stumbles across this issue.
defmodule FrameServer.Application do
  @moduledoc false
  use Application
  require Logger

  @port 8765
  @buf_size 1024 * 1024 * 2

  @impl true
  def start(_type, _args) do
    dispatch =
      :cowboy_router.compile([
        {:_,
         [
           {"/", FrameServer, []}
         ]}
      ])

    :cowboy.start_clear(
      :server,
      [{:recbuf, @buf_size}, {:sndbuf, @buf_size}, {:buffer, @buf_size}, {:port, @port}],
      %{:env => %{:dispatch => dispatch}}
    )
  end
end

Reduced times to:
FPS = 58.84, websocket send time = 17.0ms
FPS = 23.81, websocket send time = 42.0ms
FPS = 166.65, websocket send time = 6.0ms
FPS = 62.50, websocket send time = 16.0ms
FPS = 125.01, websocket send time = 8.0ms
FPS = 143.03, websocket send time = 7.0ms
FPS = 166.45, websocket send time = 6.0ms
FPS = 166.66, websocket send time = 6.0ms
FPS = 142.83, websocket send time = 7.0ms
FPS = 143.08, websocket send time = 7.0ms
FPS = 166.63, websocket send time = 6.0ms
FPS = 16.44, websocket send time = 60.8ms
FPS = 166.65, websocket send time = 6.0ms

Note that this is sending a 2 MB binary file via WebSockets over 10 Gb ethernet. I am getting around 1.0 Gps throughput, so not bad!
There seem to be some hiccups, but whatever! Sooo much faster! Thanks!!!
ps there is a deadlink from this page:
https://ninenines.eu/docs/en/cowboy/2.9/manual/cowboy.start_clear/
under TransportOpts
to https://ninenines.eu/docs/en/cowboy/2.9/manual/ranch_tcp
Should go to
https://ninenines.eu/docs/en/ranch/2.1/manual/ranch_tcp/


WFLY-17624 Upgrade cdi-api and lang-model from 4.0.0 to 4.0.1

https://issues.redhat.com/browse/WFLY-17624

Thanks @chengfang and @manovotn


Remove unnecessary nested dict

This PR is removing unnecessary nested dictionary used in some datasets. For now the following datasets are updated:

MLQA

RACE

Will be adding more if necessary.
#378

We can probably scan the dataset scripts with a regexpr to try to identify this pattern cc @patrickvonplaten maybe

@mariamabarham This script should work. I tested it for a couple of datasets. There might be exceptions where the script breaks - did not test everything.
#!/usr/bin/env python3

from nlp import prepare_module, DownloadConfig, import_main_class, hf_api
import tempfile

def scan_for_nested_unnecessary_dict(dataset_name):

    def load_builder_class(dataset_name):
        module_path = prepare_module(dataset_name, download_config=DownloadConfig(force_download=True))
        return import_main_class(module_path)

    def load_configs(dataset_name):
        builder_cls = load_builder_class(dataset_name)
        if len(builder_cls.BUILDER_CONFIGS) == 0:
            return [None]
        return builder_cls.BUILDER_CONFIGS

    def scan_features_for_nested_dict(features):
        is_sequence = False
        if hasattr(features, "_type"):
            if features._type != 'Sequence':
                return False
            else:
                is_sequence = True
                features = features.feature

        if isinstance(features, list):
            for value in features:
                if scan_features_for_nested_dict(value):
                    return True
            return False

        elif isinstance(features, dict):
            for key, value in features.items():
                if is_sequence and len(features.keys()) == 1 and hasattr(features[key], "_type") and features[key]._type != "Sequence":
                    return True
                if scan_features_for_nested_dict(value):
                    return True
            return False
        else:
            raise ValueError(f"{features} should be either a list of a dict")

    configs = load_configs(dataset_name)

    for config in configs:
        with tempfile.TemporaryDirectory() as processed_temp_dir:
            # create config and dataset
            dataset_builder_cls = load_builder_class(dataset_name)
            name = config.name if config is not None else None
            dataset_builder = dataset_builder_cls(name=name, cache_dir=processed_temp_dir)

        is_nested_dict_in_dataset = scan_features_for_nested_dict(dataset_builder._info().features)
        if is_nested_dict_in_dataset:
            print(f"{dataset_name} with {name} needs refactoring")

if __name__ == "__main__":
    scan_for_nested_unnecessary_dict("race")  # prints True
    scan_for_nested_unnecessary_dict("mlqa")  # prints True
    scan_for_nested_unnecessary_dict("squad")  # prints Nothing

    # ran the following lines for 1min and seems to work -> didn't check for all datasets though
#    api = hf_api.HfApi()
#    all_datasets = [x.id for x in api.dataset_list(with_community_datasets=False)]
#    for dataset in all_datasets:
#        scan_for_nested_unnecessary_dict(dataset)

@mariamabarham This script should work. I tested it for a couple of datasets. There might be exceptions where the script breaks - did not test everything.
#!/usr/bin/env python3

from nlp import prepare_module, DownloadConfig, import_main_class, hf_api
import tempfile

def scan_for_nested_unnecessary_dict(dataset_name):

    def load_builder_class(dataset_name):
        module_path = prepare_module(dataset_name, download_config=DownloadConfig(force_download=True))
        return import_main_class(module_path)

    def load_configs(dataset_name):
        builder_cls = load_builder_class(dataset_name)
        if len(builder_cls.BUILDER_CONFIGS) == 0:
            return [None]
        return builder_cls.BUILDER_CONFIGS

    def scan_features_for_nested_dict(features):
        is_sequence = False
        if hasattr(features, "_type"):
            if features._type != 'Sequence':
                return False
            else:
                is_sequence = True
                features = features.feature

        if isinstance(features, list):
            for value in features:
                if scan_features_for_nested_dict(value):
                    return True
            return False

        elif isinstance(features, dict):
            for key, value in features.items():
                if is_sequence and len(features.keys()) == 1 and hasattr(features[key], "_type") and features[key]._type != "Sequence":
                    return True
                if scan_features_for_nested_dict(value):
                    return True
            return False
        else:
            raise ValueError(f"{features} should be either a list of a dict")

    configs = load_configs(dataset_name)

    for config in configs:
        with tempfile.TemporaryDirectory() as processed_temp_dir:
            # create config and dataset
            dataset_builder_cls = load_builder_class(dataset_name)
            name = config.name if config is not None else None
            dataset_builder = dataset_builder_cls(name=name, cache_dir=processed_temp_dir)

        is_nested_dict_in_dataset = scan_features_for_nested_dict(dataset_builder._info().features)
        if is_nested_dict_in_dataset:
            print(f"{dataset_name} with {name} needs refactoring")

if __name__ == "__main__":
    scan_for_nested_unnecessary_dict("race")  # prints True
    scan_for_nested_unnecessary_dict("mlqa")  # prints True
    scan_for_nested_unnecessary_dict("squad")  # prints Nothing

    # ran the following lines for 1min and seems to work -> didn't check for all datasets though
#    api = hf_api.HfApi()
#    all_datasets = [x.id for x in api.dataset_list(with_community_datasets=False)]
#    for dataset in all_datasets:
#        scan_for_nested_unnecessary_dict(dataset)

Great, I will try it

I'm not sure this PR was finished cc @mariamabarham @patrickvonplaten

Sorry for that, apparently there are other datasets that could have unnecessary nested dicts.
We can have another PR to scan and fix the other datasets.


Missing prerequisite

When you run:
az aks draft generate-workflow

You are asked for the name of your ACR, but ACR is not listed as a prerequisite in the docs. Near where you say you need and AKS you may want to list ACR as well.

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

ID: 7cbb7ea2-7c42-85ba-488a-406d330954a0
Version Independent ID: 2b7cbb4f-426e-4ba3-ebc7-515899dd5ae1
Content: Draft extension for Azure Kubernetes Service (AKS) (preview) - Azure Kubernetes Service
Content Source: articles/aks/draft.md
Service: container-service
GitHub Login: @qpetraroia
Microsoft Alias: qpetraroia

@DarqueWarrior Thank you for your feedback!  We are reviewing the documentation and will get back to you shortly.

@DarqueWarrior In reviewing the documentation it looks like there is a daisy chain of requirements.  The documentation in question requires an AKS cluster with a link to documentation that lists an Azure Container Registry instance as a prerequisite in the "Before you begin" section.  I agree that it would be helpful to list ACR explicitly for those who are not following the links and will reach out to the documentation team to see what we can do to improve this experience.

@DarqueWarrior Thank you again for your feedback!  I'll get a PR out to make the prerequisites more explicit.


What is the equivalent of HttpResponse.ClearContent() and HttpResponse.SuppressContent in HttpAbstractions?

There isn't any yet. Both of these members deal with response buffering which has not been implemented yet in ASP.NET 5.  Here's the related work item:
https://github.com/aspnet/Hosting/issues/49

@Tratcher Thank you for the quick reply. I'm porting an ASP.NET MVC5 application into MVC6 and it uses VirtualPathUtility to get the absolute path for paths starting with "~". Are there any equivalents to Request.Url.AbsolutePath and Request.Url.AbsoluteUri  ?

@rajajhansi Please don't ask unrelated questions on bugs that you filed. Treat each new question as a separate issue. If you don't know where to file it, open it on aspnet/Home.

@davidfowl, ??? It was a question and not a follow up to any bug. Please understand that I didn't file any bug related to my question. Since HttpResponse belongs to HttpAbstractions, I asked the question in this project.

@davidfowl, I got it.  I can open another issue for the 2nd question.


Feature Request - Text-to-Voice Support for Chatbot Responses

Issue Description:
Overview:
Currently, our chatbot responses are limited to text-based output. To enhance user experience and accessibility, we propose the implementation of text-to-voice (TTS) support for chatbot responses. This feature would enable the chatbot to convert its textual replies into voice, making it more inclusive for users with visual impairments and providing an alternative communication channel.
Integration of the Text-to-Voice Engine:
Integrate a reliable and efficient text-to-voice engine that supports multiple languages.
Ensure compatibility with popular TTS APIs or libraries.
Address potential challenges related to voice synthesis, such as maintaining naturalness, clarity, and coherence in different languages.
Benefits:

Here are demos of the chatbot's responses in voice for accessibility.
https://github.com/kunal9922/Multilingual_Railways_Chatbot/assets/53283003/f4545777-cb01-4a90-aea5-c5ab8944cfc9
https://github.com/kunal9922/Multilingual_Railways_Chatbot/assets/53283003/aa71963f-eb6a-456d-8690-a882cd20504e


phantomjs2: remove

Description of changes
PhantomJS development has been suspended for quite some time, depends on python2 for running tests, and phantomjs2's predecessor, phantomjs was removed for security reasons. It is only an optional dependency for youtube-dl and yt-dlp.

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

Please rebase


IoT CLI extension release v0.9.2

This checklist is used to make sure that common guidelines for a pull request are followed.

For new extensions:

[ ] My extension description/summary conforms to the Extension Summary Guidelines.

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

The pipeline output is stuck right now, however all checks have passed:

add to S168


optimize UNUSED macro

Signed-off-by: liyi<EMAIL_ADDRESS>Summary
optimize UNUSED macro to fit more type of input parameter, for example, a structure
Impact
macro UNUSED can fit more types.
Testing
before change

when input parameter of  UNUSED is not a integer, the compile will fail!
after change, it can work well.

I'm not sure about this change. For example if the parameter is int then would this change force the compiler to use the stack to obtain the parameter address (I mean when parameters are passed via registers)?

Shouldn't, since first expression(1) short cut the second expression evaluation.

Could you please add a few simple examples for assembly generated with and without this change?

Here is an example: https://github.com/apache/incubator-nuttx-apps/pull/1248
gip6 is a structure, (void)a is an invalid construction in this case.

If we are sure that there is no stack impact, then I'm fully fine with this change


[CLOUDGA-14133] Add support for enterprise-security cluster setting

Summary:
Adding support for enterprise-security flag which is part of createClusterRequest (CreateClusterRequest --> ClusterSpec --> ClusterInfo --> enterprise_security) for enabling PCI-DSS in YBM project.
Test Plan:
created a cluster using the below command:
./ybm cluster create     --cluster-name=test-cluster1 --enterprise-security=true     --credentials=username=admin,password=YBM.Is.Always.Great!

2 small comments:

--enterprise-security this alone should enable the feature no need of =true
please generate the docs using the commandmake docs


combinePaths not implemented in HTML renderer

When creating a PieChart with more than one PieChartSectionData, on Flutter web using the HTML renderer throws the following error:
combinePaths not implemented in HTML renderer.
The relevant error-causing widget was:
  PieChart
PieChart:file:team_reports_view.dart:169:24
When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49      throw_
lib/_engine/engine/html/renderer.dart 222:5                                       combinePaths
lib/ui/path.dart 54:21                                                            combine
packages/fl_chart/src/chart/pie_chart/pie_chart_painter.dart 200:26               generateSectionPath
packages/fl_chart/src/chart/pie_chart/pie_chart_painter.dart 133:27               drawSections
packages/fl_chart/src/chart/pie_chart/pie_chart_painter.dart 49:5                 paint
packages/fl_chart/src/chart/pie_chart/pie_chart_renderer.dart 142:13              paint

I know this is a Flutter issue, but maybe an alternative can be found while the Flutter team solves this issue (which is opened since 2020, so I don't think so lol)
Versions

Flutter version 3.7.5
fl_chart 0.61.0

Hi. You are right. We can implement a solution until Flutter gets it fixed.
Can you please continue in #955? Because having two different issues about one issue is not working.
Thanks!


Add prod/dev modes for eslint config

Adds a strict "prod" option to the ESLint config to address some of the concerns about looseness when using the config outside create-react-app
package.json
{
    "eslintConfig": {
        "extends": ["react-app/prod"]
    }
}

react-app/dev - same as current config, mostly warnings
react-app same as dev
react-app/prod - escalates warnings to errors

Hi! Thanks a lot for this PR, but it's most likely unnecessary. Setting CI=true during build time will cause the build to fail when warnings are experienced.

Yes... In create-react-app's build setup. This lint config is widely used outside CRA. I think this should be reopened.

I don't think the "CI=true" option is a good solution given how the package is actually used in the wild. It only works with CRA's build scripts and there are many people using it outside of CRA:

1,589 dependents on the lint config on NPM according to https://www.npmjs.com/package/eslint-config-react-app
It's used directly in packages like @reach/ui by @ryanflorence
@gaearon recommends using it directly: https://twitter.com/dan_abramov/status/1010297082752720897

Not having the option to turn some of the warnings into errors has people turning back to airbnb or maintaing custom configs.


Some questions about the data format and dataloader

Hello, I'm an undergraduate student from Peking University and I want to follow your work and test it on some other datasets. It seems that the images are cropped and stored in .h5 files but the code for this procedure is not included. Could you please also share the code about image cropping here or put some sample data in the repo?

Hello, I'm an undergraduate student from Peking University and I want to follow your work and test it on some other datasets. It seems that the images are cropped and stored in .h5 files but the code for this procedure is not included. Could you please also share the code about image cropping here or put some sample data in the repo?

我遇到了相同的问题，请问兄弟你拿到了吗？如果有的话可否分享


CSS rgb and rgba functions can't accept custom property

The following CSS results in the parser stripping the value.
:root {
  --my-color: 255, 0, 0;
}

body {
  color: rgb(var(--my-color));
}

It seems that the parser thinks the value is invalid since rgb expects three arguments and is only receiving one. However, the CSS works correctly in every major browser.
The reason I am using this syntax is because I'm passing the --my-color variable to various rgba functions throughout the style sheet, and while the color might change, the alpha value of each rgba function is defined separately. I.e., I can't set --my-color to rgba(255, 0, 0, .5) as I'd require hundreds of variables for each opacity.

Actually, it appears that any custom property passed as an argument to rgb or rgba results in the value being removed. For example:
body {
  color: rgb(var(--color-red), var(--color-green), var(--color-blue));
}

results in body{}

I believe this is a duplicate of #186.

I noticed that NitroPack:fix/css4-rgb-parsing corrects this bug (at least for my use case). Is it possible to merge it?


Get product ticker ad hoc through same client

I needed this feature to be able to interact with each market, without creating a new client connection. Might be of benefit to some users.

Didn't run unit tests beforehand 😳. I'll remake the PR once I know it's working.

@daviscodesbugs apparently you can initiatlize a public Client with a coin/currency. https://github.com/coinbase/gdax-node/pull/18

@awitherow I recognized this previously, but thought it tedious to maintain multiple clients in order to perform operations such as fetch the most recent ticker.

I have done something like this @daviscodesbugs https://github.com/awitherow/coinbot/pull/19/files#diff-8b7444617c652837169edb6e31a71ddaR7

@daviscodesbugs do you have any ideas where we could have such similar functionality in other coin specific functions?

@awitherow I don't have a specific use case personally, though it seems that being able to make certain calls, without initializing an additional client, could be useful. Perhaps a client is initialized with a default currency, but subsequent calls could take an optional parameter specifying a different currency.

I agree in general that having to initialize a client just to perform a request is quite hazardous. A clients functionality is basically to add a couple of defaults to methods, which could also be passed directly to the method. We might think about making the API surface flat in most cases.

So does this implementation fit your ideal @fb55 ?

This is too limited in scope for my taste, with only a single method being updated. I'm closing this PR, but will revisit the topic. @daviscodesbugs I hope that's okay for you!


[FLINK-15023][core][runtime] Remove on-heap managed memory

What is the purpose of the change
This PR is part or FLIP-49. It completely remove on-heap managed memory, keeping managed memory always off-heap.
This PR is based on #10161.
Brief change log

75d805dfaecb953e72cf84a4439e549a26118539: Code clean-up in ResourceProfile
90bc8b2063b03c8020838125c5023be08e3ec38a: Remove on-heap managed memory from ResourceProfile
18c831e2c2825b8164fe9c16b765d21bda1787c9: Remove on-heap managed memory from ResourceSpec
39e8b766d433f9b1f1b78a734192814f48b87566: Remove on-heap managed memory fraction from StreamConfig, and its calculation logic from StreamingJobGraphGenerator.
7fc053a1ab2c88104e0bcb1f17ad32750ac9cb36: Remove on-heap managed memory from TaskExecutorResourceSpec and TaskExecutorResourceUtils.
b497bde68f490bcbe21e05cd2d143eeb82603a35: Remove config options of managed memory off-heap size / fraction and legacy memory off-heap.

Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (yes / no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (yes)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
The S3 file system connector: (no)

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (not applicable)

Thanks for the review, @azagrebin.
I've addressed the comments, and rebased to the latest master branch.

Thanks @azagrebin. I don't think the test failures are related to this PR.
According to the travis report (#5151), the failed stages are core_legacy_scheduler and misc.

core_legacy_scheduler failed due to some travis problem. It has passed on the same branch and commit in my repository (#317).
misc failed on YarnDistributedCacheITCase, which is a new test case added and merged to the master branch yesterday.

I find another travis build (#5150) right before ours that also failed on the same problem.
To verify this does not cover other potential test failures, I disabled YarnDistributedCacheITCase and triggered the tests again, and it passed in this build (#318) this time.

The PR is updated to include a commit fixing the failed YarnDistributedCacheITCase.
Now travis passed: https://travis-ci.org/xintongsong/flink/builds/620614535

merged into master by 2142dc777119eac821f3de86e8bc577ae797c017


fix(i3): Send workspace cmd unconditionally on click

This makes polybar play nice with the i3wm feature workspace_auto_back_and_forth, and it is harmless when that option isn't set.

Thanks, this should make the approach in #758 obsolete.


--base-url has no effect

🐞 Bug report
The option --base-url has no effect.
Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [x] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

 Yes, the previous version in which this bug was not present was: 6.x.x
Description

The option --base-url has no effect on the e2e-command. Also the baseUrl-entry in the protractor.conf.js has no effect.
🔬 Minimal Reproduction

Create new project via ng new demo and there modify the e2e-script or the protractor.conf.js as described. It has no affect. The app is always started at http://localhost:4200 and the browser also opens this url.
I have to run the tests in a no-serve scenario on a different url.
🔥 Exception or Error

🌍 Your Environment

macos
<EMAIL_ADDRESS>
Anything else relevant?

@Michel73, most likely the root cause of this is that you have a devServerTarget specified. Hence it will always use the this.
Can you try ng e2e --dev-server-target="" --base-url="https://localhost:8080"?
I think we should emit an error when both base-url and dev-server-target are specified.


Instructions say routes are in ./src/routes/index.js

I can't find ./src/routes/index.js, but this file is mentioned as important here:
https://github.com/Elderjs/template/blame/master/src/routes/blog/getting-started.md#L15

@canadaduane Thanks again. Just pushed a fix to both of the issues.

Overhauled a large amount of the template this afternoon content wise to try and make sure things are clearer. Thanks again.


fix(): fix warnings and bugs in SampleList implementation

This PR fixes invalid @turbo execution in SampleList implementation that caused wrong matrix covariance estimation for multivariate and matrixvariate cases.

Codecov Report

Merging #68 (7b16d84) into master (cd86588) will decrease coverage by 0.48%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #68      +/-   ##
==========================================
- Coverage   73.73%   73.25%   -0.49%
==========================================
  Files         170      168       -2
  Lines        5133     5037      -96
==========================================
- Hits         3785     3690      -95
+ Misses       1348     1347       -1

Impacted Files
Coverage Δ

src/helpers.jl
55.45% <ø> (-2.76%)
:arrow_down:

src/distributions/sample_list.jl
89.87% <100.00%> (+0.02%)
:arrow_up:

src/macrohelpers.jl
58.69% <0.00%> (-19.31%)
:arrow_down:

src/ReactiveMP.jl
50.00% <0.00%> (-16.67%)
:arrow_down:

src/rule.jl
54.62% <0.00%> (-8.79%)
:arrow_down:

src/score.jl
88.23% <0.00%> (-7.22%)
:arrow_down:

src/rocket.jl
77.04% <0.00%> (-1.08%)
:arrow_down:

src/rules/gcv/k.jl

src/rules/gcv/w.jl

Continue to review full report at Codecov.

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


Restart dhcpd when Netio devices have restarted

If a Netio device (Moducop extension units or the microcontroller of CPU01) is restarted (due to firmware update or internal restart), the modules don't receive again an IP address from dhcpd. dhcpd should be restarted automatically when a Netio module restarts, e.g. by an udev rule

Problem solved with commit 23a69a6609d09a6e2a39025608fb8d89c279b134.


Implement resource permission evaluation in security

Description
Note: This requires that #4561 be completed in order to complete this task.
This task aims at adding relevant code changes in security plugin to set-up resource permission authorization. Here are the changes required:

RoleV7.java
This class will now define a new type of class: Resource (Use the class Index as reference)
Add this newly defined class as a property to the parent
ResourceAccessEvaluator.java (new file)
A new class that defines the evaluator method to verify the resource permissions.
This method should assume the resource names are passed in the request (the string list defined above).
If no resources are present in the list, it should assume that the plugin has not opted into this feature and so should bypass this authorization check to return a success response.
PrivilegeEvaluator.java
Modify evaluate() method to add a check that calls the evaluator defined above.

Relevant unit tests must be added to consider this task as complete.

[Triage] Hi @DarshitChanpura, thanks for filing this issue. This looks like it is a subtask for the linked meta so I will mark as triaged.


Function body - Function 4

rather than displaying a part of output as table, incorporated the output in the plot


feat: day 10 part 2

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

120 of 131 (91.6%)  changed or added relevant lines in 1 file are covered.
9 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.2%) to 84.438%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/bin/10.rs
120
131
91.6%

Files with Coverage Reduction
New Missed Lines
%

src/bin/10.rs
1
94.09%

src/shared/mod.rs
8
17.42%

Totals

Change from base Build<PHONE_NUMBER>:
-0.2%

Covered Lines:
1796

Relevant Lines:
2127

💛  - Coveralls


Capstone week 9 d1

Tests fix by @AndrzejPodo

Lets merge this after changing the base?

Lets merge this after changing the base?

yep, let's merge

Merging this as there are no conflicts and we have reviewed before,.


Consistent unique VM identification

Author Name: Rolandas Naujikas (Rolandas Naujikas)
Original Redmine Issue: 4494, https://dev.opennebula.org/issues/4494
Original Date: 2016-05-27

At least in KVM and Xen VM UUID, as seen with dmidecode, is changing every time VM is powered up.
If we are using some software in VM, licensed per machine UUID, that could cause problems.
Solution would be to generate UUID at VM creation time and keep it persistent in VM lifetime.
As a workaround we can add for KVM
RAW = [
  TYPE = "kvm",
  DATA = "<uuid>564d0a8b-f8de-ce9a-ecc2-cf7ebc0e4c83</uuid>"
]

or for Xen
RAW = [
  TYPE = "xen",
  DATA = "uuid='564d0a8b-f8de-ce9a-ecc2-cf7ebc0e4c83'"
]

but there are no way to generate and set it up in opennebula hooks.
P.S. For imported VMware VM it is preserved.

Description
Libivrt uses random UUID to identify the domain, this UUID is visible in VM inside the DMI tables:
Handle 0x0100, DMI type 1, 27 bytes
System Information
	Manufacturer: Red Hat
	Product Name: KVM
	Version: RHEL 7.6.0 PC (i440FX + PIIX, 1996)
	Serial Number: Not Specified
	UUID: 44acc9b5-0d6b-4a06-b287-e972776c84c6
	Wake-up Type: Power Switch
	SKU Number: Not Specified
	Family: Red Hat Enterprise Linux

and, it's used to generate machine-id
# systemd-machine-id-setup
Initializing machine ID from KVM UUID.

# cat /etc/machine-id
44acc9b50d6b4a06b287e972776c84c6

Because VMs are just libvirt transient domains, this UUID is not persisted among life cycle states which destroy and recreate the domain (power off -> resume). Same OpenNebula VM can be provided with different unique identifications during its life-cycle.1
Use case

Persistent VM identification for licensing purposes (Windows?)
Distinguish between new and resumed VMs to select proper recontextualization (full / partial)
Be able to detect new VM instance to trigger (optional) ad-hoc refresh of secrets (SSH host keys, machine-id) to improve security.

Interface Changes

UUID should be possible to specify in VM template (e.g., for persistent VMs)
Otherwise UUID is automatically generated and passed to domain XML
NICE TO HAVE For existing infrastructures, get domains UUIDs via monitoring and ensure it's already used after power-off and resume.

Progress Status

[ ] Branch created
[ ] Code committed to development branch
[ ] Testing - QA
[ ] Documentation
[ ] Release notes - resolved issues, compatibility, known issues
[ ] Code committed to upstream release/hotfix branches
[ ] Documentation committed to upstream release/hotfix branches

PRs to merge:

one: https://github.com/OpenNebula/one-ee/pull/765 https://github.com/OpenNebula/one-ee/pull/766

Sunstone done


Provided more elaborate Solver exportation capabilities

Also re-factored exportation apart from the process constraints as a help with increased code reuse.
@lperron Thanks for bearing with me exploring whether to expose ConstraintSolverParameters. Possibly there is a path there to obsolete export_file(), but I will leave that for future consideration.
For now, please find this PR with changes that support caller driven exportation.

Addresses ExportModel elaboration issue.

A bit too  intrusive to my taste :-(
I have changed a bit the export API to have the CP model as a return
parameter.
I also swiged it in C#
This way you can write:
Solver solver = new Solver("TestConstraint");
IntVar x = solver.MakeIntVar(0, 10, "x");
IntVar y = solver.MakeIntVar(0, 10, "y");
solver.Add(x + y == 5);
CpModel model = solver.ExportModel();

And serialize the model any way you like using the C# protobuf API.
I hope this fits the bill.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
2017-03-24 11:30 GMT-04:00 Michael Powell<EMAIL_ADDRESS>
Addresses ExportModel elaboration
https://github.com/google/or-tools/issues/349 issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/pull/348#issuecomment-289055796, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKj17VmDnnnSFP0Z2auTHJfNLRGQ72XHks5ro-GAgaJpZM4MoZIa
.

@lperron Well,  I'd like to see it in action before signing off on it. Is the change committed yet that I can pull and check it out? I insist on at least being able to specify the file name apart from the parameters. I've got a similar thing in the works for the LoadModel. Thanks!

@lperron Notwithstanding passing file name in, an obvious next question is this: this yields the CpModel protobuf only? How then to actually save it to file? The problem is with SWIG, we lose visibility of the underlying C++-iness, class relationships, etc.
I will close this PR, but please expect another one addressing these concerns.
Thanks!

No, the protobuf you get is in C#
See: https://developers.google.com/protocol-buffers/docs/csharptutorial
especially the parsing and serialization section.
I hope this helps
--Laurent
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
2017-03-24 14:50 GMT-04:00 Michael Powell<EMAIL_ADDRESS>
@lperron https://github.com/lperron Notwithstanding passing file name
in, an obvious next question is this: this yields the CpModel protobuf
only? How then to actually save it to file? The problem is with SWIG, we
lose visibility of the underlying C++-iness, class relationships, etc.
I will close this PR, but please expect another one addressing these
concerns.
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/pull/348#issuecomment-289112977, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKj17YTbU9dsXa_NiLW2WfFEjb85Y8QLks5rpBCRgaJpZM4MoZIa
.

@lperron No it doesn't, because the type that is seen masking the CpModel has no knowledge anything in the Google.Protobuf library. That's all under the hood in the core C++ API.

@lperron Side note, I don't mind exposing this via the SWIG-ified C++ API as long as we can get to it. This is the limitation of SWIG, as cool as it is, we'll work within those constraints.

Actually, I do generate the c# protobuf code in
src/gen/com/google/ortools/constraint_solver/Model.g.cs
It may not be a pure .NET code, (which I doubt), but it is not linked in
any way with swig.
And the serialization API do work in C#, as stated in the above
documentation.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
2017-03-24 15:00 GMT-04:00 Michael Powell<EMAIL_ADDRESS>
@lperron https://github.com/lperron No it doesn't, because the type
that is seen masking the CpModel has no knowledge anything in the
Google.Protobuf library. That's all under the hood in the core C++ API.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/pull/348#issuecomment-289115594, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKj17eofId0MlppdyKsqWZJMaKCov2Xnks5rpBLjgaJpZM4MoZIa
.

@lperron I am building just now. I will circle around either with praise, or critique, as the case may be. Giving you the benefit of the doubt here, but I've got questions.

@lperron Okay, so a little feedback. It works great! Thank you. I believe it is even saving the name for variables, constraints, etc. That's super important especially when re-loading and aligning with model expectations.

@lperron Thinking out loud, I suppose one must have at least one visitor to capture a solution, correct? Then possibly also the decision builder? In other words, there would never be a case where we only had a decision builder?
Okay, this will satisfy the WriteTo use case. Now on-wards to a ReadFrom (?) use case, provided there is such a thing.


Elliptic ScalarMult function availability in other languages

Sorry, this isn't exactly on topic - I'm just desperate. I've been trying to convert this library to Java so I can natively run this on Android. I'm stuck on the elliptic.P256().ScalarMult function. I can't find an equivalent elliptic P256 scalar multiply function in bouncy castle or any other crypto library. Any help or direction to go looking in would be greatly appreciated.

Hi @joshendy
Could you perhaps share your Java version? I try to implement the signed command in JJ (NodeJS) and can't find what's really needed to build the correct base64 body. Many thanks :-)

Whoops. Bouncy castle's default ECMultiplier works fine as a replacement.


extract a font layer and reimplement the bricks font

Inspired from https://github.com/race604/clock-tui/issues/14#issuecomment-1216514274 by @wezm, I want to extract a font layer to make it open to other styles of font.

Looks good 👍


Add 'Syntax' data type.

Something along these lines? References #9 .

Coverage decreased (-0.8%) to 84.566% when pulling a5e1e0c7d6a8230e750122414a46a05bbd072f6c on hit023:cleaner-imports into 0468c68f1df8cb7d07d746085e020bc219daae33 on parsonsmatt:master.

Coverage decreased (-0.8%) to 84.566% when pulling a5e1e0c7d6a8230e750122414a46a05bbd072f6c on hit023:cleaner-imports into 0468c68f1df8cb7d07d746085e020bc219daae33 on parsonsmatt:master.

Coverage decreased (-0.8%) to 84.566% when pulling a5e1e0c7d6a8230e750122414a46a05bbd072f6c on hit023:cleaner-imports into 0468c68f1df8cb7d07d746085e020bc219daae33 on parsonsmatt:master.

Coverage decreased (-0.8%) to 84.566% when pulling 6126353fbeb6a126cd3f3b412508f83d4bd1bcbf on hit023:cleaner-imports into 0468c68f1df8cb7d07d746085e020bc219daae33 on parsonsmatt:master.


Errors with latest version of rx/js

I get 2 type errors when using this with rx/js.

Heya, this package is not being maintained anymore. Please have a look at https://github.com/angular/devkit/tree/master/packages/angular_devkit/build_optimizer instead. The code that was in NGO was moved there.
I'll add a warning to the readme.


What's the catch?

Is this faster than all C/Java/Rust implementations out there?

Your experience will vary depending on what kind of logic you put there in Python. There definitely exist faster implementations for those 3 languages you mentioned.
You can look here for some 3rd party benchmarks against other languages:
https://github.com/the-benchmarker/web-frameworks
and https://www.techempower.com/benchmarks/#section=data-r17&hw=ph&test=plaintext


feat(optimizer): use json file for optimizer testing

Use json file for optimizer testing so we don't need to dump much json string in the codebase.

+1 for include_str!


Add DBB testcases

Description

Add BDD test coverage for the main functionalities of the notification service. The added test suites cover:

expected behaviour for the CLI arguments
ability to display / cleanup records from the DB on demand or when the service starts.
basic behaviour of the notification service

Fix bug in reports retrieval for each cluster in the cluster list

Type of change

Bug fix (non-breaking change which fixes an issue)
Behavioral tests

Testing steps
For testing these changes, the following are required:

local instance of insights-content-service listening on port 9092
kafka broker with the platform.notifications.ingress topic created
prometheus push gateway listening on port 9091
run cd bdd_tests && ./run_tests.sh

Checklist

[ ] make before_commit passes
[ ] updated documentation wherever necessary
[ ] added or modified tests if necessary
[ ] updated schemas and validators in insights-data-schemas in case of input/output change

Whole venv? :)

Whole venv? :)

I have this bad habit: "git add *" :P

it's mix from notification writer service BDD, right?

Yep. I ended up copying the folder and adding what makes sense, that way there's more coverage than with the 5 scenarios I thought of some months ago.

it's mix from notification writer service BDD, right?

Yep. I ended up copying the folder and adding/removing/modifying what makes sense, that way there's more coverage than with the 5 scenarios I thought of some months ago.

hmm ok. I'm just thinking about some unification/refactoring.

Merging the change.
Changes for using it in make test and in travis CI in follow-up PR


Fix/Add Documentation on IP Filtering in API Management when using an Application Gateway

Hello there,
I wanted to report that the policy sample found on this microsoft doc does not work as-is, and results in an error message when i try to add it to an API in APIM because of the {{ipValidated}} variable used in the policy sample. This is the error message I get when i literally try and copy/paste into an APIM API Policy:
One or more fields contain incorrect values: Error in element 'value' on line 20, column 14: Cannot find a property 'ipValidated'
On top of that, this policy sample is needlessly complicated, I was able to acheive the same results with much less complexity. See my WORKING policy below, which is much simpler:
<set-header` name="X-Forwarded-For" exists-action="override">
            <value>@{
            string headerValue = context.Request.Headers.GetValueOrDefault("x-forwarded-for","");
            string[] sourceIP = headerValue.Split(':');
            if(sourceIP.Length == 2)
            { headerValue = sourceIP[0]; }
            return headerValue; }</value>
    </set-header>
    <check-header name="X-Forwarded-For" failed-check-httpcode="403" failed-check-error-message="Unauthorized IP Address" ignore-case="true">
            <value><IP_ADDRESS></value> <!-- This is just a random IP, replace this with the ips you WANT to be allowed through. Anything not in this list will be blocked with a 403 and the message"Unauthorized IP Address"-->
    </check-header>

The WORKING policy above was incredibly difficult to figure out since the documentation on App gateway+APIM ip filtering is so lacking.
Please update the policy sample so that it is WORKING, and maybe simplify it a bit so it isn't so needlessly complex. Also, please provide more documentation on what the original sample policy it is actually doing. What are the IP ranges in the set-header policy even meant for? Very confusing.
An application Gateway fronting APIM seems like a common architecture based on your own documentation on app gateways fronting APIM in an internal virtual network. Why is documentation on how to handle this situation so sparse if it is a recommended architecture?
This is literally the only documentation out there on how to handle ip filtering with an App gateway+APIM architecture, and the sample policy provided doesn't even work out of the box. Please improve this doc, and please add more documentation on how to achieve this for large IP ranges (<IP_ADDRESS>/16). It is not feasible to add a <IP_ADDRESS> for each individual ip in a range that size.

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

ID: 54701509-aa7f-7ece-4a56-57d14613b5f8
Version Independent ID: b38d7498-0e6e-956f-4dea-0a4ef82164e2
Content: Sample API management policy - Filter on IP Address when using Application Gateway - Azure API Management
Content Source: articles/api-management/policies/filter-ip-addresses-when-using-appgw.md
Service: api-management
GitHub Login: @dlepow
Microsoft Alias: joscot

@8BallDuVal
Thanks for your feedback! We will investigate and update as appropriate.

@8BallDuVal {{ipValidated}} is named value and you can define whatever value you want to use.
Here is the little explanation on the policy:
The <check-header> policy checks for exact values as opposed to IP ranges. The policy code checks the value of X-Forwarded-For header and validates it against a list of IP ranges. If the IP passed in X-Forwarded-For matches the allowed range, the policy code will write a "dummy" IP address (which is from the valid range) into X-Forwarded-For header so that the <check-header> policy will pass. The dummy IP address will not be written to header if the incoming request has an IP address in X-Forwarded-For that is NOT in the allowed IP range so the <check-header> policy will block the request.
There is a similar discussion in other thread also. I agree with your feedback that we can more info about named value, logic behind the policy.
@dlepow We will need to add these details to the doc. Your thoughts?

@mumurug-MSFT Thanks for the details and explanation. Before @dlepow updates the docs, I have a few more questions/suggestions for you based on your response:

{{ipValidated}} is named value --> **Thanks for the info about named values, that should definitely be explained in the doc, I had no way of knowing what that was for until you just explained it and google/bing was not coming up with anything useful.
{{ipValidated}} is named value and you can define whatever value you want to use. --> **You stated that I can define any value I want to use, but I am assuming the code is expecting this to be an IP address. Is this supposed to store the "dummy" IP value that should be within the IP ranges we are checking against? I am still unsure what is expected to be defined in this "named value", and what its purpose is. If it's a named value, this is set ahead of time and the value is static, right? So are we setting the "dummy" ip in a named value that we want to return in the x-forwarded-for header? This is very confusing to me. **
The  policy checks for exact values as opposed to IP ranges. --> **Correct, that was part of my confusion. In the doc, there are two IPs (<IP_ADDRESS> and <IP_ADDRESS>) defined as values for the policy to check against, and below that is the {{ ipValidated }} named value. Those first two IPs are not within any of the ranges defined earlier in the policy, so it is confusing when looking at this policy to know what those are for. I am still confused about the {{ ipValidated }} named value since it sounds like "named values" are static and defined ahead of time. Not sure where/how the "dummy ip" (within the correct IP range) is generated/written to the header. **
So just to make sure I am understanding, in the set-header policy in this doc, there is a List (array) called cidrList with some IP ranges defined. I am assuming that these are the IP address ranges we want to ALLOW? It is not clear from the doc what these are being used for, it would be helpful to include in the comment above that these are the IP ranges that we want to ALLOW.
If the IP passed in X-Forwarded-For matches the allowed range, the policy code will write a "dummy" IP address (which is from the valid range) into X-Forwarded-For header --> **Why is a "dummy" ip address (from the valid ip range) written to x-forwarded-for header instead of the actual IP address that matched the range we were checking? I am not sure I am following the reasoning behind that, and I don't even see in the code where this "dummy" ip within the correct range is being set. That seems like it will cause unnecessary confusion when troubleshooting. For example, we are using Application Insights to monitor the logs and we are using the X-Forwarded-For header to view the caller's IP address on each api. If we overwrite that header with a "dummy" IP in the range, that could cause unnecessary confusion when troubleshooting. Ideally, the caller's ip address in the X-Forwarded-For header should stay there when the request is blocked AND when it's successful. **

Thanks again for responding so quickly and providing a decent explanation of what is going on.
I really think many people will run across this doc since the app gateway + APIM in internal mode architecture is literally recommended by microsoft. IP filtering is a crucial capability for API management, and every single person who uses this architecture is going to run into this problem since the built-in ip-filter policy cannot filter IPs when APIM is fronted by an app gateway. When using a recommended architecture, it shouldn't be this difficult/confusing to do something simple, like filter IPs. This sample policy in this doc feels like it should only be used as a temporary workaround instead of a long-term solution.
In all honesty, the ip-filter policy really needs to be updated to work with this architecture. At the very least, update the built-in ip-filter policy to allow us to filter IPs that are in the X-Forwarded-For header.

@mumurug-MSFT @YashikaTyagii Any Updates?

@8BallDuVal - Apologies for slow response. I appreciate the detailed feedback you've provided and apologize for any confusion caused by our docs. Although I'm not able to respond in detail to each of your points, please consider:

This article and others in this section were based on community-contributed samples in this GitHub repo. To clarify that these policies are examples only, we have recently "retired" the articles and redirected users directly to the open-source GitHub repo. This change was planned well before you raised your issue.
The use of "named values" ({{...}}) in some snippets is mentioned in the Readme of the GitHub repo.
As a community member, please feel free to open an issue on any policy snippet in the repo. And if you wish to contribute your alternative example, please submit a PR. Contributions are welcome!
If you would like to raise a feature request about the ip-filter policy, please submit at https://aka.ms/apimwish. This is the best way to make feature requests to the engineering team.
The scenario for Application Gateway in front of API Management is indeed an important one and a recommended architecture for certain environments. We regularly review and update the documentation for this scenario. I've captured your feedback about needing more explanation around IP filtering in our backlog.

Since we've captured your feedback in our backlog, I'll now proceed to close this issue. Thanks again for your detailed comments!
#please-close


chore: Bumps react-dev-utils to 11.0.4

#minor
[INFO] |CVE-2021-24033                          |react-dev-utils 7.0.5                   |High

Coverage remained the same at 52.935% when pulling 36d6ce9a0089a15cf65ab7dd5d10b12c09ea3f79 on cwhitten/bump-react-dev-utils into fadb7c56182588f0aa0c2bbad5b8634e00539484 on main.


Wireguard starts, but sends no packets to other peers

Description
I installed the synology-wireguard for the device. All seems to be going well, but when I start it up, wireguard doesn't send any packets over the connection. It's as if it doesn't even try.
Steps to reproduce
$ ssh user@nas
$ sudo wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add <IP_ADDRESS>/24 dev wg0
[#] ip link set mtu 1420 up dev wg0
$ sudo wg show
interface: wg0
  public key: <redacted>
  private key: (hidden)
  listening port: 51820

peer: <redacted>
  endpoint: <public_ip_of_peer>:51820
  allowed ips: <IP_ADDRESS>/32

Expected behavior
wireguard should send out packets to the <public_ip_of_peer> on port 51820. Instead it's not sending out anything.
tcpdump -i eth0 port 51820
doesn't show anything at all. eth0 is the correct interface.
Pinging to <public_ip_of_peer> works fine. Connecting with wireguard to that peer from another machine works fine as well.
Synology NAS model
DS1819+
wg0.conf
[Interface]
Address = <IP_ADDRESS>/24
SaveConfig = true
ListenPort = 51820
PrivateKey = <redacted>

[Peer]
PublicKey = <redacted>
AllowedIPs = <IP_ADDRESS>/32
Endpoint = <redacted>:51820

Small update : I tried compiling it using the docker image. That compile went well, package installs perfectly, but still no packets are being sent.
When I make it connect in the other way (the peer connecting to the Synology), the Synology sees a connection, but it still doesn't send packets back. It's as if it can receive, but not send.
The firewall is completely disabled, iptables -L -v shows nothing at all and defaults to ACCEPT on all targets.

It sounds like you are encountering the "race condition" (for lack of a better explanation). If you look at this issue thread (https://github.com/runfalk/synology-wireguard/issues/10) a lot of users have solved this by manually adding a route after wg-quick up.

Thanks, it looks like that's the issue. Very odd thing...


U+0457 slab - add glyph

added by @dok42 in https://github.com/source-foundry/alt-hack/commit/962a971be7ec2a7d2fff48bf5d3cb49ae33b6587