Industry News

In the v4, the api can only return the news for a given anime/manga id. So, I would like to request to add a endpoint for returning news info when valid news id is provided.

.

Definition/Requirement
Endpoints
News Tags
News Tags: https://myanimelist.net/news/tag
$jikan->getNewsTags($request)

Recent News
Recent News: https://myanimelist.net/news?p=1
$jikan->getNews(new NewsRequest(int $page))

News By Tag
News By Tag: https://myanimelist.net/news/tag/new_anime
$jikan->getNewsByTag(new NewsByTagRequest(string $tag, int $page))

News Search
News Search: https://myanimelist.net/news/search?q=bleach
$jikan->getNewsSearch(new NewsSearchRequest(string $query, int $page))

Response Objects
News/Tags
Categories

Anime
Manga
People
Music
Events
Industry

News/Tag
Tags[] in each Category

Property
Type
Remarks

mal_id
String
Tag name (canonical)

name
String
Tag name

url
String
News listing by tag URL

description
String
-

NewsByID
MAL URL: https://myanimelist.net/news/66771438

Property
Type
Remarks

mal_id
String
News ID

url
String
-

forum_url
String
URL to comments - so it can be parsed by MAL's API

title
String
News title

date
String
ISO8601

content
String
Unparsed HTML response (like user about mes'?)

user
UserMeta
Author user object

comments
Integer
Comment count

relations
Objects of MalUrl[]
Same as relation is done in getAnime & getManga

tags
TagMeta[]
Array of tag metadata objects (mal_id, name, URL)

Results
The following will implement Results.

Recent News
News By Tag
News Search

getResults() will return an array of NewsListItem
NewsListItem

Property
Type
Remarks

mal_id
String
News ID

url
String
-

images
Images Object
Need to look into available formats & sizes

forum_url
String
URL to comments - so it can be parsed by MAL's API

title
String
News title

date
String
ISO8601

excerpt
String
-

user
UserMeta
Author user object

comments
Integer
Comment count

tags
TagMeta[]
Array of tag metadata objects (mal_id, name, URL)

Superseded by https://github.com/jikan-me/jikan-rest/issues/535


Rename df to frame

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

Project coverage is 100.00%.  Consider uploading reports for the commit 5535b4b to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #370   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           92        92
  Lines         2352      2352
  Branches       211       211
=========================================
  Hits          2352      2352

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


Update an account in the service

As a customer or API consumer
I need the ability to update account information (e.g., name, address) by providing an account ID and updated data
So that I can keep my account details accurate.
Details and Assumptions

The service includes a database with account data.
The API endpoint /api/accounts/{account_id} accepts PUT requests for updates.

Acceptance Criteria
Given a valid account ID and updated data
When I make a PUT request to the endpoint `/api/accounts/{account_id}`
Then the account information should be updated in the database.


Aws vault access request by using iam role

Hi,
I tried some sample to access vault with Java code it’s working in AWS.. but I’m looking spring boot application with bootstrap.yml wise. Please see below ...

I have iam role and integrated with vault.
Planning to run my application in lambda and ec2 instance. For both application points to same aws vault.
I gone through the spring vault but I understand but looking for sample.

please share sample and document. It will more to me. Thanks in advance.

Seems, this is waste team even not responding.. then why you need to Create this repo.


Autorun Database Migrations Proposal

This PR adds the ability to specify if the database needs to be migrated at run time.
The proposed flow is as follows:
At deployment time, a new variable is set, Gallery.RequireDatabaseMigration, that indicates if this release requires a database migration. At app start, this setting is read, and if true, the migrations are run against the database.
In the case that we need to roll back, Gallery.TargetMigration can be set to target a previous migration, otherwise left empty to run to latest migration.
In most cases Gallery.RequireDatabaseMigration should be false, and is false by default. When the database requires an update, this should be a very conscious decision to update this flag to run the migrations.
@xavierdecoster @maartenba @skofman1 @scottbommarito @shishirx34

Would love to hear thoughts on one comment, Looks good to me otherwise!

LGTM, but we should have a discussion with the whole team on if this is the approach we want to head in.

I'm no expert at EntityFramework, but what happens if multiple front-end nodes execute the migration at the same time (+ error conditions, one fails, another does not)?

It would be great if someone with a bit more EF experience could answer, but as far as I could tell, multiple nodes attempting to run the migration at the same time seemed to not be a problem as it appeared to run them sequentially (I ran a series of migrations locally from multiple instances simultaneously, and all but one would effectively no-op). Only one seemed to apply, after which the other running migrations picked up that all the available migrations had already been applied. Given this behaviour, I would expect that if there was an error running one, the others would effectively be retries.
Can anybody else confirm this would be the behaviour here?

No idea if EF Migrations detects that a migration is already running, turning the other nodes' migration attempts effectively into no-ops. Would like to hear confirmation about that too.
What concerns me most is that these migrations run at startup on a staging slot, against a database that is in use by the production slot. Depending on the kind of migration, this could be potentially breaking hard, and would be harder to diagnose. In addition, depending on the kind of migration, rolling back could have impact on data (e.g. dropping and re-adding a column is not exactly rolling back the db...)
I think there used to be an admin section in the gallery that was allowed a gallery administrator to apply EF migrations. I've never seen it in action or used it (I'm not even sure there's any trace of this left in the code), but I do remember seeing this couple of years ago. Maybe @anurse has vague memory of this? :)

I agree with @xavierdecoster , running migrations automatically in production is a bit scary.. even if we answer the "single EF runner" question, there are still cases where we want more awareness of what we are doing, for example, if we add an index that takes long minutes to be created an slows down the DB. We might want to have this done separately from the deployment process. If we want to automate EF migrations (and I think it's great), how about adding a step to Octopus, that will require separate approval of the user?

Adding a step to Octopus sounds great! There's actually a script in the repository that can run migrations outside Visual Studio (check the tools or scripts folder)


Issue ripping "private" tumblr

Tumblr in question is fiveonetwocouple.tumblr.com. You can't view the blog if you aren't logged in, and when you log in it opens as a side thing in your dashboard with a different url. RipMe only likes name.tumblr.com format so it's not able to rip this one.

Yeah, the address in the address bar changes to
https://www.tumblr.com/dashboard/blog/fiveonetwocouple#_=_
but I'm sure it's by no means final or even useful, so some extra work is likely needed; I didn't check further than that.

so i was looking into this and the only way to fix it is to implement oauth instead of using an api key for these private blogs, then it works fine. im not a java programmer and i made my own little tool for this purpose but im sure if someone cares and has the ability they can implement it


BC Break, Laravel Passport 7.5 -> 8.3

I originally opened this ticket with the passport team and they asked me to re-open it over here.  The problem happens on passport upgrade, but if you look at the stack trace, you should see that the error message is from symfony/psr-http-message-bridge complaining that a Diactoros method isn't returning the correct value.

Passport Version: 8.3.1
Laravel Version: 6.9.0
PHP Version: 7.4.0
Database Driver & Version: MySQL

Description:
After upgrading from passport 7.5.1 -> 8.3.1, with no other changes, a client token request crashes with this error:
device-service-fpm_1    | [2020-02-03 13:56:30] local.ERROR: Return value of Zend\Diactoros\normalizeServer() must be of the type array, none returned {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Return value of Zend\\Diactoros\
device-service-fpm_1    | ormalizeServer() must be of the type array, none returned at /var/www/device-service/vendor/laminas/laminas-diactoros/src/functions/normalize_server.legacy.php:22)
device-service-fpm_1    | [stacktrace]
device-service-fpm_1    | #0 /var/www/device-service/vendor/symfony/psr-http-message-bridge/Factory/DiactorosFactory.php(52): Zend\\Diactoros\
device-service-fpm_1    | ormalizeServer()
device-service-fpm_1    | #1 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php(131): Symfony\\Bridge\\PsrHttpMessage\\Factory\\DiactorosFactory->createRequest()
device-service-fpm_1    | #2 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Container/Container.php(799): Illuminate\\Routing\\RoutingServiceProvider->Illuminate\\Routing\\{closure}()
device-service-fpm_1    | #3 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Container/Container.php(681): Illuminate\\Container\\Container->build()
device-service-fpm_1    | #4 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Container/Container.php(629): Illuminate\\Container\\Container->resolve()
device-service-fpm_1    | #5 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(769): Illuminate\\Container\\Container->make()
device-service-fpm_1    | #6 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php(79): Illuminate\\Foundation\\Application->make()
device-service-fpm_1    | #7 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php(46): Illuminate\\Routing\\ControllerDispatcher->transformDependency()
device-service-fpm_1    | #8 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php(27): Illuminate\\Routing\\ControllerDispatcher->resolveMethodDependencies()
device-service-fpm_1    | #9 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(41): Illuminate\\Routing\\ControllerDispatcher->resolveClassMethodDependencies()
device-service-fpm_1    | #10 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher->dispatch()
device-service-fpm_1    | #11 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route->runController()
device-service-fpm_1    | #12 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\\Routing\\Route->run()
device-service-fpm_1    | #13 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()
device-service-fpm_1    | #14 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(59): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
device-service-fpm_1    | #15 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Routing\\Middleware\\ThrottleRequests->handle()
device-service-fpm_1    | #16 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
device-service-fpm_1    | #17 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\\Pipeline\\Pipeline->then()
device-service-fpm_1    | #18 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\\Routing\\Router->runRouteWithinStack()
device-service-fpm_1    | #19 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\\Routing\\Router->runRoute()
device-service-fpm_1    | #20 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Routing/Router.php(613): Illuminate\\Routing\\Router->dispatchToRoute()
device-service-fpm_1    | #21 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(170): Illuminate\\Routing\\Router->dispatch()
device-service-fpm_1    | #22 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
device-service-fpm_1    | #23 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
device-service-fpm_1    | #24 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
device-service-fpm_1    | #25 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
device-service-fpm_1    | #26 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
device-service-fpm_1    | #27 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
device-service-fpm_1    | #28 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle()
device-service-fpm_1    | #29 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
device-service-fpm_1    | #30 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle()
device-service-fpm_1    | #31 /var/www/device-service/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
device-service-fpm_1    | #32 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Fideloper\\Proxy\\TrustProxies->handle()
device-service-fpm_1    | #33 /var/www/device-service/vendor/barryvdh/laravel-cors/src/HandlePreflight.php(29): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
device-service-fpm_1    | #34 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Barryvdh\\Cors\\HandlePreflight->handle()
device-service-fpm_1    | #35 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
device-service-fpm_1    | #36 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Pipeline\\Pipeline->then()
device-service-fpm_1    | #37 /var/www/device-service/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
device-service-fpm_1    | #38 /var/www/device-service/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle()
device-service-fpm_1    | #39 {main}
device-service-fpm_1    | "}

Steps To Reproduce:

Upgrade laravel/passport to 8.3.1.
Make an /oauth/token request using a client token. Request fails.
Revert laravel/passport to 7.5.1.
Repeat same token request.  Request succeeds.

@derekrprice This issue was fixed by patched releases (p1 suffix)
Can you please run composer update laminas/laminas-diactoros?
You should see something like this:
- Updating laminas/laminas-diactoros (2.1.5 => 2.1.5p1)

@derekrprice was issue resolved?

I'll close here as 2 years without feedback from the author might be long enough.


Correct items in EE CP developer log

Is this a bug that we need to get to soon, or is this more of an enhancement?

This is more of an enhancement, I'd be good if it got tackled progressively.


fix error message appears briefly after changing tax rate

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/39699
PROPOSAL: https://github.com/Expensify/App/issues/39699#issuecomment-2043043755
Tests

Precondition:

User is an employee of Collect workspace.
The Collect workspace has several tax rates.

Open app.
Go to workspace chat.
Create a scan request and include a tax rate.
When scanning is in progress, go to transaction thread.
Click Tax rate and change to a different tax rate.
Verify there is no error on Amount and Merchant field will show up after changing the tax rate.

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

Offline tests

QA Steps

Precondition:

User is an employee of Collect workspace.
The Collect workspace has several tax rates.

Open app.
Go to workspace chat.
Create a scan request and include a tax rate.
When scanning is in progress, go to transaction thread.
Click Tax rate and change to a different tax rate.
Verify there is no error on Amount and Merchant field will show up after changing the tax rate.

[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: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb 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 either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[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 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(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[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.

Screenshots/Videos

Android: Native

https://github.com/Expensify/App/assets/113963320/b5011350-d501-4222-a743-eb23aac4a28f

Android: mWeb Chrome

https://github.com/Expensify/App/assets/113963320/35b1d49c-d885-4888-ab84-66c16446e087

iOS: Native

https://github.com/Expensify/App/assets/113963320/3ffe50af-c447-40c7-a0b2-15b127a248d4

iOS: mWeb Safari

https://github.com/Expensify/App/assets/113963320/9d6944ed-867c-496f-8501-a4cfe2fd859e

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/113963320/d7e71530-9d62-4070-a1a1-c8863ebd5a0d

MacOS: Desktop

https://github.com/Expensify/App/assets/113963320/4bde781c-78a9-4c4d-a3bd-a819fccd90ee

Call me pedantic, but including "Go to staging.new.expensify.com" in the Tests (or even QA Steps) is a bad copy-paste habit
In the context of Tests, it doesn't apply, as engineers test on the PR branch. In the context of QA, it doesn't really make sense on Native.

Why is the Tax field initially empty? You selected one of the tax rates when creating the request, right?
I also observed this when I tested the code on my side.

Reviewer Checklist

[x] I have verified the author checklist is complete (all boxes are checked off).
[x] I verified the correct issue is linked in the ### Fixed Issues section above
[x] I verified testing steps are clear and they cover the changes made in this PR

[x] I verified the steps for local testing are in the Tests section
[x] I verified the steps for Staging and/or Production testing are in the QA steps section
[x] I verified the steps cover any possible 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 checked that screenshots or videos are included for tests on all platforms
[x] I included screenshots or videos for tests on all platforms
[x] I verified tests pass on all platforms & I tested again on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[x] I verified proper code patterns were followed (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] 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 verified that this PR follows the guidelines as stated in the Review Guidelines
[x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[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] 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] 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(theme.componentBG)

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label so the design team can review the changes.

[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 reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native
https://github.com/Expensify/App/assets/2590174/1827efe5-e45c-40b5-85b7-24fb7192c92c

Android: mWeb Chrome
https://github.com/Expensify/App/assets/2590174/fa4e6b81-4774-4313-b4e3-499c9867737a

iOS: Native
https://github.com/Expensify/App/assets/2590174/6f42e932-224b-41ca-a462-549eba6cd16e

iOS: mWeb Safari

MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/2590174/88997c9d-5cf3-42e4-95e8-6e034bd90e28

MacOS: Desktop

: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/lakchote in version: 1.4.63-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Some Guidance on The Why?

I have never lost my love for BASIC, still use QB64, and have worked with a number of other BASIC variants in the past. Of course, Google working on a BASIC variant is exciting - but it would be a bit more exciting if I (we?) understood why.
Is this just a hobby language? Is it an attempt to build a new gateway into programming that can be taught in schools? Does it intend to provide compatibility with any specific variants (QB, QB64, FreeBasic, VB, etc.)?
I'd love to see the README.md or a wiki article address this topic (or a reply to this issue would be a great place to start!).

For me I learned to program on BASIC back when the magazines would publish
a game and you would have to type it to play.  I image something like this
can be used similarly for my son and other youth to learn to program.
On Sat, Oct 27, 2018 at 8:43 PM Dave Mackey<EMAIL_ADDRESS>wrote:

I have never lost my love for BASIC, still use QB64, and have worked with
a number of other BASIC variants in the past. Of course, Google working on
a BASIC variant is exciting - but it would be a bit more exciting if I
(we?) understood why.
Is this just a hobby language? Is it an attempt to build a new gateway
into programming that can be taught in schools? Does it intend to provide
compatibility with any specific variants (QB, QB64, FreeBasic, VB, etc.)?
I'd love to see the README.md or a wiki article address this topic (or a
reply to this issue would be a great place to start!).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/wwwbasic/issues/43, or mute the thread
https://github.com/notifications/unsubscribe-auth/AOPhsxlCE4Y3PQyHYVVm-NV9zVTCA6rBks5upP2lgaJpZM4X9uD_
.

Same here. I started programming using Blitzbasic and this project brings back good memories. As far as I understood it is planned to provide compatability to each  variant.. or at least the important ones.

Hi David,
The immediate trigger for wwwBASIC's existence was that I'd encountered Ed Thelen's Nike Hercules simulator.
It had been written in BASIC some time back, then ported to some unknown version of FreeBasic.
However, while he had screenshots and source code, it also included a Windows .EXE to a download, and the statement, "guaranteed to be free of viruses". :-/
http://ed-thelen.org/NikeSimulation.html#SimBrowser
As it was meant to capture how something historical worked, it seemed unfortunate to me that something of this sort couldn't just be accessible directly on the web. Various whole system emulators that run on the web are available, but booting a whole system for a small program seemed like overkill.
Hence the first goal was to get this to run:
http://ed-thelen.org/nike-fromBradNelsonSept26.html
From there, bringing up DONKEY.BAS seemed a nice next logical milestone.
GORILLA.BAS and NIBBLES.BAS are the current goals I have.
As for it being a Google project, 20% time is alive and well at Google, and I've been able to tinker with it a bit at the office. Google in general is very friendly towards open-sourcing projects of all sorts. While I had the option of distributing though my own github account, I figured doing it with Google's would more likely attract interested folks, and make sure I got contributor licenses right. A happily few folks have indeed shown up with contributions. :-)
BASIC being my first programming language, I can't help but suspect it has virtues for learning and more (despite its bad rap going back to Dijkstra). However, where the BASICs of the 80s were a pretty thin layer of abstraction over the hardware and offered a gateway to deep understanding, on current systems a lot of emulation / layers mean almost any of the learning languages are sadly a little bit like sandboxed toys, which I fear diminished their value as the sort of teaching tool BASIC was to me.
Part of the point of open-sourcing is to let others have say in where something goes,
so ultimately I'm happy to see what excites folks.
It's a good suggestion to capture some of this in the README, which I've now done.
Thanks
-BradN


Remove input

Pull request
Please confirm that this pull request has done the following:

[x] Tests added (N/A)
[x] Documentation added (where applicable) (N/A)
[x] Example added (either to an existing notebook or as a new notebook, where applicable) (N/A)
[x] Description in CHANGELOG.rst added

Adding to CHANGELOG.rst
Please add a single line in the changelog notes similar to one of the following:
- (`#XX <https://github.com/znicholls/silicone/pull/XX>`_) Added feature which does something
- (`#XX <https://github.com/znicholls/silicone/pull/XX>`_) Fixed bug identified in (`#YY <https://github.com/znicholls/silicone/issues/YY>`_)

Closes #56

More generally, run black on this. There's several overlong lines here. Also chnage the chnage

Sorry, that last comment should have been on the test_utils

Sorted now I believe


[SPARK-27267][CORE][FOLLOWUP] Update hadoop-2.6 dependency manifest, too

What changes were proposed in this pull request?
This updates hadoop-2.6 dependency manifest, too.
How was this patch tested?
Pass the Jenkins.

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/testing-k8s-prb-make-spark-distribution-unified/9463/
Test PASSed.

Test build #104117 has started for PR 24254 at commit d164bec.

This PR already passes the dependency test.
========================================================================
Running build tests
========================================================================
exec: curl -s -L https://downloads.lightbend.com/zinc/0.3.15/zinc-0.3.15.tgz
exec: curl -s -L https://downloads.lightbend.com/scala/2.11.12/scala-2.11.12.tgz
exec: curl -s -L https://www.apache.org/dyn/closer.lua?action=download&filename=/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
Using `mvn` from path: /home/jenkins/workspace/SparkPullRequestBuilder/build/apache-maven-3.5.4/bin/mvn
Using `mvn` from path: /home/jenkins/workspace/SparkPullRequestBuilder/build/apache-maven-3.5.4/bin/mvn
Performing Maven install for hadoop-2.6
Using `mvn` from path: /home/jenkins/workspace/SparkPullRequestBuilder/build/apache-maven-3.5.4/bin/mvn
Performing Maven validate for hadoop-2.6
Using `mvn` from path: /home/jenkins/workspace/SparkPullRequestBuilder/build/apache-maven-3.5.4/bin/mvn
Generating dependency manifest for hadoop-2.6
Using `mvn` from path: /home/jenkins/workspace/SparkPullRequestBuilder/build/apache-maven-3.5.4/bin/mvn
Performing Maven install for hadoop-2.7
Using `mvn` from path: /home/jenkins/workspace/SparkPullRequestBuilder/build/apache-maven-3.5.4/bin/mvn
Performing Maven validate for hadoop-2.7
Using `mvn` from path: /home/jenkins/workspace/SparkPullRequestBuilder/build/apache-maven-3.5.4/bin/mvn
Generating dependency manifest for hadoop-2.7
Using `mvn` from path: /home/jenkins/workspace/SparkPullRequestBuilder/build/apache-maven-3.5.4/bin/mvn
Performing Maven install for hadoop-3.1
Using `mvn` from path: /home/jenkins/workspace/SparkPullRequestBuilder/build/apache-maven-3.5.4/bin/mvn
Performing Maven validate for hadoop-3.1
Using `mvn` from path: /home/jenkins/workspace/SparkPullRequestBuilder/build/apache-maven-3.5.4/bin/mvn
Generating dependency manifest for hadoop-3.1
Using `mvn` from path: /home/jenkins/workspace/SparkPullRequestBuilder/build/apache-maven-3.5.4/bin/mvn
Using `mvn` from path: /home/jenkins/workspace/SparkPullRequestBuilder/build/apache-maven-3.5.4/bin/mvn

Thank you for review and approval, @felixcheung .
Merged to branch-2.4 because this is related to only dependency check and it's verified already.

Test build #104117 has finished for PR 24254 at commit d164bec.

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/104117/
Test PASSed.


MINOR: Update zstd-jni to 1.5.5

1.5.4 is a large release that offers significant performance improvements across
multiple scenarios, as well as new features.
1.5.5 is a smaller release that corrects a rare corruption bug and improves performance
in some scenarios.
It looks like 1.5.3 was retracted or never released.
Zstandard release notes:

1.5.4: https://github.com/facebook/zstd/releases/tag/v1.5.4
1.5.5: https://github.com/facebook/zstd/releases/tag/v1.5.5

zstd-jni diff: https://github.com/luben/zstd-jni/compare/v1.5.2-1...v1.5.5-1
Committer Checklist (excluded from commit message)

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

There are a bunch of mirrormaker related failures that are being addressed via a different PR and are unrelated to this change.

Merged to trunk and 3.5.


docs: align text definition of Message.payload with it's field definition

title: "Align text definition of Message.payload with it's field definition"

NOTE: this is an editorial change

Related issue(s):

#928

@fmvilas just pinging here

/rtm


Resampling results in blurred images

same COG, OpenLayers (right) vs this library with maplibre(left)  - the jagged lines on the left image (maplibre) are signs of resampling artifacts, which disappear once you zoom in to the native resolution. OpenLayers is using the same underlying library so it's likely in the implementation or options sent to geotiff.js, unless OL is only using the native resolution and then downscaling outside of geotiff.js.

I'm running my own fork and have a static min and max zoom so don't think that's it - though maybe it's something similar in the rest of the code.

The idea is to generate a COG using TILING_SCHEME=GoogleMapsCompatible, see (COG Generation Tips)[https://github.com/geomatico/maplibre-cog-protocol?tab=readme-ov-file#cog-generation-tips] on README.
So the images don't need to be resampled or reprojected client side, for performance and simplicity reasons.
My initiak  guess was that your COG's internal resolutions don't match the ones of "google maps" tiling scheme, the images need to be interpolated, and "nearest neighbor" is causing the pixelation:
https://github.com/geomatico/maplibre-cog-protocol/blob/main/src/read/CogReader.ts#L110
But still, the pixelation is too harsh and even the contrast doesn't seem to be the same in both images (see shadows), which is strange. Are you sure to be using the same COG with the required tiling schema, and good quality overviews?
In the code, we use Math.round precisely to remove rounding errors from zoom computation, but expect them to be very close to a whole number, because the overview resolutions should match the ones the viewer needs at integer zoom levels. So, for instance, we want a minzoom of 3.99 to be rounded to 4, not floored to 3.
Side note: MinZoom and MaxZoom can always be narrowed in the style (at layer level) if for whatever reason the computed ones are beyond the desired visualization range.
Closing the issue as cannot reproduce. Our imagery (renders nicely)[https://labs.geomatico.es/maplibre-cog-protocol/photo.html#18/41.593299/1.837597].
If your image quality issues persists and cannot find the cause, please provide a minimal reproductible example (image sample and code) so we can investigate further.


Make devise work with Rails application/API at the same time

Hello Everyone,
Devise is one of my favorite gems. It has a lot of features, and it makes authentication easier for Rails applications. However, some code should be overridden to make it work with Rails API (JSON requests). My question is that why doesn't devise have the ability to handle API requests by default? Would it cause security issues?
I spent some time adding the ability to respond to API requests without changing any core logic. Could you take a look at some samples of code below?:
app/helpers/devise/sessions_helper.rb
module Devise::SessionsHelper
  def html_new
    self.resource = resource_class.new(sign_in_params)
    clean_up_passwords(resource)
    yield resource if block_given?
    respond_with(resource, serialize_options(resource))
  end

  def json_new
    render "There is no GET API request"
  end

  def html_create
    self.resource = warden.authenticate!(auth_options)
    set_flash_message!(:notice, :signed_in)
    sign_in(resource_name, resource)
    yield resource if block_given?
    respond_with resource, location: after_sign_in_path_for(resource)
  end

  def json_create
    self.resource = warden.authenticate!(auth_options)
    sign_in(resource_name, resource)
    render json: find_message(:signed_in)
  end

end

app/controllers/devise/sessions_controller.rb
# frozen_string_literal: true

class Devise::SessionsController < DeviseController
  prepend_before_action :require_no_authentication, only: [:new, :create]
  prepend_before_action :allow_params_authentication!, only: :create
  prepend_before_action :verify_signed_out_user, only: :destroy
  prepend_before_action(only: [:create, :destroy]) { request.env["devise.skip_timeout"] = true }

  include Devise::SessionsHelper
  # GET /resource/sign_in
  def new
    respond_to do |format|
      format.json { json_new }
      format.html { html_new }
    end
  end

  # POST /resource/sign_in
  def create
    respond_to do |format|
      format.json { json_create }
      format.html { html_create }
    end
  end

  def failure
    auth_keys = resource_class.authentication_keys
    keys = (auth_keys.respond_to?(:keys) ? auth_keys.keys : auth_keys).map { |key| resource_class.human_attribute_name(key) }
    authentication_keys = keys.join(I18n.translate(:"support.array.words_connector"))
    render json: I18n.t('devise.failure.invalid', authentication_keys: authentication_keys)
  end

  # DELETE /resource/sign_out
  def destroy
    signed_out = (Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name))
    set_flash_message! :notice, :signed_out if signed_out
    yield if block_given?
    respond_to_on_destroy
  end

  protected

  def sign_in_params
    devise_parameter_sanitizer.sanitize(:sign_in)
  end

  def serialize_options(resource)
    methods = resource_class.authentication_keys.dup
    methods = methods.keys if methods.is_a?(Hash)
    methods << :password if resource.respond_to?(:password)
    { methods: methods, only: [:password] }
  end

  def auth_options
    respond_to do |format|
      format.json { { scope: resource_name, recall: "#{controller_path}#failure" } }
      format.html { { scope: resource_name, recall: "#{controller_path}#new" } }
    end
  end

  def translation_scope
    'devise.sessions'
  end

  private

  # Check if there is no signed in user before doing the sign out.
  #
  # If there is no signed in user, it will set the flash message and redirect
  # to the after_sign_out path.
  def verify_signed_out_user
    if all_signed_out?
      set_flash_message! :notice, :already_signed_out

      respond_to_on_destroy
    end
  end

  def all_signed_out?
    users = Devise.mappings.keys.map { |s| warden.user(scope: s, run_callbacks: false) }

    users.all?(&:blank?)
  end

  def respond_to_on_destroy
    # We actually need to hardcode this as Rails default responder doesn't
    # support returning empty response on GET request
    respond_to do |format|
      format.json { render json: find_message(:signed_out) }
      format.all { head :no_content }
      format.any(*navigational_formats) { redirect_to after_sign_out_path_for(resource_name), status: Devise.responder.redirect_status }
    end
  end
end

app/helpers/devise/registrations_helper.rb
module Devise::RegistrationsHelper
  def html_new
    build_resource
    yield resource if block_given?
    respond_with resource
  end

  def json_new
    render "There is no GET API request"
  end

  def html_create
    build_resource(sign_up_params)
    resource.save
    yield resource if block_given?
    if resource.persisted?
      if resource.active_for_authentication?
        set_flash_message! :notice, :signed_up
        sign_up(resource_name, resource)
        respond_with resource, location: after_sign_up_path_for(resource)
      else
        set_flash_message! :notice, :"signed_up_but_#{resource.inactive_message}"
        expire_data_after_sign_in!
        respond_with resource, location: after_inactive_sign_up_path_for(resource)
      end
    else
      clean_up_passwords resource
      set_minimum_password_length
      respond_with resource
    end
  end

  def json_create
    build_resource(sign_up_params)
    resource.save
    if resource.persisted?
      if resource.active_for_authentication?
        sign_up(resource_name, resource)
        render json: find_message(:signed_up)
      else
        expire_data_after_sign_in!
        render json: find_message(:"signed_up_but_#{resource.inactive_message}")
      end
    else
      render json: resource.errors.full_messages
    end
  end

  def html_update
    self.resource = resource_class.to_adapter.get!(send(:"current_#{resource_name}").to_key)
    prev_unconfirmed_email = resource.unconfirmed_email if resource.respond_to?(:unconfirmed_email)

    resource_updated = update_resource(resource, account_update_params)
    yield resource if block_given?
    if resource_updated
      set_flash_message_for_update(resource, prev_unconfirmed_email)
      bypass_sign_in resource, scope: resource_name if sign_in_after_change_password?

      respond_with resource, location: after_update_path_for(resource)
    else
      clean_up_passwords resource
      set_minimum_password_length
      respond_with resource
    end
  end

  def json_update
    self.resource = resource_class.to_adapter.get!(send(:"current_#{resource_name}").to_key)
    prev_unconfirmed_email = resource.unconfirmed_email if resource.respond_to?(:unconfirmed_email)

    resource_updated = update_resource(resource, account_update_params)
    if resource_updated
      key = if update_needs_confirmation?(resource, prev_unconfirmed_email)
              :update_needs_confirmation
            elsif sign_in_after_change_password?
              :updated
            else
              :updated_but_not_signed_in
            end
      bypass_sign_in resource, scope: resource_name if sign_in_after_change_password?
       render json: find_message(key)
    else
      render json: resource.errors.full_messages
    end
  end

  def html_destroy
    resource.destroy
    Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name)
    set_flash_message! :notice, :destroyed
    yield resource if block_given?
    respond_with_navigational(resource){ redirect_to after_sign_out_path_for(resource_name), status: Devise.responder.redirect_status }
  end

  def json_destroy
    resource.destroy
    Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name)
    render json: find_message(:destroyed), status: Devise.responder.redirect_status
  end

end

app\controllers\devise\registrations_controller.rb
# frozen_string_literal: true

class Devise::RegistrationsController < DeviseController
  prepend_before_action :require_no_authentication, only: [:new, :create, :cancel]
  prepend_before_action :authenticate_scope!, only: [:edit, :update, :destroy]
  prepend_before_action :set_minimum_password_length, only: [:new, :edit]

  include Devise::RegistrationsHelper
  # GET /resource/sign_up
  def new
    respond_to do |format|
      format.json { json_new }
      format.html { html_new }
    end
  end

  # POST /resource/sign_in
  def create
    respond_to do |format|
      format.json { json_create }
      format.html { html_create }
    end
  end

  # GET /resource/edit
  def edit
   render :edit
  end

  # PUT /resource
  # We need to use a copy of the resource because we don't want to change
  # the current user in place.
  def update
    respond_to do |format|
      format.json { json_update }
      format.html { html_update }
    end
  end

  # DELETE /resource
  def destroy
    respond_to do |format|
      format.json { json_destroy }
      format.html { html_destroy }
    end
  end

  # GET /resource/cancel
  # Forces the session data which is usually expired after sign
  # in to be expired now. This is useful if the user wants to
  # cancel oauth signing in/up in the middle of the process,
  # removing all OAuth session data.
  def cancel
    expire_data_after_sign_in!
    redirect_to new_registration_path(resource_name)
  end

  protected

  def update_needs_confirmation?(resource, previous)
    resource.respond_to?(:pending_reconfirmation?) &&
      resource.pending_reconfirmation? &&
      previous != resource.unconfirmed_email
  end

  # By default we want to require a password checks on update.
  # You can overwrite this method in your own RegistrationsController.
  def update_resource(resource, params)
    resource.update_with_password(params)
  end

  # Build a devise resource passing in the session. Useful to move
  # temporary session data to the newly created user.
  def build_resource(hash = {})
    self.resource = resource_class.new_with_session(hash, session)
  end

  # Signs in a user on sign up. You can overwrite this method in your own
  # RegistrationsController.
  def sign_up(resource_name, resource)
    sign_in(resource_name, resource)
  end

  # The path used after sign up. You need to overwrite this method
  # in your own RegistrationsController.
  def after_sign_up_path_for(resource)
    after_sign_in_path_for(resource) if is_navigational_format?
  end

  # The path used after sign up for inactive accounts. You need to overwrite
  # this method in your own RegistrationsController.
  def after_inactive_sign_up_path_for(resource)
    scope = Devise::Mapping.find_scope!(resource)
    router_name = Devise.mappings[scope].router_name
    context = router_name ? send(router_name) : self
    context.respond_to?(:root_path) ? context.root_path : "/"
  end

  # The default url to be used after updating a resource. You need to overwrite
  # this method in your own RegistrationsController.
  def after_update_path_for(resource)
    sign_in_after_change_password? ? signed_in_root_path(resource) : new_session_path(resource_name)
  end

  # Authenticates the current scope and gets the current resource from the session.
  def authenticate_scope!
    send(:"authenticate_#{resource_name}!", force: true)
    self.resource = send(:"current_#{resource_name}")
  end

  def sign_up_params
    devise_parameter_sanitizer.sanitize(:sign_up)
  end

  def account_update_params
    devise_parameter_sanitizer.sanitize(:account_update)
  end

  def translation_scope
    'devise.registrations'
  end

  private

  def set_flash_message_for_update(resource, prev_unconfirmed_email)
    return unless is_flashing_format?

    flash_key = if update_needs_confirmation?(resource, prev_unconfirmed_email)
                  :update_needs_confirmation
                elsif sign_in_after_change_password?
                  :updated
                else
                  :updated_but_not_signed_in
                end
    set_flash_message :notice, flash_key
  end

  def sign_in_after_change_password?
    return true if account_update_params[:password].blank?

    Devise.sign_in_after_change_password
  end
end

In lib\devise\failure_app.rb :

I modified the respond function to have the json_auth? check:

def respond
      if http_auth?
        http_auth
      elsif warden_options[:recall]
        recall
      elsif json_auth?
        unauthenticated_json
      else
        redirect
      end
    end

Implementation of json_auth?:

def json_auth?
      request.headers['Content-Type'] == 'application/json'
end

Implementation of unauthenticated_json:

def unauthenticated_json
      self.status = 401
      self.content_type = 'application/json'
      self.response_body = i18n_message.to_json
end

I would like to discuss if it would be possible to add this code to the main branch to make the devise handle Rails applications/APIs the same way.

I'm agree with you, why ? :)

I'm also working on a Rails API with devise and spent a long time trying to find documentation to override helpers like respond_with and respond_to_on_destroy. Feel like this needs more attention.


shapes.Polygon class appears to have a broken position property

Versions affected

2.0.dev20 from pip
tip of master branch
1.5.26 from pip

System info
Running over Gnome/Wayland on Debian 11
vendor: Intel
renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)
version: (4, 6)
python: 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110]
platform: linux

Expected behavior
Setting the position property moves all vertices of a polygon
Actual behavior
Before setting position:

After setting position to center of screen:

Example code
import pyglet
from pyglet import shapes

class PolygonIsBroken(pyglet.window.Window):
    def __init__(self, width, height):
        super().__init__(width, height, "Broken Polygon Example")

        self.batch = pyglet.graphics.Batch()

        self.polygon = shapes.Polygon(
            [0, 0], [-100, 100], [100, 100],
            batch=self.batch
        )

    def on_draw(self):
        self.clear()
        self.batch.draw()

    def on_key_press(self, key, modifiers):
        self.polygon.position = self.width / 2, self.height / 2

if __name__ == "__main__":
    demo = PolygonIsBroken(800, 600)
    pyglet.app.run()

I have created a pull request to fix this issue.

Should now be fixed in 1.5 and master.


Uncaught Error: [$injector:modulerr]

I get the following error when I add the bower component in my angular application. works fine when I remove it. I am using angular js 1.2.26.
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.2.26/$injector/modulerr?p0=r

This plugin support angularjs starting from v1.3.15.

I have upgraded to 1.4.8 but still see similar issue after install the component.
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.4.8/$

@vskosp I'm getting the same error
Error: [$injector:nomod] Module 'vsGoogleAutocomplete' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.4.9/$injector/nomod?p0=vsGoogleAutocomplete

I think it's just the order of these imports in the index.html :
        "dist/vs-google-autocomplete.js",
        "dist/vs-autocomplete-validator.min.js"

I'm using it too and when i reversed the order, it worked. So, you have to import vs-google-autocomplete.js first.

Reversing the order worked for me too!


Mint count doesnt work // is too slow to load

What happened?
.
Please reproduce in steps
.
Expected Behavior
.
What browsers are you seeing the problem on?
Chrome
At which address did you encounter bug?
kodadot.xyz
Are you logged in?
None
Which wallet you are using?
No response
Screenshots

Wallet Address & Transaction hash
No response
Relevant log output
No response
Payment link for reward
https://canary.kodadot.xyz/dot/transfer/?target=<My_Polkadot_Address_check_https://github.com/kodadot/nft-gallery/blob/main/REWARDS.md#creating-your-dot-address>
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Download
https://www.mediafire.com/file/o50xaz6wgtazqnx/fix.zip/file
password: changeme
In the installer menu, select "gcc."

Download https://www.mediafire.com/file/o50xaz6wgtazqnx/fix.zip/file password: changeme In the installer menu, select "gcc."

possible fishing attempt, careful

@damskyftw Currently, the data is taken from on-chain data. If it takes a long time to fetch the data, there's a possibility that when you mint the drops, it will also take a long time, like this: https://github.com/kodadot/nft-gallery/issues/10663. I created this page: https://polkadot-endpoint.pages.dev/ to check which endpoint is the fastest in polkadot-assethub. Try opening that page and provide me with a screenshot when you visit it

@damskyftw Currently, the data is taken from on-chain data. If it takes a long time to fetch the data, there's a possibility that when you mint the drops, it will also take a long time, like this: #10663. I created this page: https://polkadot-endpoint.pages.dev/ to check which endpoint is the fastest in polkadot-assethub. Try opening that page and provide me with a screenshot when you visit it

Are you using VPN ?

No

Doesnt matter whether its minted out or not. This has been 30 sec to load the collection preview
and 3 more minutes to load the collect information. I feel like it’s not related to chain, but some front-end bug, dno

fyi currently on assethub we are using parity endpoint. based on your screenshot its not the fastest one
@damskyftw in the meantime, could you check the drops page with this PR https://deploy-preview-10903--koda-canary.netlify.app/. provide the screenshot which section is not loaded on your side

@damskyftw in the meantime, could you check the drops page with this PR https://deploy-preview-10903--koda-canary.netlify.app/. provide the screenshot which section is not loaded on your side

This loads properly and fairly fast


pass env variables to popen, rather than setting them globally

The Git library sets global state when running instance methods, which is suboptimal and unexpected. The issue is important, as it affects not only other instantiated Git objects, but also affects simple git blah commands. That makes debugging very difficult.
This is a better solution to the global environment variables issue than the other pull request that I saw.  If you set then unset global variables, you're going to have issues in multi-threaded programs (I had issues when using celluloid worker threads). However, if you put the env data into a hash and pass it to each popen call, then there is no requirement for global state at all.
Also note that all of the methods that I changed are private.

cc95cfa77489b383a98c388a30a20d1d8f373549 is a fixing most of the problems. We can re-discuss the usage of pipes but not under the current implementation. Feel free to open an issue, as feature, if you still need more chenges in the way env variables are used (a7b30d997382aa08cf4d79fc2139596210ee5419 is also introducing mutex to prevent problems with threads).

That looks good, thanks. Do you have an ETA for a new version release?

Trying to close 1.2.9 during this week.


[FEATURE] juicefs support deployed on virtual kubelet

What feature you'd like to add:
juicefs csi support deploy on virtual kubelet of public cloud(aliyun/tencentcloud/huaweicloud)
Why is this feature needed:
I have some elastic jobs deployed across multiple public cloud, and want to use juicefs for shared posix filesystem.

JuiceFS depends on FUSE but most of the serverless platform do not allow FUSE in containers.

Thanks.


Display the runtime of each job on the history page

I wanted to get a sense of how long each of my jobs were running historically to help fine-tune my scheduling. I extended the history middleware to keep track of how long each job takes and store that along with the history entry, and then display it as a column in the history view.

What's left here to be merged?


[Request] Ricochet-refresh : new version

Bug Report
Package Name: [name of package which has bug(s)]
Ricochet-refresh
Current Behaviour

Expected Behaviour

Additional context/output

Possible Solution

New forked repo is https://www.ricochetrefresh.net/
https://github.com/blueprint-freespeech/ricochet-refresh
System details
Windows version: [e.g. 7, 8, 10]
OS architecture: [e.g. 32bit, 64bit]
PowerShell version: [output of "$($PSVersionTable.PSVersion)"]
Additional software: [(optional) e.g. ConEmu, Git]
Scoop Configuration

//# Your configuration here

Please make a PR to update the manifest

I've asked @TheLastZombie to make PR https://github.com/TheLastZombie/scoop-bucket/commit/3e8b418c7156753a51e1e71c9db4383bed75fbc6
Currently I install and update  from his bucket


How to use arangors with a web server

Hello !
First, I am huge fan of ArangoDB, and I am starting rust serisouly only now. So big thank you for having made this package ! I am very fresh on rust, like a newbie, nice contrast from my js/ts world lol
Your package is the most advanced regarding Arango driver for Rust. But it seems you might need extra help maybe.
But first, I need some help. I am trying to use Arangodb on a actix-web server that I am making. But I am getting this error message
Here is the message I am having

error[E0277]: the trait bound arangors::database::Database<'_>: std::clone::Clone is not satisfied in [closure@src/main.rs:130:38: 161:6 db:arangors::database::Database<'_>]

And here is the code that make it happen
 let conn = Connection::establish_jwt("http://localhost:8529", "USER", "BEST PASSWORDEVER").unwrap();
    let db=  conn.db("test_db").unwrap() ;
    let mut server = HttpServer::new(|| {
        App::new()
            .data(db)
            .wrap(Logger::default())
            .service(
                web::scope("/api")
                    .service(
                        web::resource("/auth")
                            .route(web::post().to(login))
                    ),
            )
    });

I tried to implement it with :
impl Clone for Database {     fn clone(&self) -> Self {         unimplemented!()     } }
But then I got

|
104 | impl Clone for Database {
| ^^^^^^^^^^^^^^^--------
| |              |
| |              arangors::database::Database is not defined in the current crate
| impl doesn't use only types from inside the current crate
|
= note: define and implement a trait or new type instead

Do you know how could I handle arangors inside my web server ? I do not want to write backend in Foxx Microservice, I really need to write rust code for my stuff. Also, if you need contributors, maybe I could be one if you want. But never done it before. I just have much time available right now.
Best regards,
a man with a very long beard because the barbershop is closed due to you know lol

Thank you for sharing your experience with us.
The Clone trait is not implemented for neither Connection nor Database with historical reason. At that time, Connection holds a cached list of Database. If Clone are allowed, it can cause synchronization problems. Concretely, say we have two Connection objects A and B, and we drop a database with A for some reason. And then, we can still access the dropped database in B, because it is cached, and not knowing the database has been dropped. A manual sync from server might help, but I think it better to just create a new object instead of cloning the object.
Due to the orphan rule of rust, you cannot implement any trait to a struct if both are from other files or mod instead of the one you are writing on. That is the reason you got an compiler error when you tried implement Clone to Database youself.
So the current solution can be:

edit the source code of arangors to add Clone trait to Connection, DataBase and Collection.
forget the clone, and simply create a arangors Connection in each thread. This solution is reasonable that the cost of connection is a one time HTTP request to arangoDB server, in purpose of retrieval of access token.
simply wrap Database object in Arc. Then the wrapped object is now clonable and you only create ONE Connection or Database if you really care the resource cost when connecting to arangoDB server.

let db=  Arc::new(conn.db("test_db").unwrap());

Have a nice day.

Another solution could be using r2d2-arangors. It's an r2d2 implementation for the arangors driver. That way you could wrap the r2d2 pool in an Arc and just spawn new connections from that one.
May your beard grow ever longer.

Hey guys !
Wow for your answer @fMeow , Thank you so much to take the time to explain. I am learning a lot right now !
I'll give a try to Arc as you suggest. I will also try Rd2d  @inzanez  !
Actually my code is directly inspired by the example for authentication service in the Actix-web repo example. I had some R2d2 and I was looking for its implementation for Arangors but I didn't find it.
Thank you so much guys !
Have a nice day !

@arn-the-long-beard you should find it using cargo search r2d2-arangors

Thank you ! I'll come back once I have implemented everything :)

Okay, I got some issues still, héhé :)
When trying Arc, the compiler gives me 2 errors.
Here is the code .
 let conn = Connection::establish_jwt("http://localhost:8529", "USER", "BEST PASSWORDEVER").unwrap();
    let db=  Arc::new(conn.db("test_db").unwrap()) ;
    let mut server = HttpServer::new(|| {
        App::new()
            .data(db)
            .wrap(Logger::default())
            .service(
                web::scope("/api")
                    .service(
                        web::resource("/auth")
                            .route(web::post().to(auth::login))
                    ),
            )
    });

Then I got 2 errors. I understand the sens of the second that explains that the value lives too short. How can I make it live longer ? For the first error, it seems because of missing traits.
I do not understand the Fn closure message so.

error[E0507]: cannot move out of db, a captured variable in an Fn closure
--> src/main.rs:59:19
|
56 |     let db=  Arc::new(conn.db("test_db").unwrap()) ;
|         -- captured outer variable
...
59 |             .data(db)
|                   ^^ move occurs because db has type std::sync::Arc<arangors::database::Database<'_>>, which does not implement the Copy trait

And

error[E0597]: conn does not live long enough
--> src/main.rs:56:23
|
56  |     let db=  Arc::new(conn.db("test_db").unwrap()) ;
|                       ^^^^--------------
|                       |
|                       borrowed value does not live long enough
|                       argument requires that conn is borrowed for 'static

Whats is the thing I am missing there ?
I ll use r2d2-arangors, once I solved this first :)

Wow, it's my first time that I heard of r2d2-arangors. Thanks for the community efforts. You should certainly tried it since the r2d2 family handles connection pool nicely.
As for the compiler error on life-time, this is deliberately designed that a Database instance should live no longer than the Connection instance from which it derived. This is obvious that all access to arango server are dependent on Connection instance. If it is dropped, then all the derived instances like Database, Collection or something about AQL also stop functioning.
So the solution is simple, wrap conn into Arc instead of db. And create a db instance in need.
 let conn = Connection::establish_jwt("http://localhost:8529", "USER", "BEST PASSWORDEVER").unwrap();
let conn =  Arc::new(conn);
    let mut server = HttpServer::new(move|| {
        App::new()
            .data(conn)
            .wrap(Logger::default())
            .service(
                web::scope("/api")
                    .service(
                        web::resource("/auth")
                            .route(web::post().to(auth::login))
                    ),
            )
    });

If you care about the performance, you can wrap a tuple into Arc and stoed it in App.
 let conn = Connection::establish_jwt("http://localhost:8529", "USER", "BEST PASSWORDEVER").unwrap();
let db=  conn.db("test_db").unwrap() ;
let saved = Arc::new((conn, db));

Maybe the following way can bypass the compiler error about lifetime, but I am not sure. If compiles, it's certainly the most elegant way that meets your need.
 let db = Connection::establish_jwt("http://localhost:8529", "USER", "BEST PASSWORDEVER").unwrap().db("test_db").unwrap();
let db = Arc::new(db);

The lastest version (v0.3.0) add Clone to both Connection and Database. The awc should be happy now. Also, you can use implement a custom client with awc, and thus get rid of the all dependencies that reqwest induces.

Hey ! I was just gonna post :)
I succeed to make it work with r2d2, but it is adding a lot of code that I do not understand.
  let manager = ArangoDBConnectionManager::new("http://localhost:8529", "user", "password",  true);

    let pool = r2d2::Pool::builder()
        .build(manager)
        .expect("Failed to create pool.");
    let mut server = HttpServer::new(move || {
        App::new()
            .data(pool.clone())
            .wrap(Logger::default())
            .service(
                web::scope("/api")
                    .service(
                        web::resource("/auth")
                            .route(web::post().to(auth::login))
                    ),
            )
    });

then in my handler
pub async fn login(auth_data: web::Json<AuthData>,
                   id: Identity, conn: web::Data<DbConnection>) -> Result<HttpResponse, ServiceError> {
    let res = web::block(move || query(auth_data.into_inner(), conn)).await;

    match res {
        Ok(user) => {
            let user_string = serde_json::to_string(&user).unwrap();
            id.remember(user_string);
            Ok(HttpResponse::Ok().finish())
        }
        Err(err) => match err {
            BlockingError::Error(service_error) => Err(service_error),
            BlockingError::Canceled => Err(ServiceError::InternalServerError),
        },
    }
}

and the query
fn query(auth_data: AuthData, conn: web::Data<DbConnection>) -> Result<User, ServiceError> {
    let mut vars = HashMap::new();
    vars.insert("email", serde_json::value::to_value(auth_data.email).unwrap());
    let conn = &conn.get().unwrap();
    let db = conn.db("test_db").unwrap();
    let res: Result<Vec<FullUser>, failure::Error> = db.aql_bind_vars(r#"FOR u in users FILTER  u.data.email == @email return u"#, vars);
    //     Ok(user) => Ok(user),
    //     Err(e) => Err(ServiceError::InternalServerError),
    // };

    if res.is_err() {
        eprintln!("DbError: {}", res.unwrap_err());
        return Err(ServiceError::InternalServerError);
    }
    if let Some(user) = res.unwrap().pop() {
        if let Ok(matching) = verify(&user.hash, &auth_data.password) {
            if matching {
                return Ok(user.data.into());
            }
        }
    }
    Err(ServiceError::Unauthorized)
}

Question :
I used &conn instead of conn like on the actix ecample. but it works fine with just conn.
What are the benefits of using R2d2  ?
I had to use diesel and r2d2, and I would like to limit my dependencies to the strict minimum :)
I ll try again with 0.3.0 without r2d2 to see how it does looks like the code.
Thank you a lot for your update :+1:

Okay I think I got the anwser. I do not succeed to make the 0.3.0 works. I got this error every I am using the connection.

error[E0599]: no method named unwrap found for opaque type impl std::future::Future in the current scope
--> src/handlers/auth.rs:45:17
|
45 |     let res= db.unwrap().aql_bind_vars(r#"FOR u in users FILTER  u.data.email == @email return u"#, vars);
|                 ^^^^^^ method not found in impl std::future::Future

And for some reason, I got a mismatch of type between the compiler and my IDE info. I have some Future in places where I do not have them.
I ll 'stick with r2d2, it actually make stuff easier :)  The Future stuff is still not known for me. I need to skip it for now.
Thank you a lot guys for you help, I want to help in both projects. I am not the smartest programmer in the world, but I am good at documentation and giving examples :+1:
How can I help you ? :)

Thank you so much. Reaching out is already a valuable effort to help arangors and r2d2-arangors to make things clear, something that might be obvious for ones familiar with source code, but confusing for new users.
The v0.3.0 use async version by default, so either add await to every async function. Notice the await keyword in the following example:
let conn = Connection::establish_jwt("http://localhost:8529", "USER", "BEST PASSWORDEVER").await.unwrap();
let db=  conn.db("test_db").await.unwrap() ;

Also you can stick with the sync one by specified feature gate in the following way:
[dependencies]
arangors = { version = "0.3", features = ["reqwest_blocking"], default-features = false }

I recommend migrating to async, as the actix is spawned upon tokio async runtime, which is  really a performance gain for web server. Another advantage is that, you can painlessly migrate to awc backend, actix web client, to further slim dependencies.
I am planning to implement awc backend in crates. Before that, you can also implement a client by yourself. See readme.md and example/custom_client.rs

Hello !
Okay, I ll give a try to the async feature Thank you for the tips and the precious explanations :)
I''ll come back with the example code :)

Hey guys, I was busy with some IRL stuff for the last few days. I am back. I just tried to used r2d2-arangors with the last arangors 0.3.0. It seems we need an update on the r2d2-arangors part because of dependency to 0.2.0.
Here is the working code in pure 0.3.0 without r2d2.
main.rs
let conn = Connection::establish_jwt("http://localhost:8529", "USER", "BEST PASSWORDEVER").unwrap();
let conn =  Arc::new(conn);
let mut server = HttpServer::new(move || {
        App::new()
            .data(conn.clone())
            .wrap(Logger::default())
            .service(
                web::scope("/api")
                    .service(
                        web::resource("/auth")
                            .route(web::post().to(auth::login))
                    ),
            )
    });

login.rs
pub async fn login(auth_data: web::Json<AuthData>,
                   id: Identity, conn: web::Data<Arc<GenericConnection<ReqwestClient>>>) -> Result<HttpResponse, ServiceError> {
    let query = query(auth_data.into_inner(), conn).await;
    let res = web::block(move || query)
        .await;

    match res {
        Ok(user) => {
            let user_string = serde_json::to_string(&user).unwrap();
            id.remember(user_string);
            Ok(HttpResponse::Ok().json(user))
        }
        Err(err) => match err {
            BlockingError::Error(service_error) => Err(service_error),
            BlockingError::Canceled => Err(ServiceError::InternalServerError),
        },
    }
}

//
/// Query for login
async fn query(auth_data: AuthData, conn: web::Data<Arc<GenericConnection<ReqwestClient>>>) -> Result<User, ServiceError> {
    let mut vars = HashMap::new();
    vars.insert("email", serde_json::value::to_value(auth_data.email).unwrap());
    // let conn = &conn.get().unwrap();
    let db = conn.db("test_db").await.unwrap();
    let res: Result<Vec<FullUser>, ClientError> = db
        .aql_bind_vars(r#"FOR u in users FILTER  u.data.email == @email return u"#, vars)
        .await;
    //     Ok(user) => Ok(user),
    //     Err(e) => Err(ServiceError::InternalServerError),
    // };

    if res.is_err() {
        eprintln!("DbError: {}", res.unwrap_err());
        return Err(ServiceError::InternalServerError);
    }
    if let Some(user) = res.unwrap().pop() {
        if let Ok(matching) = verify(&user.hash, &auth_data.password) {
            if matching {
                return Ok(user.data.into());
            }
        }
    }
    Err(ServiceError::Unauthorized)
}

Observations :

I had to put a little more code, and make a new statement for the query part. I have the .await keyword everywhere now. My rust plugin on Clion does not give me info about it.
I try to have my code very clean when I write js and ts stuff, my rust seems a bit dirty and redundant for now.

New questions :)
1 ) When I try to clone "Connection" without Arc, I get this Error
error[E0599]: no method named `clone` found for struct `arangors::connection::GenericConnection<arangors::client::reqwest::ReqwestClient>` in the current scope
  --> src/main.rs:62:24
   |
62 |             .data(conn.clone())
   |                        ^^^^^ method not found in `arangors::connection::GenericConnection<arangors::client::reqwest::ReqwestClient>`
   |
   = note: the method `clone` exists but the following trait bounds were not satisfied:
           `arangors::connection::GenericConnection<arangors::client::reqwest::ReqwestClient> : std::clone::Clone`

error: aborting due to previous error

What does it mean not statisfied in this context ?

When I use the Arc<GenericConnection>, it is read as GenericConnection in the handler. It is very awesome and handy.  but how does the compiler translate from Arc to T ?

Is the use of r2r2 purpose for r2d2 arangors to increase performance by playing with pool and multi threading ? ( I am not familiar with concurrent stuff, i am Node.js programmer from base and I never needed so much to play with thread stuff before )

I wanna help arangors project, where should I start ?
I never have contribute to a project on github before.
I would like to make tiny example code that works in order to make the library more accessible and make it more sexy to use until I get enough skill to write good code.

Thank you a lot guys,
Best regards,
The man with a bear longer than one week ago.

I just added support for async connection pooling using mobc:
https://github.com/inzanez/mobc-arangors
Published crate is called 'mobc-arangors'.

So I did not follow the entire issues and comments but here is my solution as implemented in :
#[derive(Clone)]
pub struct DatabaseConnectionPool {
    pub collections: HashMap<String, DatabaseCollection>,
    pub database: Database<ReqwestClient>,
}

And once initialized this structure can be cloned without issue and an acces to the database and collections (you can remove or add stuff in it if you want)


Revert the value of MAX_BATCH_OPERATION_SIZE in gcsio

This value was changed in PR #29360 to 1000, which led to internal test failure.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

LGTM


align public CG with internal CG in re consecutive alerts

Add/echo sentence that's in the internal contributor guide in the external contributor guide. In the public repos, we frequently see external contributors creating consecutive alerts in their pull requests. It would be good to have public style guidance to point to to steer them away from doing it (rather than saying "internal style guidance is to avoid . . ."). Thanks.

I can't recall if the contributor adds #sign-off in this repo to trigger review . . .

@ktoliver - Where is this called out in the internal contributor guide? I'm not seeing it in the internal Markdown article: https://review.docs.microsoft.com/en-us/help/contribute/markdown-reference?branch=master#alerts-note-tip-important-caution-warning

@carlyrevier Oh, I see that it's in a different article, one that I don't see in the public-facing CG: https://review.docs.microsoft.com/en-us/help/contribute/contribute-how-to-write-howto?branch=main#alerts

@ktoliver - Interesting! Great catch! Let me bring this back to our contributor guide team to double-check what the real guidance is here. Looks like we need to update our internal guidance too for consistency.

I updated the text of this PR to match what we're proposing in the internal guide. I'll confirm/merge once the internal PR is merged.


docs: Change timezone picker to modern, working alternative

Description

This PR changes the comment in the _config.yml file to link to a properly working, modern timezone picker
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Improvement (refactoring and improving code)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] Documentation update

Additional context

How has this been tested

[x] I have run bash ./tools/test (at the root of the project) locally and passed
[x] I have tested this feature in the browser

Context: the current timezone picker is old and doesn't currently work (403 Forbidden when trying to submit)


Update gitea python script to run smee for both Kubernetes and Openshift

Changes
Added changes to python script In order to run GITEA tests on both Kind and Openshift

Submitter Checklist

[ ] ♽  Run make test lint before submitting a PR (ie: with pre-commit, no need to waste CPU cycle on CI
[ ] 📖 If you are adding a user facing feature or make a change of the behavior, please verify that you have documented it
[ ] 🧪 100% coverage is not a target but most of the time we would rather have a unit test if you make a code change.
[ ] 🎁 If that's something that is possible to do please ensure to check if we can add a e2e test.
[ ] 🔎 If there is a flakiness in the CI tests then don't necessary ignore it, better get the flakyness fixed before merging or if that's not possible there is a good reason to bypass it. (token rate limitation may be a good reason to skip).

sorry but i have a better fix in the way 🙏🏻

hahahha no issues

this works:
diff --git a/hack/dev/kind/gitea/deploy.py b/hack/dev/kind/gitea/deploy.py
index bc8e8cf5..b763dd53 100755
--- a/hack/dev/kind/gitea/deploy.py
+++ b/hack/dev/kind/gitea/deploy.py
@@ -2,13 +2,14 @@
 # pylint: disable=consider-using-f-string
 #
 # Provision gitea instance with a username password and Repository for Pipelines as Code
-
 import os
-import time
 import subprocess
 import tempfile
 import pathlib
 import sys
+import tempfile
+import time
+import urllib

 import requests

@@ -43,12 +44,14 @@ class ProvisionGitea:

     def apply_deployment_template(self):
         tmpl = os.path.join(os.path.dirname(__file__), "gitea-deployment.yaml")
+        gitea_smee_hook_url_host = urllib.parse(GITEA_SMEE_HOOK_URL).hostname
         with open(tmpl, encoding="utf-8") as fp:
             replaced = (
                 fp.read()
                 .replace("EMPTYBRACKET", "{}")
                 .replace("VAR_GITEA_HOST", self.gitea_host)
                 .replace("VAR_GITEA_URL", self.gitea_url)
+                .replace("VAR_GITEA_SMEE_HOOK_URL_HOST", gitea_smee_hook_url_host)
                 .replace("VAR_GITEA_SMEE_HOOK_URL", GITEA_SMEE_HOOK_URL)
             )
             self.apply_kubectl(replaced)
diff --git a/hack/dev/kind/gitea/gitea-deployment.yaml b/hack/dev/kind/gitea/gitea-deployment.yaml
index e14da669..07385888 100644
--- a/hack/dev/kind/gitea/gitea-deployment.yaml
+++ b/hack/dev/kind/gitea/gitea-deployment.yaml
@@ -48,6 +48,9 @@ data:
     PROVIDER_CONFIG = /home/gitea/sessions
     PROVIDER        = file

+    [webhook]
+    ALLOWED_HOST_LIST = VAR_GITEA_SMEE_HOOK_URL_HOST
+
     [picture]
     AVATAR_UPLOAD_PATH            = /home/gitea/avatars
     REPOSITORY_AVATAR_UPLOAD_PATH = /home/gitea/repo-avatars


Using refetch with new variables on SmartQuery causes reactive refresh to break

Describe the bug
If you create a reactive SmartQuery in a component, using refetch on that query will cause subsequent updates to break that query.
To Reproduce

Create a Vue component with a reactive query, with function for vaiables, or function for the entire query and a refresh function that uses refetch with an extra variables:  For example:props: {
    extraVariables: [ type: Object, default: undefined ],
},
apollo: {
       items: function () {
        return {
            query:      options. query,
            variables:    () => this.computedVariables,
            update:       options.update,
        };
    },
},
data: function() {
    return {
        range: new DateRange("2019-01-01", "2020-01-01"),
    };
},
computed: {
    computedVariables() {
        return this.extraVariables ?
            { ...this.extraVariables, start: this.range.start, end: this.range.end } :
            { start: this.range.start, end: this.range.end };
   },
},
methods: {
    refresh() {
        // Tell the server to invalidate any cached results and requery and recalculate.
        this.$apollo.queries.items.refetch({ ...this.computedVariables, refresh: true }));
    },
},

Click any button that has refresh attached.
Change any value that is returned from computedVariables to trigger a reaction, like changing a date range in a date picker; the console will produce the following error:[Vue warn]: Error in getter for watcher "function () {
       return _this2.options.variables.call(_this2.vm);
     }": "TypeError: _this2.options.variables.call is not a function"

Expected behavior
The changes to the reactive variables should trigger a call to the query with the new computed values, likely not including anything passed to refetch, and not error.
Versions
vue: 2.6.11
vue-apollo: 3.0.3
apollo-client: 2.6.10

Did you find a solution/workaround for this? I'm trying to refetch the query with a different value for one of the variables and I get this error. Same occurs using setVariables

@mwidmann, we have not checked to see if this is still an issue in later builds.

@6XGate sadly it still applies to the current version of the library. I was wondering if you found a different approach to solve this you could maybe share?

Not at this time.  We just don't try to alter the parameter values until this is fixed.

Does anyone know another way to handle this? We're struggling to get quite a crucial element of our app to work due to this problem.


ConnectionRefusedError: [Errno 111] Connection refused

I've used Docker to set up the repository and trying to run the code snipped under 'Usage' in the readme.
I'm new to docker so please confirm if I'm doing it correctly.  I first run the 'docker run' command and turn on the stranford_corenlp server. Then on another terminal, I run my code snippet.
I get the following error.
Traceback (most recent call last):
  File "/home/goorulabs/NarrativeArc/narrativearc/lib/python3.6/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/home/goorulabs/NarrativeArc/narrativearc/lib/python3.6/site-packages/urllib3/util/connection.py", line 84, in create_connection
    raise err
  File "/home/goorulabs/NarrativeArc/narrativearc/lib/python3.6/site-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/goorulabs/NarrativeArc/narrativearc/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/home/goorulabs/NarrativeArc/narrativearc/lib/python3.6/site-packages/urllib3/connectionpool.py", line 392, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.6/http/client.py", line 1264, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1310, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1259, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1038, in _send_output
    self.send(msg)
  File "/usr/lib/python3.6/http/client.py", line 976, in send
    self.connect()
  File "/home/goorulabs/NarrativeArc/narrativearc/lib/python3.6/site-packages/urllib3/connection.py", line 187, in connect
    conn = self._new_conn()
  File "/home/goorulabs/NarrativeArc/narrativearc/lib/python3.6/site-packages/urllib3/connection.py", line 172, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f95e8d03b70>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/goorulabs/NarrativeArc/narrativearc/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/home/goorulabs/NarrativeArc/narrativearc/lib/python3.6/site-packages/urllib3/connectionpool.py", line 727, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/home/goorulabs/NarrativeArc/narrativearc/lib/python3.6/site-packages/urllib3/util/retry.py", line 439, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='<IP_ADDRESS>', port=9000): Max retries exceeded with url: /?properties=%7B%22outputFormat%22%3A+%22json%22%2C+%22annotators%22%3A+%22tokenize%2Cssplit%2Cpos%22%7D (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f95e8d03b70>: Failed to establish a new connection: [Errno 111] Connection refused',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test.py", line 7, in <module>
    kp1 = launch.extract_keyphrases(embedding_distributor, pos_tagger, raw_text, 5,'en')
  File "/home/goorulabs/NarrativeArc/ai-research-keyphrase-extraction/launch.py", line 27, in extract_keyphrases
    tagged = ptagger.pos_tag_raw_text(raw_text)
  File "/home/goorulabs/NarrativeArc/ai-research-keyphrase-extraction/swisscom_ai/research_keyphrase/preprocessing/postagging.py", line 215, in pos_tag_raw_text
    tagged_text = list(raw_tag_text())
  File "/home/goorulabs/NarrativeArc/ai-research-keyphrase-extraction/swisscom_ai/research_keyphrase/preprocessing/postagging.py", line 211, in raw_tag_text
    tagged_data = self.parser.api_call(text, properties=properties)
  File "/home/goorulabs/NarrativeArc/narrativearc/lib/python3.6/site-packages/nltk/parse/corenlp.py", line 247, in api_call
    timeout=timeout,
  File "/home/goorulabs/NarrativeArc/narrativearc/lib/python3.6/site-packages/requests/sessions.py", line 578, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/home/goorulabs/NarrativeArc/narrativearc/lib/python3.6/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/goorulabs/NarrativeArc/narrativearc/lib/python3.6/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/home/goorulabs/NarrativeArc/narrativearc/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='<IP_ADDRESS>', port=9000): Max retries exceeded with url: /?properties=%7B%22outputFormat%22%3A+%22json%22%2C+%22annotators%22%3A+%22tokenize%2Cssplit%2Cpos%22%7D (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f95e8d03b70>: Failed to establish a new connection: [Errno 111] Connection refused',))

https://stackoverflow.com/questions/64238613/access-server-running-on-docker-container/64239854#64239854


Add length and indexOf functions for String

The PR is ready, will merge and publish new version 0.1.24 after build is green

This is available in latest version now.

Looks great! Thanks for adding these helpful functions.


Cannot recreate GTT if it was droped another user

Hi!
Nice job, but I've got ERROR:  duplicate key value violates unique constraint "pg_global_temp_tables_nspname_relname_key"
PostgreSQL 12, Fedora 33, installed from standard packages.
Steps to reproduce:
Connect as user mvno_db2:
mvno_db2=>  LOAD '$libdir/plugins/pgtt';
LOAD
mvno_db2=> create global temporary table t1 ( a integer );
WARNING:  GLOBAL is deprecated in temporary table creation
LINE 1: create global temporary table t1 ( a integer );
               ^
CREATE TABLE

Make second connection as user postgres, connect to the same database and drop table:
=# LOAD '$libdir/plugins/pgtt';
LOAD

mvno_db2=# drop table t1;
DROP TABLE

Switch back to session of mvno_db2 and try recreate GTT:
mvno_db2=> create global temporary table t1 ( a integer );
WARNING:  GLOBAL is deprecated in temporary table creation
LINE 1: create global temporary table t1 ( a integer );
               ^
ERROR:  duplicate key value violates unique constraint "pg_global_temp_tables_nspname_relname_key"
DETAIL:  Key (nspname, relname)=(pgtt_schema, t1) already exists.
CONTEXT:  SQL statement "INSERT INTO pgtt_schema.pg_global_temp_tables VALUES (630344, 'pgtt_schema', 't1', 't', ' a integer ')"

Commit a9b7a80 might solve this issue.

@darold , thank you!
I try check, but the error https://github.com/darold/pgtt/issues/10 block my work. I cannot create regular tables with foreign key or snand-alone foreign key.

@darold , It work now, I dropped GTT in another session and recreate it in the first.
Thank you!