API for variable number of returns in linalg

Feedback from @mruberry: it may be nice to support always returning the same type from functions like Cholesky, with tensors accessed by names. That way frameworks could return additional tensors and there wouldn't be BC-compatibility issues if more tensor returns are added later. This suggestion, however, comes from a place of "it'd be nice if people wanted to use this API", as opposed to the perspective of, "this API is a lowest common denominator only intended for library writers."
cholesky always return a single array, so I thought it'd be fine - but the comment may be related to https://github.com/pytorch/pytorch/issues/47608 (desire to return an error code rather than raise a RuntimeError for failures). For qr, svd and perhaps some more functions there's the related issue of different returns based on keywords. Using a class to stuff all return values in is a common design pattern for, e.g., scipy.optimize. I'm not convinced it's a good idea for the linalg functions here, but worth considering at least.

I don't understand the technical details of that pytorch issue. Does it mean that any API that raises an exception is potentially problematic?

I don't understand the technical details of that pytorch issue. Does it mean that any API that raises an exception is potentially problematic?

Yes, because checking for the exception will cause a cross-device synchronization, which PyTorch tries very hard to avoid. In PyTorch also have cases where error-checking occurs exclusively on the CPU to avoid this issue.
We intend to keep np.linalg-like error-checking behavior (with a warning that it causes cross-device synchronization) but also offer _ex variants that avoid it. For example, torch.linalg.cholesky and torch.linalg.cholesky_ex, the latter of which performs no error checking but returns the info required for error-checking as an array (tensor) on the device. This lets the user perform their own error-checking (or not).

Now that there are a number of PRs up for linear algebra functions, it looks to me like the issues with variable number of returned values, order of returns, and transposes within the array even for matches shapes:

svd: NumPy and PyTorch order the returned tuple (u, s, v), while TF orders as (s, u, v) (see gh-114).
svd:TensorFlow returns both the left and right singular vectors in columns. NumPy returns the left singular vectors in rows.
lstsq: what gets returned is wildly different, gh-119 lists six variations.
pinv: mostly okay for array/tensor libraries, but SciPy returns rank in addition to the pseudo-inverse (see gh-118)

Some of the linalg functions that are still to be done (e.g., qr) also won't be pretty.

For example, to accommodate returning yet another function from linalg.svd would be easy if the object returned from svd only allowed access to its tensor elements by name.

This would have some advantages:

We would not have to worry about differences in order of returns
It would allow adding more return values in the future
It could avoid issues with wanting different behaviour on accelerators, like the _ex variants that don't do error checking. This could still be the same function then, with an extra keyword - nicer than extra functions.

Disadvantages:

It would be a bigger deviation from existing APIs
It's harder to support with type annotations
The API would be weird for functions returning a single array.

And what it doesn't solve:

Content of a particular returned array, like row vs. column layout as for svd

Overall, I'd still lean towards not returning custom objects. The future extensibility is be the most compelling reason to consider it though.

Another option would be to always return a tuple that contains only the requested tensors, but I think this is a confusing and potentially dangerous UX.

I agree, not a fan of this option.

Now that there are a number of PRs up for linear algebra functions, it looks to me like the issues with variable number of returned values, order of returns, and transposes within the array even for matches shapes:

svd: NumPy and PyTorch order the returned tuple (u, s, v), while TF orders as (s, u, v) (see gh-114).
svd:TensorFlow returns both the left and right singular vectors in columns. NumPy returns the left singular vectors in rows.
lstsq: what gets returned is wildly different, gh-119 lists six variations.
pinv: mostly okay for array/tensor libraries, but SciPy returns rank in addition to the pseudo-inverse (see gh-118)

Some of the linalg functions that are still to be done (e.g., qr) also won't be pretty.

For example, to accommodate returning yet another function from linalg.svd would be easy if the object returned from svd only allowed access to its tensor elements by name.

This would have some advantages:

We would not have to worry about differences in order of returns
It would allow adding more return values in the future
It could avoid issues with wanting different behaviour on accelerators, like the _ex variants that don't do error checking. This could still be the same function then, with an extra keyword - nicer than extra functions.

Disadvantages:

It would be a bigger deviation from existing APIs
It's harder to support with type annotations
The API would be weird for functions returning a single array.

And what it doesn't solve:

Content of a particular returned array, like row vs. column layout as for svd

Overall, I'd still lean towards not returning custom objects. The future extensibility is be the most compelling reason to consider it though.

Another option would be to always return a tuple that contains only the requested tensors, but I think this is a confusing and potentially dangerous UX.

I agree, not a fan of this option.

Didn't think of this before, but at least there's now a natural Python way for the "return custom objects" option - using dataclasses. All you'd need is:
@dataclass
class SVDResult:
    s: array
    u: array
    v: array

Usage pattern if you just want a single returned array in the rest of your code:
s = svd(x).s

and if you want them all, just carry around the object, or unpack:
x_svd = svd(x)
s, u, v = x_svd.s, x_svd.u, x_svd.v

That is more verbose, but there's an upside to that as well. For example for svd, there would be libraries where you'd otherwise have
s, u, v = main_namespace.svd(x)
u, s, v = arrayapi_namespace.svd(x)

which is probably more confusing than:
s, u, v = main_namespace.svd(x)
x_svd = arrayapi_namespace.svd(x)
s, u, v = x_svd.s, x_svd.u, x_svd.v

Didn't think of this before, but at least there's now a natural Python way for the "return custom objects" option - using dataclasses. All you'd need is:
@dataclass
class SVDResult:
    s: array
    u: array
    v: array

Usage pattern if you just want a single returned array in the rest of your code:
s = svd(x).s

and if you want them all, just carry around the object, or unpack:
x_svd = svd(x)
s, u, v = x_svd.s, x_svd.u, x_svd.v

That is more verbose, but there's an upside to that as well. For example for svd, there would be libraries where you'd otherwise have
s, u, v = main_namespace.svd(x)
u, s, v = arrayapi_namespace.svd(x)

which is probably more confusing than:
s, u, v = main_namespace.svd(x)
x_svd = arrayapi_namespace.svd(x)
s, u, v = x_svd.s, x_svd.u, x_svd.v

Didn't think of this before, but at least there's now a natural Python way for the "return custom objects" option - using dataclasses.

Which I think y'all decided was a sane idea @mruberry: https://github.com/pytorch/pytorch/issues/46187.

Didn't think of this before, but at least there's now a natural Python way for the "return custom objects" option - using dataclasses.

Which I think y'all decided was a sane idea @mruberry: https://github.com/pytorch/pytorch/issues/46187.

Comment copied from gh-18:

Another alternative is to simply return a dictionary.

That's a bit nicer static typing wise, but clunkier API wise (result.x is nicer than result['x'], and the __repr__ is worse for dicts).

Comment copied from gh-18:

Another alternative is to simply return a dictionary.

That's a bit nicer static typing wise, but clunkier API wise (result.x is nicer than result['x'], and the __repr__ is worse for dicts).

I re-read https://github.com/pytorch/pytorch/issues/46187, and PyTorch deviated on purpose from NumPy in the new design by always return a tuple with the max number of elements if there's a boolean keyword to control number of returns in NumPy (e.g., svd(x, compute_uv=False) return an array in NumPy and a tuple (tensor([]), S, tensor([]) in PyTorch. The rationale is that this is much easier for the JIT; doing overloads on the boolean keyword is a pain.
The conclusion from that issue was that indeed dataclasses would be desirable long-term.

I re-read https://github.com/pytorch/pytorch/issues/46187, and PyTorch deviated on purpose from NumPy in the new design by always return a tuple with the max number of elements if there's a boolean keyword to control number of returns in NumPy (e.g., svd(x, compute_uv=False) return an array in NumPy and a tuple (tensor([]), S, tensor([]) in PyTorch. The rationale is that this is much easier for the JIT; doing overloads on the boolean keyword is a pain.
The conclusion from that issue was that indeed dataclasses would be desirable long-term.

Still discussing, PyTorch may change the above to the NumPy-compatible behaviour.

Still discussing, PyTorch may change the above to the NumPy-compatible behaviour.

@rgommers I believe we've addressed this issue in recently merged PRs. Notably, only return namedtuples when namedtuples are necessary (i.e., multiple return arrays); otherwise, just return an array. If libraries want to return other info (e.g., error info), they can expose a different API.
So, I believe we can close this.

Yep, yay for svdvals:)
There's only one function left with a return_xxx or compute_xxx kind of keyword:
def unique(x, /, *, return_counts=False, return_index=False, return_inverse=False):

but there's little we can do about that one.
Thanks for the suggestion @mruberry!


Implement a Data Source Interface and add the data from the FOSSASIA and Freifunk Api to loklak through the interface

Here is an idea draft how data can be added through the interface.

This issue is related to https://github.com/loklak/loklak_webclient/issues/205

the server part which receives this information is described in https://github.com/loklak/loklak_server/issues/35

FOSSASIA/Freifunk API data consist of community json files that follow this specification https://github.com/fossasia/api.fossasia.net/blob/master/specs/1.0.1.json.
To be short, this is the complete list of properties :

api metadata (api version)
community name
metacommunity (bigger community that this community belongs to)
location (city, country, address, coordinates)
contact info (email, facebook, twitter, phone, irc, ..)
webpage url
timeline (lifetime events something like date of birth or other important milestones)
feeds (blog, forum, ics, podcast, wiki, ..)
state : the state of the json file (last-changed, open-closed for public), logo, community description

To integrate FOSSASIA/Freifunk API data into loklak, a few questions come up :

what kind of adapter / processor need to be written to dump the data into loklak ?
where's the part of code should I look at for examples of these kinds of adapter ?

Just to clarify things a bit, API data consist of a lot of information about a community, like names, location, services. From the name and location, a community map was built, and now we want to add some filters to it (by country, by tech area..). Sometimes we want to retrieve data directly from services as well (rss, ics feeds..).

@zyzo

what kind of adapter / processor need to be written to dump the data into loklak ?

What is your proposal?

where's the part of code should I look at for examples of these kinds of adapter ?

We are just getting started with it.

Just to clarify things a bit, API data consist of a lot of information about a community, like names, location, services. From the name and location, a community map was built, and now we want to add some filters to it (by country, by tech area..). Sometimes we want to retrieve data directly from services as well (rss, ics feeds..).

How can we pump all this data to loklak? Actually we diverted from the original meaning of "API" a bit and also included more to it. In my opinion - let's focus with the API on the core topic and let other services display the data e.g. the Freifunk blog, Loklak and others.

@sudheesh001 Why has this been closed? Where can I test the implementation?

@mariobehling I think this got closed because of the term Fix #206 which was present in the pull request content https://github.com/loklak/loklak_webclient/pull/259 I've been adding a label Checked in case it works and is actually supposed to be closed.

@sudheesh001 I think you meant #260 ?

This went live http://test.loklak.net/dataConnect

This is what current implementation looks like, with loklak_server new feature https://github.com/loklak/loklak_server/pull/83:

TODO :

option to modify the datasource directly from web client.
for geojson source, there is map_type parameter. User should be able to visualize it and modify it as well. This feature requires some more work on the server as the information about map_type is currently not saved.

This feature can be reviewed at http://loklak-client.danghaian.com/dataConnect
(Server : http://loklak-server.danghaian.com)

@zyzo Nice! loklak-client seems to be down though. Cannot test.

My bad, @mariobehling could you please test again ?

Login screen for twitter stays empty - cannot login.

There is an unknown problem with twitter auth indeed, but the datasource interface can currently work without logging in to twitter.

Ok, a few questions. I could see my connections without logging in.

Where does the data of http://cmap-fossasia-api.heroku.com/ffGeoJsonp.php come from? How is it generated?
What does the user have to do in "source type"? How should a user know what to do here?
What does a user have to do in mapping rules and tweet field?

@mariobehling  :

when adding new data source (Add Data Source), the source is pushed via api/push/geojson.json. The geojson push servlet do two things : save the messages & the import profile (information about source url, created time, source type, harvesting frequence.. cf. https://github.com/loklak/loklak_server/issues/35). Then the list of import profiles are retrieved via api/import.json and displayed in the data source page.

source_type is a necessary information when pushing messages as geojson. The assumption is that the user has a data file in geojson format, that he wants to import. In order to do that, he must know what is the source_type of the source (Twitter, Fossasia, Freifunk, ..).

The mapping rules are optional, but necessary, if the user file isn't compatible with loklak message type (which is twitter's like).

In short the interface is a visual way to construct push query to api/push/geojson.json (more about it here http://loklak.org/api.html#geojsonpush). The interface will change to accommodate new servlets api/push/fossasia.json, api/push/openwifimap.json, ...

@mariobehling

http://cmap-fossasia-api.heroku.com/ffGeoJsonp.php Whose server is it? Who creates this data ffGeoJsonp.php? Why do we need a server running php to offer data for loklak? How can we get the data directly from the communities in github. Think of the use case "I want to add my community to the map" (e.g. https://raw.githubusercontent.com/fossasia/fossasia-communities/master/Singapore/HackerspaceSG).

source_type is a necessary information when pushing messages as geojson. The assumption is that the user has a data file in geojson format, that he wants to import. In order to do that, he must know what is the source_type of the source (Twitter, Fossasia, Freifunk, ..).

I am sorry but you cannot expect the user to know all kinds of formats. Do you remember we had talked about a possible way to do this like mailchimp? We possibly want to support dozens of formats in future. Also FOSSASIA or Freifunk is just a name for nearly the same format. I see a) import, b) user, c) FOSSASIA. What does the user have to do in each "source type"? I do not understand what is import and user.

The mapping rules are optional, but necessary, if the user file isn't compatible with loklak message format (which is twitter's like).

This does not answer my question. You answer the question "Are the rules optional or necessary?".
My question is: What does a user have to do in mapping rules and tweet field? What information does he/she have to insert?

http://cmap-fossasia-api.heroku.com/ffGeoJsonp.php Whose server is it? Who creates this data ffGeoJsonp.php? Why do we need a server running php to offer data for loklak? How can we get the data directly from the communities in github

This is really just a json file that serves http://cmap-fossasia-api.herokuapp.com/ffGeoJson.json, nothing important (It is .php to deal with jsonp). And it is used to demo here because at the moment I could only push messages in geojson format. Now, there is /api/push/fossasia.json that can be used to push data in fossasia api format. The feature just got merged into master. As said I will accommodate this change into the dataConnect interface.
Then, user will be able to add pure fossasia api data.

I see a) import, b) user, c) FOSSASIA. What does the user have to do in each "source type"? I do not understand what is import and user.

Import and user shoudn't appear, I will remove them. They exist because SourceType was used for a different purpose SourceType.java.

What does a user have to do in mapping rules and tweet field? What information does he/she have to insert?

As explained in http://loklak.org/api.html#geojsonpush, the mapping rule (parameter map_type) is used to map fields in original data to loklak message data. For instance, if you have a field called name, that should be saved as screen_name of the message, then you can make it a rule. More discussion about map_type :
https://github.com/loklak/loklak_server/issues/55#issue-90898076
https://github.com/loklak/loklak_server/issues/55#issuecomment-122170771

Interface to add fossasia api data :

If no format is specified in route parameter /addConnection/:format, or if format=geosjon, user will get following form which is a little bit different :

Currently loklak-client is not available.
If the format is not specified, we should have a validation form, that automatically matches the right format. This can be a follow up issue. Regarding the import of API data, please have a look how other services like mailchimp do this: http://kb.mailchimp.com/lists/growth/import-subscribers-to-a-list

I added a setting form to let users change data format. It is opened when clicking on
the gear icon :

Automatically sniffing the right format is a nice idea ! But I think it won't be 100% reliable so we should still let user choose the format her/himself.

Ok, let's iterate and get this going in the above way first. Thanks!

It is now possible to add Freifunk & FOSSASIA data via the interface. Please refer to :

server side :  https://github.com/loklak/loklak_server/pull/77 https://github.com/loklak/loklak_server/pull/84
client side : #285 #325 #394


[feat,tests] Expose more information from FLAVA along with tests

Stack from ghstack (oldest at bottom):

-> #10
#9
#8

This PR does multiple things:

Adds tests for FLAVA pretraining and classification forward models
Exposes some of the important information from the model other than
losses. This will allow people to build stuff on top of flava
Fix image transform for pretraining and defaults for case of testing
Fix some issues with the complete end-to-end repo

Test Plan:
Tests have been added for the model
Differential Revision: D35363010

@ankitade has imported this pull request.  If you are a Facebook employee, you can view this diff on Phabricator.

@ankitade has imported this pull request.  If you are a Facebook employee, you can view this diff on Phabricator.

@ankitade has imported this pull request.  If you are a Facebook employee, you can view this diff on Phabricator.

@ankitade has imported this pull request.  If you are a Facebook employee, you can view this diff on Phabricator.


Update cursors-transact-sql.md

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

@rwestMSFT
Can you review this PR?
IMPORTANT: When this content is ready to merge, you must add #sign-off in a comment or the approval may get overlooked.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

private repo

Docs Build status updates of commit fc4eabd:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/t-sql/language-elements/cursors-transact-sql.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


feat: query acct history

What I did

Added BaseAddress.history, which fetches the relevant AccountHistory object
Re-route AccountHistory.outgoing through the query manager
Add a new method (raises NotImplementedError by default) to ProviderAPI to search through chain history and fetch transactions by account and range of nonces, and implement in Web3Provider (brute force method, very expensive)
Add support to the default query engine to source AccountHistory queries (by nonce) through either ExplorerAPI (if available) or via new brute-force method
NOTE: Change this functionality in ape-etherscan to QueryAPI, and remove from ExplorerAPI (non-breaking change)
Add AccountHistory.query for working with account history using a dataframe approach
6. (WIP) Add support to the cache query engine for storing and fetching AccountTransactionQuery results

fixes: #1237
fixes: APE-572
How I did it
I did this to take better advantage of the Ape query engine, and also provide more correct results in situations where an explorer wasn't available.
How to verify it
check the new feature acct.history on some local and public networks, with and without etherscan and the cache query engine
Checklist

[x] All changes are completed

[x] Add .query
- [ ] Add to cache provider

[x] New test cases have been added
[x] Documentation has been updated

NOTE: Can't implement cache querying until #994 is resolved

Note for reviewers:
bee06928d1ad5d0c655c69806208b3330856b08c is the big commit, adding a recursive algorithm for filtering blocks and finding transactions by nonce. After that, a bit of piping, and a refactor to move the ExplorerAPI method to the default query provider (take note of TODOs there). All actions within AccountHistory now source from the query provider (also some TODOs about sessional history). Lastly, added support for .query, __getitem__ (both index and slice), and finally a route from BaseAddress to AddressHistory to close the gaps for users

Just one of @ApeWorX/engineering needs to approve to merge

Testing issue: I connected to mainnet using Alchemy. I loaded my account with txns. And then I did this:
next(account.history.outgoing)

I got this error:
ChainError: 'stop=4' cannot be greater than account's current nonce (3).

(other feedback is small and nitpicky - mostly focused on testing)

believe I solved this with 723ef84

For some reason, acct.history[0] doesn't work

I ran some queries. Neat! What remains? This works a lot better than before 🙇🏻♀ .

Just this: https://github.com/ApeWorX/ape/pull/1277#issuecomment-1439448867
I think this is just affecting the detection of nonce = 0, the rest works

I do wonder how we can utilize a sessional cache to cache receipts from the slower HTTP-based caches (I saw your TODO). It could be opt-in.

I mean we have ape-cache. For permanently existing networks, the idea is that it pushes stuff to an SQLite DB, which is good for multi-session caching. Could implement a secondary cache provider (either extending the one under ape_cache or under ape/managers/query.py alongside DefaultQueryEngine) that's just an in-memory cache (with some cache expiration to limit RAM usage), but the thing holding ape-cache back is the layout of ReceiptAPI/BlockAPI/ContractLog data structures so that it's easier to serialize them to SQL
Also the query system needs a more general refactor of how data passes through it so that it only converts if/when necessary e.g. refactor all .query(...) methods to return Iterator[dict] (instead of a pandas DataFrame) and convert from Iterator[dict] to ReceiptAPI/BlockAPI/ContractLog if that's the intended output (usually we use columns = "*" and then cast to that type), or do obj.dict() if you want Iterator[dict] output. As long as the columns field is used appropiately this should have an issue (but obiously this might have some mypy issues with the approach)


Add a window switcher widget

This is based on elenapan window_switcher widget, modified it to add a thumbnail preview and to work nicely with bling. Let me know any further changes I need to make

Just to note down -
bling.widget.window_switcher.enable {}

-- Somewhere in ur keys ->

        awful.key({modkey}, "Tab", function()
            -- awful.client.focus.history.previous()
            awesome.emit_signal("bling::window_switcher::visibility",
                                mouse.screen)
            -- if client.focus then client.focus:raise() end
        end, {description = "Window Switcher", group = "client"})

@Kasper24 Also add yourself to [AUTHORS.md](https://github.com/BlingCorp/bling/blob/master/AUTHORS.md when your done.

I fixed all the issues you guys mentioned, refactored, reformatted, improved and add a lot more styling options. I'm not yet sure which options should belong to beautiful and which not, maybe @JavaCafe01 can help me with that?

@Kasper24 I think this PR is still in hold because it doesn't work on Awesome stable

@JavaCafe01 Fixed in the a83f7fc6c9c169754ebefefd44f88a6c66324d4f
It will look a little worse on stable, as vertical/horizontal_fit_policy didn't exist back then so the thumbnail wouldn't scale to fit correctly. There might be another way of doing this, but I'm not sure

@Kasper24 Before I do a complete review, just a few things. I liked how things were without the scroll widget - the text was wrapped and centered (the scroll widget also has an impact on performance, doesn't start in the center, and has some bugs). Maybe later on we can add a widget_structure thing like how @undefinedDarkness did it to allow for custom structures. Also, it would be nice if the client icon showed on the fallback as well (if it is supposed to, then this is a scroll widget bug).

@Nooo37

The titles won't show up on stable anymore. It worked yesterday even with the scroll container. Don't exactly know what changed.

I honestly don't know? I did make the name margins customizable and changed the default margins for the thumbnail type widget, but I don't see why if it breaks it would only break on stable?

On the git version, the previews are all squashed into the same ratio which distortes the content while they keep their ratio on the stable version. I don't know what the expected behavior here would be but I would be ok with both.

I commented on this here. I'll make this into an option, but is there a way I could also achieve the on stable?

Current iteration seems to work fine for me.

@Nooo37 Fixed at 1a94b02e2a8498c12a384fd9ef86c12cc0c29423


Update repository setup step for Linux Mint users

Proposed changes
Add a note to remind people using distributions derived from Ubuntu(Linux Mint)
to change the ubuntu-$(lsb_release -cs) part to their parent Ubuntu release
The output of $(lsb_release -cs) won't necessarily be a stable Ubuntu release, it would
sometimes be something like 'rafaelia' and there could be problems in the installation

Related issues (optional)
https://github.com/docker/docker.github.io/issues/1516

Thank you! 👍


Language Choice

Please remember the language I pick for further sessions, using cookies and whatnot.

My apologies, I neglected to respond in time, but I would like to keep this open. If not as a bug, then as a feature request.
I think that in this day and age, browsers should be as paranoid as possible, and rejecting third-party cookies is a part of that. To be frank, I consider third-party cookies to be an especially useless "feature" of the web. Your situation I assume does not allow for an easy alternative, but this does not mean that this alternative is acceptable. I don't think it is, and I don't think that anything violating these ground rules can be.
Using AJAX to access the cookie is still worse, since common add-ons don't work. In my case, my cookie manager has no way of noticing the AJAX cookie.
Yes I could whitelist them manually, but the problem is still a problem if I have to manually change my browser config to make it work.
Thanks for your time, and thanks for the great tool!

I'd have to rehost the app off of github.io since it's a static page and I can't generate cookies for it (as far as I know), and that would be too disruptive.
I'll leave this open for other people to comment on regarding ways to address this.


SKyperfect with 11.300 Ghz LNB

Environment

Version of Mirakurun: 2.x.x
Version of Node: v6.x.x
Version of NPM: x.x.x
Platform:
Architecture: x64

Issue
I can not get SKY signal (124E,128E)
I use TBS6922 with  LoF 11.300 Ghz LNB
How can I change it LoF
...

this is not QA forum.


Disable Bottom View In/Out Animation

We just started trying out RN. It seems in every nav library (mostly based on Navigation/NavigationExperimental) pushing a second view (V2) on the stack results in the first view (V1) slightly sliding behind while V2 takes over the screen. Likewise, popping V2 results in V1 sliding back. Can this animation be disabled (where V1 stays static while V2 slides in/out on top)?

Have you tried StackNavigator mode: 'modal'? The new screen comes from the bottom, and the old screen fades out, but it doesn't move.
Regardless, maybe we should add the ability to override the generic style interpolator of the Card?

The modal behavior is definitely closer to what I'm looking for (except wanting to slide from left/right instead of from bottom, and with a fixed header). Even being able to disable the fade would be awesome.

Closing in favour of #175

Whoops! Looks like this was never closed - doing some clean up 😄


sync examples for orchestartion refactoring

Changes proposed in this pull request:

udpate two class references

Pull Request Test Coverage Report for Build 2236

0 of 0   changed or added relevant lines in 0 files are covered.
15 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.07%) to 58.074%

Files with Coverage Reduction
New Missed Lines
%

sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/synctask/history/HistoryDataSyncTask.java
7
76.47%

sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/execute/executor/channel/MemoryChannel.java
8
51.85%

Totals

Change from base Build 1169:
-0.07%

Covered Lines:
11875

Relevant Lines:
20448

💛  - Coveralls


feat(compaction): per table vnode on compactor side

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
related to https://github.com/risingwavelabs/risingwave/issues/18888
This PR refactors the FilterKeyExtractor and leverages the existing Catalog capability to provide the ability to extract key and get vnode count.

Refactor FilterKeyExtractor to CompactionCatalogManager
Remove the enum of FilterKeyExtractorManager(RpcXXX, StaticXXX), simplify code logic
Introducing CompactionCatalogAgent to serve a compaction once, making it easier to test.
In Multi Builder, it is supported to get the corresponding vnode by table_id (vnode is calculated by Table catalog).

Checklist

[ ] I have written necessary rustdoc comments
[ ] I have added necessary unit tests and integration tests
[ ] I have added test labels as necessary. See details.
[ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features #7934).
[ ] My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
[x] All checks passed in ./risedev check (or alias, ./risedev c)
[ ] My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)

[ ] My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

[ ] My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

The vnode-related section looks good to me. Could we also add some tests with customized vnode counts?

Sure, Sure, I'm adding a UT for different table vnode counts, and since this logic only affects switch sst at the moment, the UT is only tested for this behaviour.


Random First Infected

Unless the player specifies the first infected player, it will choose a new random player every race without needing to disband and recreate the race

I see you added the fix yourself :)

Yeah you're right. Whoops :)


Can plots be saved as vector images rather than raster/bitmap format?

I'm trying to set up a pdf print module where the scottplot is included on the page.
Is it possible to include it as vector graphic?
I only found a solution to use a Bitmap, but the resolution isn't the best when zooming on the pdf.

Hi @KlaskSkovby, vector output is not supported at this time, and output is indeed currently limited to bitmaps (bmp, png, jpg, etc).
I'll leave this issue open to remind me to explore the topic a bit further though, because it may be possible to output an Image instead of a Bitmap, and Image can be exported as WMF which is a format that supports vectors. I'm not sure if all the drawing operations are vectorized in memory before they're finally rendered though, so I'll investigate this one. Thanks for the question!

Hi @KlaskSkovby, vector output is not supported at this time, and output is indeed currently limited to bitmaps (bmp, png, jpg, etc).
I'll leave this issue open to remind me to explore the topic a bit further though, because it may be possible to output an Image instead of a Bitmap, and Image can be exported as WMF which is a format that supports vectors. I'm not sure if all the drawing operations are vectorized in memory before they're finally rendered though, so I'll investigate this one. Thanks for the question!

Being able to save plots as vector graphics would be a great thing. For example people using ScottPlot would be able to directly include a plot into a publication quality document (using TeX/Latex for example).

Being able to save plots as vector graphics would be a great thing. For example people using ScottPlot would be able to directly include a plot into a publication quality document (using TeX/Latex for example).

Thanks for raising the question @KlaskSkovby!
Saving Vector Formats is not Currently Supported
I looked into this further, and although System.Drawing.Common can create WMF (vector) images and even display them, it looks like they cannot be saved as images.

Metafile Class: When you use the Save method to save a graphic image as a Windows Metafile Format (WMF) or Enhanced Metafile Format (EMF) file, the resulting file is saved as a Portable Network Graphics (PNG) file instead. This behavior occurs because the GDI+ component of the .NET Framework does not have an encoder that you can use to save files as .wmf or .emf files.

Supporting this is a long-term goal of mine though. A bit part of the work I've done from 4.0 to 4.1 is refactoring to make this path easier to go down in the future. After the features and API stabalize, I'd like to move toward optional support for Skia using SkiaSharp. Not only would this let ScottPlot save images as vector formats, but it would also let it be used on more targets (like Xamarin) and support hardware acceleration with OpenGL.
Improving Bitmaps in PDFs
@KlaskSkovby, I recognize your primary issue: a small plot looks bad in a PDF because when you zoom in it is blurry or pixelated. A workaround would be to increase the font size of the axis ticks, line widths, markers, etc. and save the plot as a higher resolution image. It's not a perfect solution, but it will probably give you a quick improvement.
See this example for how to customize tick and axis label fonts:
https://swharden.com/scottplot/cookbooks/4.1.5-beta/plottable_text.html#text_fonts

Yeah upscaling the plot was what I did with the png file and stored it in a dictionary which i'm getting the bitmap from when printing.
How ever I realised that the scottplot is using GDI graphic.
GDI graphic can i use directly in the pdf printer.
But can I store the plot window as GDI graphic?

can I store the plot window as GDI graphic?

You can get the plot as a Bitmap with FormsPlot.Plot.Render().
If you have an existing Bitmap, you can render onto it with FormsPlot.Plot.Render(yourBitmap)

GDI graphic can i use directly in the pdf printer.

It sounds like you're asking about how to print ScottPlot figures. Does code from this discussion help? https://github.com/ScottPlot/ScottPlot/discussions/769

Is this likely to make it into version 5?

Is this likely to make it into version 5?

ScottPlot 5 renders graphics using SkiaSharp.
It looks like the official SKSvg library is now deprecated
https://github.com/mono/SkiaSharp.Extended/issues/84#issuecomment-674318866
...so first-class SVG export support seems unlikely
However, lots of the logic in this library could be recycled (e.g., colors, axes, and the overall API) to create a separate SvgPlot and special ISvgPlottable that accomplishes similar functionality. The code gets way simpler if you intentionally omit features like mouse interactivity and multiple axes, so it would be some duplication, but not an extraordinary amount.
Hope it helps!

One, probably good option is to get hold of all graphic elements scotplot exposes (hopefully it does) and create matching pdf elements using a well-designed pdf creation library. Like this one. https://www.o2sol.com/pdf4net/overview.htm It is worth every penny.
I am new to ScottPlot and will start using it in order to check if and how elements are exposed in order to create matching PDF elements. The rest is simple like playing with Lego bricks.


Notification when points in range

Description:
The use case for this is to draw your attention to the Vault/Store page when you have more than a certain amount of points (ex. nearing the limit).
Implementation:

[ ] Trigger auto-spending of points OR
[ ] Simply change style of Store/Vault links
[ ] Warn when points are low
[ ] Warn when points are nearly full

Merged with #154


integrate (export chunk names for)  html-webpack-plugin`?

I'm trying to add  (generated by webpack-merge-and-include-globally) legacy js ( es5-legacy-global-script.<hash>.js:) file to my index.html
My config
new MergeIntoSingleFilePlugin({
        files: {
            "es5-legacy-global-script.js": [
// dozens of legacy js files here
            ],
        },
        transformFileName: (fileNameBase, extension, hash) => isProd ? `${fileNameBase}.${hash}${extension}` : `${fileNameBase}${extension}`,

I tried to use https://github.com/jharris4/html-webpack-tags-plugin
new HtmlWebpackTagsPlugin({ scripts: [{ glob: 'es5-legacy-global-script*.js', globPath: 'dist',  path:''}] });

but it works only when previusly such file (es5-legacy-global-script.<hash>.js) exist in dist folder
More over developer of  html-webpack-tags-plugin said that his plugin should be used for generating index.html tags for copied files, and  asked why webpack-merge-and-include-globally doesn't integrate with html-webpack-plugin by adding its (webpack-merge-and-include-globally) chunks to html-webpack-plugin ? see https://github.com/jharris4/html-webpack-tags-plugin/issues/69
Good question can webpack-merge-and-include-globally integrate with html-webpack-plugin ?
might be usefull https://github.com/jantimon/html-webpack-plugin#events

There's a workaround using HtmlWebpackTagsPlugin: https://github.com/markshapiro/webpack-merge-and-include-globally/issues/16#issuecomment-636084353
but it would be nice to have it integrated with html-webpack-plugin


Throw a Timeout error on send timeout instead of Error

Make it easier for upstream callers to detect the error type/originator of a send timeout.
error.type = 'FeathersError'
error.name = 'Timeout'

Awesome, thank you!


Ambiguity on the Content > Guidelines page

On the Carbon Design System > Content > [Guidelines](http://carbondesignsystem.com/guidelines/content/guidelines) page (under the "Do use simple tense" section) there is the following guidance:

If you need to use past or future tense, avoid verb tenses with the words have, has, had, been, should, would, and will.

But then the positive example provided for some past tense text does have the word "has" in it:

"The limit has been exceeded."

Are the two examples for past tense the wrong way around?

That's correct, seems we have mixed up those 2 terms and they should in fact be the other way around.
Thanks for finding that content bug! We'll work on getting it updated on the site.

Updated in Content Guidelines.


[SPARK-30439][SQL] Support non-nullable column in CREATE TABLE, ADD COLUMN and ALTER TABLE

What changes were proposed in this pull request?

Allow users to specify NOT NULL in CREATE TABLE and ADD COLUMN column definition, and add a new SQL syntax to alter column nullability: ALTER TABLE ... ALTER COLUMN SET/DROP NOT NULL. This is a SQL standard syntax:
<alter column definition> ::=
  ALTER [ COLUMN ] <column name> <alter column action>

<alter column action> ::=
    <set column default clause>
  | <drop column default clause>
  | <set column not null clause>
  | <drop column not null clause>
  | ...

<set column not null clause> ::=
  SET NOT NULL

<drop column not null clause> ::=
  DROP NOT NULL

Why are the changes needed?

Previously we don't support it because the table schema in hive catalog are always nullable. Since we have catalog plugin now, it makes more sense to support NOT NULL at spark side, and let catalog implementations to decide if they support it or not.
Does this PR introduce any user-facing change?

Yes, this is a new feature
How was this patch tested?

new tests

Test build #116172 has started for PR 27110 at commit d0204f4.

cc @rdblue @brkyvz @HyukjinKwon @viirya

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/20966/
Test PASSed.

Test build #116172 has finished for PR 27110 at commit d0204f4.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/116172/
Test FAILed.

+1

Test build #116289 has started for PR 27110 at commit eb00ac0.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/21080/
Test PASSed.

Test build #116289 has finished for PR 27110 at commit eb00ac0.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
 final class UpdateColumnNullability implements ColumnChange

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/116289/
Test FAILed.

Test build #116302 has started for PR 27110 at commit 22a4f1d.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/21093/
Test PASSed.

Test build #116302 has finished for PR 27110 at commit 22a4f1d.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
 final class UpdateColumnNullability implements ColumnChange

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/116302/
Test FAILed.

Test build #116310 has started for PR 27110 at commit 5156ab8.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/21102/
Test PASSed.

Test build #116310 has finished for PR 27110 at commit 5156ab8.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
 final class UpdateColumnNullability implements ColumnChange

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/116310/
Test PASSed.

Will you update the docs (e.g., sql-ref-syntax-ddl-alter-table.md) to document this syntax separately?

because the table schema in hive catalog are always nullable

Arguably, this is more used often rather than catalog plugin at this moment. Maybe it's best to document it together in the doc.

I checked and we don't have any document for ALTER COLUMN. Shall we add it in a different PR? It's more than just the new syntax added here.

Test build #116357 has started for PR 27110 at commit 0b047b5.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/21148/
Test PASSed.

Test build #116357 has finished for PR 27110 at commit 0b047b5.

This patch fails due to an unknown error code, -9.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/116357/
Test FAILed.

retest this please

Test build #116369 has started for PR 27110 at commit 0b047b5.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/21159/
Test PASSed.

Test build #116369 has finished for PR 27110 at commit 0b047b5.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/116369/
Test FAILed.

Test build #116386 has started for PR 27110 at commit 1832e16.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/21177/
Test PASSed.

Test build #116386 has finished for PR 27110 at commit 1832e16.

This patch fails SparkR unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/116386/
Test FAILed.

retest this please

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/21197/
Test PASSed.

Test build #116407 has started for PR 27110 at commit 1832e16.

Test build #116407 has finished for PR 27110 at commit 1832e16.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/116407/
Test PASSed.

Merged to master.


reboot after flashing

Hello, download last commits, built the project, upload and my esp-32-wroom falls in cyclic reboot? What i am doing wrong?

I am using random_flight, the problem is somewhere in squitter.init(&utm_parameters) func. Yesterday It started working, but today stopped and i have the same issue. Can you send me the screen of the board settings in tools? Frequencies, Partition scheme

The only thing that I change from the defaults is the partition scheme which needs to be 1.9+ MB if you are using WiFi and BLE. CPU freq is 240 MHz, flash 80 MHz & 4 MB.
https://github.com/sxjack/uav_electronic_ids/blob/main/ENV.md
The other thing has caused rebooting for me is using Serial1.

Have you tried turning off the Bluetooth and/or Wifi?

thanks, the problem is in wifi_beacon enabled workmode
if i disable it, everything works, don't you know what could be the problem?

If you disable Bluetooth does WiFi work?
There are two options for how the WiFi works that you could try changing.

USE_BEACON_FUNC  (in id_open.h) determines whether the beacon packets come from opendroneid's code in wifi.c or mine. This was done for a couple of reasons, to investigate why Android seems to ignore lots of beacon packets, mine are closer to what an ESP32 normally puts out (Android still ignores lot of them) and because Arduino Pi Pico W hates wifi.c.

About half way down id_open_esp32.cpp there is an #if that determines whether the program uses the WiFi class or calls the esp_ functions directly. It is currently set to do the latter because the former means that the ESP will transmit it's own beacon packets as well as ours.

Bluetooth enable works perfect with BT
#define ID_OD_WIFI_NAN    0
#define ID_OD_WIFI_BEACON 0
#define ID_OD_BT          1
#define USE_BEACON_FUNC   0

WiFi enable works , no crash, but we can't see it in mobile phone (my of course)
#define ID_OD_WIFI_NAN    0
#define ID_OD_WIFI_BEACON 1
#define ID_OD_BT          0
#define USE_BEACON_FUNC   0

WiFi enable works , no crash, but we can't see it in mobile phone (my of course)
#define ID_OD_WIFI_NAN    0
#define ID_OD_WIFI_BEACON 1
#define ID_OD_BT          0
#define USE_BEACON_FUNC   1

WIFI + BT enable, crashes
#define ID_OD_WIFI_NAN    0
#define ID_OD_WIFI_BEACON 1
#define ID_OD_BT          1
#define USE_BEACON_FUNC   1

WIFI + BT enable, crashes
#define ID_OD_WIFI_NAN    0
#define ID_OD_WIFI_BEACON 1
#define ID_OD_BT          1
#define USE_BEACON_FUNC   0

So you can have BT or WiFi. I may go through my collection of ESP32's later and see if any of them do the same. The two currently on my bench don't.
Android or Apple? For Android you can go into the developer options and turn off beacon throttling and up the rate in id_open.h, but I've never got it to work anything like as well as BT4. My unix and ESP32 scanners see the packets just fine.

The thread about this, that won't work simultaneously
https://esp32.com/viewtopic.php?f=13&t=6707&start=60

Hello
@sxjack, can you help me with these things?
C:\Users\User\Desktop\uav_electronic_ids-main\uav_electronic_ids-main\id_open\examples\random_flight\id_open.cpp:295:6: error: no declaration matches 'void ID_OpenDrone::set_self_id(char*)'
void ID_OpenDrone::set_self_id(char self_id) {
^~~~~~~~~~~~
C:\Users\User\Desktop\uav_electronic_ids-main\uav_electronic_ids-main\id_open\examples\random_flight\id_open.cpp:295:6: note: no functions named 'void ID_OpenDrone::set_self_id(char)'
In file included from C:\Users\2683126\Desktop\uav_electronic_ids-main\uav_electronic_ids-main\id_open\examples\random_flight\id_open.cpp:54:
C:\Users\User\Desktop\uav_electronic_ids-main\uav_electronic_ids-main\id_open\examples\random_flight\id_open.h:104:7: note: 'class ID_OpenDrone' defined here
class ID_OpenDrone {
^~~~~~~~~~~~
exit status 1
Compilation error: no declaration matches 'void ID_OpenDrone::set_self_id(char*)'


Window refinements

Export the window module for external consumers. Added the ability to go 'back' using the redirect service.

Pair reviewed with @SFarageNIS


Text editor: Add notepad3 introduction

Description
Notepad3 released a pre-release version yesterday, which supports Fortran syntax highlighting (with my contribution last year). I think Notepad3 has a more modern and beautiful highlighting style, and I really like its syntax highlighting in Markdown.

Syntax highlighting in Fortran

Since it supports Fortran syntax highlighting, and it can replace Notepad under Windows, it is convenient for me to use it on the command line:
notepad main.f90

NOTE: It only supports Windows OS.
We can add a link of Notepad3 to this page in the Fortran webpage.
I'll consider adding a PR for this next week.

I can contribute on this issue.

I have a good knowledge of html and css so i would try contribute to solve this issue.

I would love working on this issue! Could you please assign it to me?


fix floating point error in the square tilemap shader

Floor the UV in the shader so that tile bondaries don't sparkle when the camera moves by fractional pixels.

The same change is going to have to be done to the other (hexagonal) shaders, too.

Also, be sure to test that this works (does not introduce artifacts) with non-square tiles, odd dimensions, etc.
It is easy to accidentally cause unnoticed bugs by only testing on a "nice" tile/chunk size like 32x32.

I didn't touch the hex tile shaders because there's no example to test them with and I'm not using them in my project. If you write up and example of using hex tiles I'll take a look at the shaders for this issue.
I believe chunk size isn't relevant here and it will work for any tile size so long as it's an integer number of pixels, which is a guarantee I assume you don't intend to get rid of.

I kept saying "you" in that comments thinking you were Joshua, which I see now you aren't.

Example is coming, got inexplicitly busy this weekend so far.

@alec-deason Can you run this with the new example random_world? I do not see any of the flickering that you do on my GPU 1080ti.

You need fractional pixel camera movement to trigger the issue.


use wildcard for patch-level versioning

Given I'm a Goalng app developer,
When I push my app to a cloud platform with "GoVersion": "1.4.*",
Then the golang buildpack should select the latest stable 1.4.x of golang,
And successfully stage the app.
This is reference to the discussion on godeps with @freeformz .

Consider redefining godep's behavior from "record whatever 'go version' says" to "record the version string of the major release of Go being used" (but not the minor revision, if one is being used). So if the user is using Go 1.5.1, it would record 1.5 in the GoVersion field.
Then buildpacks can pick whatever minor revision they want. (Probably always the newest one.) It should be extremely rare for a user to legitimately want a version of Go that's not the latest minor revision within whatever major release they're on. IMO it's fine for the buildpack to simply not support that scenario. It's not so hard to fork the buildpack if you need such super-fine control over the Go distribution.

(If I could go back in time, I would have done it that way from the start.)

@kr I like this idea as well. Would you accept a PR that would simply save major.minor in the GoVersion field?

Taken from the discussion on PR:
@freeformz what were you thinking this has to come in after the buildpack supports it? It is a bit of the chicken an egg problem, I guess. In my humble opinion, the minor version resolution should happen in the buildpack and not via some third party service, like the nodejs buildpack does.

@freeformz, do you have an idea how we would evaluate the latest minor release based only the major version?
Some ideas:

just keep track of all the current versions in the script
3rd party API, like the nodejs buildpack, but I don't relying on external service because if it is down, you cannot deploy your app
if the current version does not download, add increment/decrement minor and retry download

The first option, we'd be able to do. The CloudFoundry fork locks the versions of the support golang binaries, so the meta information is already available. The only change to the Heroku buildpack workflow is someone would have to manually update the supported GO_VERSIONS (imaginary env var), which could also be a CI job, too.

@jtarchie I'm going to close this. Changes late last year to godep and the buildpack allow specifying only the major version of go.

Thanks @freeformz, the Cloud Foundry team just released their support for the feature, too. We read the version numbers that we support for go from a manifest.
Thanks for all the work!


Render false as an empty string

Fixes #1014
Adds a === false check within vnode.normalize that will output an empty text node instead of one that says "false". Also updated tests for new behavior (there's a surprising number of tests checking for behavior of passing false as a child!).
This simplifies a lot of view code that does conditional logic.
m("div", test ? [ ... ] : null)

// can now be this, assuming test is strictly false

m("div", test && [ ... ])

It doesn't seem like a big change but in practice it can be hugely beneficial for making deeply-nested view code easier to read.
Note: this does not match the 0.2x behavior introduced in #1103 where true values are also ignored. That behavior is more consistent but seems a bit off the more I think about it. If that's the preferred behavior I'm happy to updated this PR to do that instead.

Nice work @tivac, sorry I sat on this so long! I think squashing true was a misunderstanding of a comment @lhorie made as to the value of Boolean true being as useful as false, ie condition && node was more intuitive to him than false || node. Took me a long time to grok that he wasn't talking about an expression resolving to true in the vdom, but truthy conditions being a more grokkable example of how logical operators should work in hyperscript.


Implements one-tap links

Partial for #253

Changes

Adds ability to heuristically infer link type (two-tap/one-tap) based on the page and placement of the element
Implements rendering of CTA links in an <amp-story-cta-layer> of the output result
Adds visual indicator for the one-tap vs two-tap links areas

/cc @dvoytenko should be ready, interactions with drop targets and deletion coming in a separate PR

@dvoytenko let's merge this?

Hmm when dragging an element in the bottom 20% of the page there is quite a noticeable lag. Even when dragging an element on the first page, where there are no 1-tap links allowed.
Also, I cannot drag an element from the top part to the bottom 20%, it jumps right back. Same when it is already in the bottom 20%: I cannot move it upwards, it jumps right back. It works when using the arrow keys though.

Oh, and the percentage-based font size doesn't seem work within the CTA layer. All text elements are displayed super small on the front end.

Hmm when dragging an element in the bottom 20% of the page there is quite a noticeable lag. Even when dragging an element on the first page, where there are no 1-tap links allowed.
Also, I cannot drag an element from the top part to the bottom 20%, it jumps right back. Same when it is already in the bottom 20%: I cannot move it upwards, it jumps right back. It works when using the arrow keys though.

@swissspidy both of these problems are coming from here:
https://github.com/google/web-stories-wp/blob/0bed6a74d2eac9c2735f13cd1f70e4cb77b8de36/assets/src/edit-story/components/link/guidelines.js#L82-L86
essentially, this effect only needs to be called whenever selectedElement.y changes (not selectedElement as a whole). I fixed it three times before realizing that the linter is reverting my change during the pre-submit (from selectedElement.y back to selectedElement). Any way to force it not to?

Ah, interesting!
Looks like we'll have to disable the lint rule for these specific cases. See 7d7b379bc8c0ffa35e795a8c3d282dc956fc1d24.
Also just noticed that Travis didn't fail now. Will look into that.

Works much better now with your change!

Awesome thanks for that!

So the only outstanding issue now seems to be the font size one.

I'm gonna try to do it in case instead of the CTA/no-cta calculations :))

@swissspidy should be ready :)


Add Hankuk University of Foreign Studies

I'm sorry for having created bad pull request. I hope that this pull request is made well of the rule this time😥
This is the url of my University
https://www.hufs.ac.kr/sites/hufs/index.do
This is the url of one of departements about IT course of my University
https://ice.hufs.ac.kr/ice/1032/subview.do
I add comment with a url where you can see that our University use this<EMAIL_ADDRESS>officialy as email https://builder.hufs.ac.kr/user/indexSub.action?codyMenuSeq=113536239&siteId=hufsenglish3&menuType=T&uId=1&sortChar=A&linkUrl=contact_us.html&mainFrame=right

@yj-chung I am sorry, the domain hufs.ac.kr is removed from our trusted domains list because it was abused in the past. If you are the student of this school, please enroll to GitHub Student Developer Program. Then apply for JetBrains educational subscription with your GitHub account (GitHub tab at https://www.jetbrains.com/shop/eform/students).


Insta does not work under wine

What happened?
When running my unit tests under wine, I get the following error:
called `Result::unwrap()` on an `Err` value: Os { code: 6, kind: Uncategorized, message: "Invalid handle." }

This is related to #178 but I also get this error when not using cross (and just normal wine + the gnu target):
$ cat ~/.cargo/config.toml
[target.x86_64-pc-windows-gnu]
runner = "wine64"

$ cargo test --target x86_64-pc-windows-gnu
called `Result::unwrap()` on an `Err` value: Os { code: 6, kind: Uncategorized, message: "Invalid handle." }

As this is not a specific issue for cross, could a workaround be applied to properly load cargo metadata on wine? My crate has some specific windows components that also need to be tested, therefore I have to run the tests under windows as well and I currently skip them using:
pub fn is_wine() -> bool {
    let verbs = [
        "WINEPRELOADERDUMMYVAR",
        "WINEDATADIR",
        "WINEHOMEDIR",
        "WINECONFIGDIR",
        "WINEDLLDIR0",
        "WINELOADER",
        "WINEUSERNAME",
        "WINEUSERLOCALE",
    ];

    verbs.iter().any(|verb| std::env::var_os(verb).is_some())
}

#[test]
fn my_test() {
        if is_wine() {
            // insta does not work under wine
            return;
        }
}

which is not a very nice solution
Reproduction steps

Execute under wine
See the error

Insta Version
1.39.0
rustc Version
1.79.0
What did you expect?
No response

Thanks for the issue.
Is this a case of https://github.com/cross-rs/cross/issues/550 ? Is there another way we could get cargo metadata?

I would love to find a way to not invoke cargo at all there.  Insta also has a lot of issues with miri today which is triggered by very much the same reasons.

With some recent changes, I think we shouldn't be calling cargo metadata from insta when INSTA_WORKSPACE_ROOT is set. We also give much much better error messages when it does fail.
Let me know if this doesn't work. (otherwise I'll close)
(Note that we call cargo metadata when running from cargo-insta in more cases...)

Closing as above, please reopen if any issues!


add tracing

currently this doesn't work because we end up initializing an async-std runtime while parallelizing keep_first_n.


update seed demo

Coverage remained the same at 84.173% when pulling 169aa7edf18895bf0efaa3df3b46b8b337d62c6b on itowtips:seed into f11e1473e40d4a6bd31f72ac74ddc240e2951cc9 on shirasagi:master.


Refactor: Manage Broadcast

Issue that this pull request solves
Closes: #1045
Proposed changes
Brief description of what is fixed or changed

[x] Edit Broadcast UI redesigned similar to add broadcast
[x] Edit broadcast integrated to backend.
[x]  Some bugs fixed in add broadcast too

Types of changes
Put an x in the boxes that apply

[x] Bugfix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update (Documentation content changed)
[ ] Other (please describe):

Checklist
Put an x in the boxes that apply

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] My changes does not break the current system and it passes all the current test cases.

Screenshots

Other information
Any other information that is important to this pull request

Hey @Kajol-Kumari
Please review the request
Also increase the level too :)

Hey @BHS-Harish try building this branch locally seems like all the checks are failing

Hello @Kajol-Kumari
Now it's fixed


Call WithTracing on RootContext only on configuration

WithTracing should only be called on Cluster configuration within .WithConfigureRootContext method. Calling WithTracing on each API call etc. results in a multiple OpenTelemetrySenderMiddleware added to RootContext when usually only 1 is preferable.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Łukasz Dawidowski seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


0 videos downloaded

I tried running this to collect sample data. But for every keyword i am getting same issue.

[youtube:search_url] in: Downloading webpage
[download] Downloading playlist: in
[youtube:search_url] playlist in: Downloading 0 videos
[download] Finished downloading playlist: in
[youtube:search_url] is: Downloading webpage
[download] Downloading playlist: is
[youtube:search_url] playlist is: Downloading 0 videos

whats wrong I might have done ?

I tried running this to collect sample data. But for every keyword i am getting same issue.

[youtube:search_url] in: Downloading webpage
[download] Downloading playlist: in
[youtube:search_url] playlist in: Downloading 0 videos
[download] Finished downloading playlist: in
[youtube:search_url] is: Downloading webpage
[download] Downloading playlist: is
[youtube:search_url] playlist is: Downloading 0 videos

whats wrong I might have done ?

I am Trying the code since Past 2 days and facing the same issue , Not sure how its working

You can fix this issue by running pip3 install -U git+https://github.com/xarantolus/youtube-dl@fixYTSearch. More info can be found here https://github.com/ytdl-org/youtube-dl/pull/25734


(maint) Fix package setup for macOS and Windows

Uses beaker-puppet helper to install Bolt from development builds.

Acceptance tests don't yet work with a macOS target. I'm going to look into adding a setup step that configures the SSH and WinRM passwords on targets.

Tested with BOLT_NODES=ubuntu1604-64,osx1012-64,windows10ent-64,centos6-64,debian8-64,sles12-64 SHA=bec39c1584099e72846d1f785583d86d71052c2f bundle exec rake test:package.

CLA signed by all contributors.


Update README.md

Just pull the change, already.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Comment 1

Comment 2


bug

I already wrote that eventsub is not confirmed. It turned out that secret is not transmitted

https://github.com/romanzipp/Laravel-Twitch/discussions/90

At first, always use Issues instead of discussions, those are two completely separate features. Please do not post screenshots of Code, I can not read a compressed line of JSON...
Here are some guidelines on how to write issues
So what do you want me to do? Is your issues resolved?

I did everything as in the documentation, for creating a webhook eventsub, but failed everywhere. When decrypting the request, I saw that "secret" was not passed"

Even after specifying secret, the request is still sent without specifying secret.

Fixed the problem thanks to him https://github.com/romanzipp/Laravel-Twitch/issues/82


Timer keeps going in the background

Think this is reproduced by reproducing #61. By disabling the start of the timer while someone is modifying the timer length, we can avoid this bug.


Fixes embedded_params when params are empty

params expects embeded_params to always return a Hash. This fixes an edge case where embeded_params can return nil, which causes an exception in merge!.

@masonjm thanks for this. How did you find this edge case? Would it be best to fix the reason there isn't a hash in the first place?

@edtjones we discovered this when upgrading from 0.7.6 to 0.8.  We eventually tracked it down to a problem with some seed data in our specs.
It's possible this fix isn't necessary, but tracking down the source of the error this generates was non-trivial. It also bothered me that the code could fail in an expected way, and nothing was checking for that :).

@masonjm so the next was producing nils whereas your next hash fix returns a hash. Nice. Seems like it shouldn't break anything. I'm happy if you're happy :-)


Update concept-servers.md (Typo "MySQL flexible service"→"MySQL Flexi…

…ble Server")
https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concept-servers https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/mysql/flexible-server/concept-servers.md #PingMSFTDocs

@hyoshioka0128 - 	Thanks for bringing this article to our attention. The content would benefit from an internal copy edit to ensure that it follows Microsoft style and formatting guidelines. We'll close this PR and submit the file for an internal copy edit.


xtensor's container.data() is inconsistent with std::vector::data()

I'm reporting this because consistency with the STL and particularly with std::vector is of primary concern in the xtensor library, and the definition of data() deviates from this rule: In std::vector, it returns a pointer to the underlying data (analogous to xtensor's raw_data()), whereas it returns a reference to a container in xtensor. I noticed this because I originally followed the std::vector model in xvigra::view_nd, but had to change it to fulfill the has_raw_data_interface API. Are there any plans to resolve this?

Yes! in fact, we are thinking of the following renames

data() -> storage()
raw_data() -> data()

This would be a backward-incompatible change though.

Cool! (although storage() could perhaps be a bit more self-explanatory).

This would be a backward-incompatible change though.

No problem for me.

That will probably be in the 0.16.
We are still in the 0.15.x stream, where we still can make backward compatible improvements for a few more weeks.

fixing up container_type -> storage_type as well.


MINOR: Fix error message in KafkaRaftClient.java

before
logger.trace(                 "Leader doesn't know about snapshot id {}, returned error {} and snapshot id {}",                 state.fetchingSnapshot(),                 partitionSnapshot.errorCode(),                 partitionSnapshot.snapshotId()             );
after
logger.trace(                 "Leader doesn't know about snapshot {}, returned error {} and snapshot id {}",                 state.fetchingSnapshot(),                 partitionSnapshot.errorCode(),                 partitionSnapshot.snapshotId()             );
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

@abbccdda  Please take a look at this pr, thanks.

@abbccdda  Please take a look at this pr, thanks.

I think the question is whether we intended to only output the snapshot id or more information.

I think the question is whether we intended to only output the snapshot id or more information.

cc @hachikuji

cc @hachikuji

I think the question is whether we intended to only output the snapshot id or more information.

I agree with you.I think we could choose to just print the snapshot Id or we can print more information about the snapshot.But the current printing information is not very clear, there are some problems.

I think the question is whether we intended to only output the snapshot id or more information.

I agree with you.I think we could choose to just print the snapshot Id or we can print more information about the snapshot.But the current printing information is not very clear, there are some problems.

@hachikuji  Hello, can you take a look at this pr? I think we can choose to just print the snapshot Id or we can print more information about the snapshot.Here's one way to do it.

@hachikuji  Hello, can you take a look at this pr? I think we can choose to just print the snapshot Id or we can print more information about the snapshot.Here's one way to do it.


animated creditpopup

What feature do you want to get added on the base engine?
is it possible to make animated credit bar's work on the creditpopup
To test your sight, and reliability, please select the option of what should NOT be requested.
Proper credit that was forgotten

it already does
simply use a custom heading, but this time the heading must have an XML file.
The animation in the XML must be named "idle"


docs: fix typo in lance-arrow

Quick typo fix.

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

Project coverage is 81.00%. Comparing base (767428f) to head (795d434).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2152      +/-   ##
==========================================
+ Coverage   80.97%   81.00%   +0.02%
==========================================
  Files         167      167
  Lines       48780    48780
  Branches    48780    48780
==========================================
+ Hits        39501    39515      +14
+ Misses       6964     6955       -9
+ Partials     2315     2310       -5

Flag
Coverage Δ

unittests
81.00% <ø> (+0.02%)
:arrow_up:

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

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

Thanks @rgbkrk ! Merged


better error trap when constant equals 1

This came up as a possible parallelization question, but the error seems like it is probably simply triggered by using T without defining it and coercion to the value 1.  Try seeing if running it serially but with T not set also triggers and presuming so, trap the error.
gapCode <- nimbleCode({
  for (t in 1:mxpq){
    psi[t] <- omega
    g[t] ~ dgamma(shape=eta, scale=psi[t]/eta)
  }
  for( t in (mxpq+1):T){
    psi[t] <- omega+inprod(durpar[1:p],g[(t-p):(t-1)])+inprod(durpar[(p+1):(p+q)],psi[(t-q):(t-1)])
    g[t] ~ dgamma(shape=eta, scale=psi[t]/eta)
  }
    for (i in 1:k){
    gamdirch[i] ~ dgamma(shape=0.5,rate=1)
  }
  for (i in 1:k){
    durpar[i] <- gamdirch[i]/sum(gamdirch[1:k])
  }
  eta ~ dgamma(shape=0.001,scale=1/0.001)
  omega ~ dgamma(shape=0.001,scale=1/0.001)
})

# Gap between refresh times:
gamma_t=as.numeric(gamma_t)

T=length(gamma_t)-20
p=2
q=2
mxpq <- max(p,q)
k=p+q+1

useWAIC <- TRUE

run_MCMC_allcode <- function(seed, data, code, useWAIC = TRUE) {
  library(nimble)

  T=T
  p=2
  q=2
  mxpq <- max(p,q)
  k=p+q+1

  # Running nimble code:
  gapModel <- nimbleModel(code = code,
                               constants = list(T = T,p=p,q=q,k=k,mxpq=mxpq,alpha = rep(0.5, k))
                               ,data = data
                               ,inits = list(eta=1,omega=0.001))

  mcmcConf <- configureMCMC(gapModel, monitors = c("eta","omega","durpar"),
                            enableWAIC = TRUE,useConjugacy = FALSE)
  Rmcmc<-buildMCMC(mcmcConf)
  Cmodel<-compileNimble(gapModel)
  Cmcmc <- compileNimble(Rmcmc, project = gapModel)
  samplesList <- runMCMC(Cmcmc, niter = 5000, thin=1, nburnin = 0
                         ,samplesAsCodaMCMC = TRUE, WAIC = TRUE)
  return(samplesList)

}

chain_output <- parLapply(cl = this_cluster, X = 1:2,
                          fun = run_MCMC_allcode,
                          data = list(g=gamma_t[1:T]), code =  gapCode,
                          useWAIC = useWAIC)

stopCluster(this_cluster)

@paciorek I think it was the case that some historical-types of model structures, backwards indexing can just "arise" somewhat naturally, and in those cases, it should be ignored... that was what BUGS did.  So, we followed that model (of silently ignoring it), but (per usual) added an option for different behavior, if that's what a user wants (in this case, processing the backwards indexing).
Given all of that.  Perhaps one path is to introduce a warning when we ignore such indexing, but perhaps that warning itself could be suppress-able.  Or, maybe controlled by our verbose system option?

A related issue came up recently on nimble-users here.
(The message subject was not really relevant.)
The issue was whether if nimbleModel sees "for(i in a:b)", where a:b is 1:0, does it result in no declarations? Evidently in BUGS/JAGS that is the case, and so in nested loops, e.g. "for(i in a:b[j])", one can skip some values of j for the inner loop. However we determined nimble is not supporting that. If you have your hands on these corner cases of for loop indices, is this is also relevant to decide about and handle?
My thoughts echo @danielturek 's. It does not seem like something is broken here. Given that it is a declarative language, index order should not matter. I can see some cases where it might be convenient to allow negative orders, but they seem rare. More often it seems it would be unintentional.

Ok, I will add a warning when we notice backward indexing and it is being ignored (which is the default).


fix: change glob wildcard behavior in AuthZ

Issue #, if available:
Description of changes:
Change behavior of wildcard evaluation inside Authorization. This was previously implemented where we evaluated both MQTT wildcards (+,#) and glob wildcard (*) inside AuthZ policy for both MQTT and PubSub IPC. https://github.com/aws-greengrass/aws-greengrass-nucleus/pull/1152
We want only glob wildcard in PubSub IPC, MQTT IPC already had MQTT wildcards, so we will keep it as is along with addition of glob wildcard into it
Changes:

PubSub IPC AuthZ: MQTT wildcards will not be evaluated and will be treated as string literals. Glob wildcard will be evaluated
MQTT IPC AuthZ: MQTT wildcards will be evaluated as wildcards. Glob wildcard will be evaluated
Glob wildcard will not respect MQTT levels now and match across levels. (eg - ab/*/c will match ab/1/2/c and ab/12/c)

Why is this change necessary:
The change was made so that wildcards in different policies are consistent with each other and particularly match IoT Core policy's behavior.
How was this change tested:
Unit tests
Any additional information or context required to review the change:
Checklist:

[ ] Updated the README if applicable
[ ] Updated or added new unit tests
[ ] Updated or added new integration tests
[ ] Updated or added new end-to-end tests
[ ] If your code makes a remote network call, it was tested with a proxy
[ ] You confirm that the change is backwards compatible

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

Thank you for including a good PR description - it gives good context for the change.


502 Bad Gateway, necessary to run kubectl port-forward

The scenario on https://killercoda.com/keptn/scenario/keptn-end-to-end-delivery fails with:
Error: authentication was not successful: error with status code 502

It works if we execute the following before trying to open the Kepn interface in the browser or before running keptn auth ...:
kubectl -n keptn port-forward --address <IP_ADDRESS> service/api-gateway-nginx 8080:80

Not sure why this worked before without this? Maybe something was changed on the way Keptn is installed, maybe something changed on Killercoda?
Discussion also in Slack here.

Yes! Nice caught. I had been noticing the same since I found that magic stuff from Adam. I too got surprised then. 😄


doc: net/http/httputil: add example for reuse of Director

Not a bug, it's a API change proposal documentation enhancement:
Rationale
Since go1.12 enhanced further the ReverseProxy implementation a closed source library (and many more open-source ones) that provide a reverse proxy for HTTP and WS can be deprecated.
The only difference between the closed source library was that I had a more convenient hook to modify a request that allowed me to focus only on the VHOST logic.
The change here would noticeably reduce the boilerplate and make developers avoid re-implementing logic and private function(s) that Directory already implements/uses.
Update: As per discussion, documentation is going to be enhanced. Ref: https://github.com/golang/go/issues/31406#issuecomment-482354227
So, in terms of Golang code
Current state:
forwardProxy := httputil.NewSingleHostReverseProxy(target)
forwardProxy.Director = func(req *http.Request) {
    // NOTE: Just a copy of `ReverseProxy`'s default `Director`
    req.URL.Scheme = target.Scheme
    req.URL.Host = target.Host
    // NOTE: `singleJoiningSlash` must also be defined again by developer
    req.URL.Path = singleJoiningSlash(target.Path, req.URL.Path)
    if targetQuery == "" || req.URL.RawQuery == "" {
        req.URL.RawQuery = targetQuery + req.URL.RawQuery
    } else {
        req.URL.RawQuery = targetQuery + "&" + req.URL.RawQuery
    }
    if _, ok := req.Header["User-Agent"]; !ok {
        // explicitly disable User-Agent so it's not set to default value
        req.Header.Set("User-Agent", "")
    }
    // NOTE: End of copied

    // NOTE: Custom developer logic just begins to start here
    ...
}
forwardProxy.Transport = &http.Transport{
    TLSClientConfig: &tls.Config{
        InsecureSkipVerify: true,
    },
}

(Not needed) With an addition of ModifyRequest hook
forwardProxy := httputil.NewSingleHostReverseProxy(target)
forwardProxy.ModifyRequest = func(req *http.Request) {
    // NOTE: Custom developer logic just begins to start here
    ...
}
forwardProxy.Transport = &http.Transport{
    TLSClientConfig: &tls.Config{
        InsecureSkipVerify: true,
    },
}

Documentation to be updated with
forwardProxy := httputil.NewSingleHostReverseProxy(target)
originalDirector := forwardProxy.Director
forwardProxy.Director = func(req *http.Request) {
    originalDirector(req)
    // NOTE: Custom developer logic just begins to start here
    ...
}
...

In pros/cons based on what I see (with respect to the fact that I'm just a Golang-using developer):
Pros

Less boilerplate
No need to re-implement logic and re-define private functions used in reverse_proxy.
Less error-prone since the developer only needs to think what logic to add instead of checking the existing implementation of Director.
Not a breaking-change in API.

Cons
* More than one way to do things.
* Needs a bit better documentation to signify the difference between Director and ModifyRequest.
ref: #31393
cc: @agnivade

CC @bradfitz

This doesn't enable anything new. It only seems to add another way to do things and requires a bunch more docs. Maybe you could just add an example to the docs showing how to wrap a Director func to do the modifications of the request before or after an existing Director.

@bradfitz
Maybe you could just add an example to the docs showing how to wrap a Director func to do the modifications of the request before or after an existing Director.

Sounds, interesting.
If I understand your point correctly,
forwardProxy := httputil.NewSingleHostReverseProxy(target)
originalDirector := forwardProxy.Director
forwardProxy.Director = func(req *http.Request) {
    originalDirector(req)
    // NOTE: Custom developer logic just begins to start here
    ...
}
...

Certainly not the prettiest thing out there, but it sure gets the job done and I think everyone can be happy about it.
From what I see it solves the:
Cons:
* More than one way to do things.
* Needs a bit better documentation to signify the difference between Director and ModifyRequest.

@bradfitz Just to be sure that I don't misunderstand the contribution flow here, I'll:

Rename the issue and content
Update the referenced PR's title and patch to only update the docs

Just to be sure that I don't misunderstand the contribution flow here, I'll:

Rename the issue and content
Update the referenced PR's title and patch to only update the docs

Sounds good to me.

@bradfitz ping https://go-review.googlesource.com/c/go/+/171577

Thank you @syndbg, I've added some feedback to your CL but we are almost there, please take a look.


Re-Enable Tick is Toggle

Fixed in dev; Rerouted to use the function that updates the state of the party window in https://github.com/GregLando113/GWCA/commits/01664d2561a8eecb0d833243b5c45b801917e301


[AWS] Separate integration from publishing checkpoints

This PR disconnects the act of integrating new entries into a tree, from the act of publishing a new checkpoint which publicly commits to that new tree state for the MySQL storage implementation.
See #323 for more details on the rationale and the GCP and POSIX implementations, and #344 for the MySQL implementation.
Helps with #309 and #198.
Tested on AWS:
│I1204 15:20:09.138000   38710 hammer.go:242] Updated checkpoint from 236544 to 252928 │
│I1204 15:20:12.619872   38710 hammer.go:242] Updated checkpoint from 252928 to 270336 │
│I1204 15:20:16.585067   38710 hammer.go:242] Updated checkpoint from 270336 to 286720 │
│I1204 15:20:21.142250   38710 hammer.go:242] Updated checkpoint from 286720 to 302080 │
│I1204 15:20:25.144099   38710 hammer.go:242] Updated checkpoint from 302080 to 325632 │
│I1204 15:20:28.599132   38710 hammer.go:242] Updated checkpoint from 325632 to 338944 │
│I1204 15:20:32.826443   38710 hammer.go:242] Updated checkpoint from 338944 to 356352 │

Note that the MySQL and GCP design docs need to be updated to reflect this change. I'm currently working on the AWS design doc, let's coordinate to make sure that this PR and the design doc stay in sync, especially with the launch today.


Migrate SignInPageForm/index.js to function component

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/16202
PROPOSAL: https://github.com/Expensify/App/issues/16202#issuecomment-1656496135
Tests

Open the application.
Verify that the sign-in form is visually rendered correctly on the page.
For web browsers:
Verify that the password manager is able to recognize and interact with the form correctly.
Enter an email in the 'Email' field in the form.
Click on the submit button or press the "Enter" key.
Verify that the form doesn't cause a page refresh or redirection to a different URL. Instead, ensure the "magic code section" is displayed (confirming the prevent default functionality).

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

Offline tests

N/A
QA Steps

Same as tests above.

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

PR Author Checklist

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Screenshots/Videos

Web

https://github.com/Expensify/App/assets/77965000/6a87a952-36ae-4dc4-8bfa-46f6123a4c32
https://github.com/Expensify/App/assets/77965000/8ab50dbc-349e-4075-8ba7-0eaa5227ce35

Mobile Web - Chrome

https://github.com/Expensify/App/assets/77965000/a5ce906f-a325-4560-8d1b-daa544d005ba

Mobile Web - Safari

https://github.com/Expensify/App/assets/77965000/07b1ff9b-aeb4-4fb9-875d-a0923dcce5fb

Desktop

https://github.com/Expensify/App/assets/77965000/80a9fcdf-8610-4da8-b4be-91ddb1069a9b

iOS

https://github.com/Expensify/App/assets/77965000/a371c2cb-d867-4768-a422-58fc61629445

Android

https://github.com/Expensify/App/assets/77965000/3a05a140-bc77-488f-8591-cd65a5dd35b0

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

🚀 Deployed to staging by https://github.com/deetergp in version: 1.3.61-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.61-3 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


cmd/api: run api check on all ports

cmd/api runs only on a fixed set of ports. The list is strange, excluding some first-class ports (linux/arm64, darwin/arm64), but including several secondary ports. Any ports excluded from this list get no checking at all.
Inspired by a suggestion from @bcmills, I think we should adjust behavior:

cmd/api should always include the current GOOS/GOARCH(/CGO_ENABLED).
The default context set should include all first-class ports.
cmd/dist should perhaps tell cmd/api to only check the current GOOS/GOARCH, to avoid duplicate work in builders.

These changes should make all first-class and secondary ports covered by api checks, in each of their respective builders (pre-submit or post-submit depending on which ports are included in TryBots, as usual).
cc @golang/release

cmd/dist should perhaps tell cmd/api to only check the current GOOS/GOARCH, to avoid duplicate work in builders.

dist skips the API test on android, ios, js, and plan9 because they are too slow. Those could perhaps be covered in one of the misc-compile builders? Or maybe a single api builder just runs every port?

We have a distinction between short and long tests. Maybe the short test (the default) should run the current GOOS/GOARCH, and the long test should also run every first-class GOOS/GOARCH?
(That would carve out the android, ios, js, and plan9 builders incidentally, because none of those are configured as -longtest.)

compare #14892 / CL 322309 (CC @iwdgo)

Those could perhaps be covered in one of the misc-compile builders? Or maybe a single api builder just runs every port?

Running them on the misc-compile builders sounds appropriate to me. IIRC the misc-compile builders also run go vet on their port, and the API check is conceptually very similar to a vet check.

For reference, cmd/coordinator currently has a special case for the api test:
https://cs.opensource.google/go/x/build/+/master:dashboard/builders.go;l=1217-1226;drc=59e7a6bb02dba3fc4a32b23dc98b96d04453d1e1
Probably a good first step would be to move that logic into the api test itself (having it skip itself based on GO_BUILDER_NAME) and removing that special case from the coordinator so that we can iterate on it without redeploying the coordinator.


remove locals on global variables

Removing the local keyword allows for easier online debugging of code as the variables can be accessed globally.  The only downside as far as I know is that it adds some microseconds for variable name lookups on runtime, but that is very negligible in this script.
Maybe it is better practice to declare them as local, but I have found it practical to have them as traditional global variables.

What additional debugging does this enable?  I'm not aware of any TTS features to step through code or inspect variables.

ah, you can press Ctrl+Shift+2 to execute code highlighted in Atom.  local variables aren't accessible to that code.  if I fix and replace a function to see if it works, it can't access any variables declared as local.