Update languageCaptions in ApplicationMenu

Related Issue:
66
Summary:
According to ISO 639-1, "ch" stands for Chamorro and "zh" stands for Chinese.
Besides, I find that most apps use the original language for each language caption, for example, "Deutsch" for "de" and "中文" for "zh", so I think we'd better do it here too. What do you think?

Thanks for approving the changes @AWolf81 .
Yes I've checked that zh is the code for Chinese in window.navigator.language. One concern might be that there are also zh-cn, zh-tw, etc., just like en-us and en-gb. But as you are using language.startsWith(langCode) in ApplicationMenu, it's not a problem. I think we can make it simple first and add other versions of Chinese translations later.
I agree that src/locale/constants.js is a good location for those two constants, so I've moved them there. If you like it, could you please merge these changes to the i18n-app-menu-item branch, so that I can then merge them to my current local branch on which I'm listing the messages descriptors of all components. Thanks.


Toast notification for uploading extension shows ID

This is a...

[ ] Feature request
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Documentation issue or request

Description
It should show the extension name field instead or if that isn't set (I don't know why that would be) then extensionId field as a secondary.  Right now it's showing id:

I did fix this in #419. I can move that code over.

Oh okay!  Either way, if you've not much else on that refactor it'd probably be better to just finish that work up and call it the fix for this issue 😄


AutoSmoothVel - Compute desired speed at target based on path curvature

Describe problem solved by the proposed pull request
Currently, the drone does waypoint navigation while almost stopping at each waypoint. When the waypoints are aligned or that the heading change is small, we should not completely stop the drone but rather decelerate to make a nice turn and continue.
Describe your preferred solution
The solution implemented in that PR assumes that the drone will fly an arc between the two lines connecting to a waypoint and that we want to fly this arc with some desired centripetal acceleration. Given the acceptance radius r, the desired centripetal acceleration ac and the angle between the two lines 2 alpha, we can easily compute the desired waypoint speed:

Also, to avoid entering too fast into the waypoint if the next waypoint is really close, the maximum speed between current and next is computed to constrain the waypoint speed.
You can interactively estimate the waypoint speed by clicking on the following link:
https://www.desmos.com/calculator/rvx6uybeo8
Tests
I tested quite extensively in SITL and on a F550.
Here an example of a log:
https://logs.px4.io/plot_app?log=2ab24653-a229-4e81-8295-ee7c58c8a373
Related
Fixes #11827

@PX4/testflights Can you test this PR in mission (survey and random mission) please? The drone should slow down but not stop if the turn is not too sharp.

looks great. will try to test it tomorrow on H520

What if the angle is really acute?

@hamishwillee The circle with radius R gets smaller and when the angle is 0, the radius is 0 and the desired entrance speed is 0.

I tested it on the H520 and seems to work well. I think it is a bit too conservative at corners and approaches the waypoints a bit too slow. Can that be changed via tuning?
During one particular survey, the vehicle also experienced an abrupt stop at one of the waypoints (see below), where the drone first accelerated before it stopped abruptly.
.
The flight log:
https://review.px4.io/plot_app?log=18956ebf-a86d-4c72-a786-1f97ca318130
In addition, to prevent the vehicle from passing a waypoint if the altitude has not been reached yet, I created this PR.

Tested on PixRacer V4:
Flight Card 2
Modes Tested
Mission Plan Mode (Automated): Good.
RTL (Return To Land): Good.
Procedure
Arm and Take off in mission plan mode then make sure that vehicle follows all waypoints as shown in QGC, once completed all waypoint see landing behavior.
Note:
The flight was good the vehicle followed the points marked in the mission only slowing down but without stopping.No issues were noted, good flight in general.
Logs:
https://review.px4.io/plot_app?log=d1f4a5f9-5c98-4ea2-9e48-12555472fbb4
https://review.px4.io/plot_app?log=8e5b032a-ec31-48e4-9ec6-9ae59b0ded49
https://review.px4.io/plot_app?log=293a137f-56b3-47d0-9a00-46760d04b4e2

Tested on Pixhawk 4 mini v5:
Flight Card 2
Modes Tested
Mission Plan Mode (Automated): Good.
RTL (Return To Land): Good.
Procedure
Arm and Take off in mission plan mode then make sure that vehicle follows all waypoints as shown in QGC, once completed all waypoint see landing behavior.
Note:
Vehicle flew as expected, slowed down instead of stoping at the waypoints.
Logs:

https://review.px4.io/plot_app?log=940fe94e-7748-465d-8452-83dff04ff446
https://review.px4.io/plot_app?log=33867777-e6e7-4492-bc92-34a6787c0b82

Tested on Pixhawk Pro v4:
Flight Card 2
Modes Tested
Mission Plan Mode (Automated): Good.
RTL (Return To Land): Good.
Procedure
Arm and Take off in mission plan mode then make sure that vehicle follows all waypoints as shown in QGC, once completed all waypoint see landing behavior.
Note:
Vehicle flew as expected, slowed down instead of stoping at the waypoints.
Logs:

https://review.px4.io/plot_app?log=da846d10-3b89-4ea5-9100-a0945e82a45d
https://review.px4.io/plot_app?log=d7e2892f-6af2-4488-a9a4-2159cc19ee92

Tested on NXP FMUK66 v3:
Flight Card 2
Modes Tested
Mission Plan Mode (Automated): Good.
RTL (Return To Land): Good.
Procedure
Arm and Take off in mission plan mode then make sure that vehicle follows all waypoints as shown in QGC, once completed all waypoint see landing behavior.
Note:
Vehicle flew as expected, slowed down instead of stoping at the waypoints.
Logs:

https://review.px4.io/plot_app?log=520ad010-985c-4576-b88f-9c7026c95525
https://review.px4.io/plot_app?log=d87d6228-6510-4f2f-95c4-a2453a82c4b9

@Stifael I moved the computation in static functions inside the VelocitySmoothing class that contains the jerk-limited optimizer. Is that enough or do you want them in an other file (header library? what would be the scope of the library? name? ...)

Is that enough or do you want them in an other file (header library? what would be the scope of the library? name? ...)

Do you think it makes sense to have computeMaxSpeedFromBrakingDistance  and the other function in VelocitySmoothing?
I think if the function has a general implementation and is not necessarily FlightTasks related, then it could be put into the math-library similar to other functions (https://github.com/PX4/Firmware/blob/master/src/lib/mathlib/math/Functions.hpp#L48-L208). If it will anyway just be used by FlightTasks, then I would put it in a file such that it can easily be found. For instance, computeMaxSpeedFromBrakingDistance is kind of smooth-independent and can also be used in FlightTaskAutoLine.
However, I don't want to block you, so sure we can do that in another PR, given that I anyway want to revisit the structure.

@Stifael I moved the functions into a TrajMath.hpp header library. It's true it's much cleaner and reusable. Can you review again?

@PX4/testflights Can you test that again please?

Tested on Pixhawk4 v5 f-450
Modes Tested
Mission Plan Mode (Automated): Good.
RTL (Return To Land): Good.
Procedure
Arm and Takeoff in mission plan mode then make sure that vehicle follows all waypoints as shown in QGC, once completed all waypoint see landing behavior.
Pr log:
https://review.px4.io/plot_app?log=421760b0-a1cb-4e00-836d-ca085d17b475
https://review.px4.io/plot_app?log=d3b10670-b737-4657-9ea8-9484d79ecbdf

@dannyfpv Thanks a lot! Ready to be merged once we have a bit more space on the omnibus target :|

Tested on PixRacer v4:
Modes Tested
Mission Plan Mode (Automated): Good.
RTL (Return To Land): Good.
Procedure
Arm and Takeoff in mission plan mode then make sure that vehicle follows all waypoints as shown in QGC, once completed all waypoint see landing behavior.
Note:
No issue noted, good flight in general.
Logs:

https://review.px4.io/plot_app?log=ce61c4f8-4c1c-4814-9c96-7e529176721e
https://review.px4.io/plot_app?log=1d16a5c9-ab2c-42b2-9c68-daa7819d7138

Tested on Pixhawk Pro v4Pro:
Modes Tested
Mission Plan Mode (Automated): Good.
RTL (Return To Land): Good.
Procedure
Arm and Takeoff in mission plan mode then make sure that vehicle follows all waypoints as shown in QGC, once completed all waypoint see landing behavior.
Note:
No issue noted, good flight in general.
Logs:

https://review.px4.io/plot_app?log=b16b62fc-14d7-4e6c-b992-22d1df2f2b77
https://review.px4.io/plot_app?log=0c071055-d7dd-499c-ae10-6e9f3ba7871e


Email Functionality

Hi there
I have been tasked with having email functionality on the application, I see that already there is mailbox functionality built in, my question is how can I get this to work as currently there are just interfaces. This functionality must link/integrate with gmail, meaning that whatever inbox, meetings/events,tasks etc on gmail must also appear on the website. I hope what I am requesting makes sense, how do I get started with this?

This isn't a Serenity question, so I expect it will be closed soon. You'll have to either get very familiar with whatever API Google provides, or make heavy use of iframes to host gmail directly in your app.

You can use google API's as said by @wldkrd1 or even you can go with NuGet packages like Mailkit

Thanks for the suggestion guys
On 15 February 2018 at 07:48, Vinay Kulkarni<EMAIL_ADDRESS>wrote:

You can use google API's as said by @wldkrd1 https://github.com/wldkrd1
or even you can go with NuGet packages like Mailkit
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/volkanceylan/Serenity/issues/3253#issuecomment-365831858,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF6wd-bvRAojazMZbJwBZEvLPJw-Fn_qks5tU8U9gaJpZM4SD_iz
.


[pull-request-template] Clarified that all requirements must be fulfilled

What is the purpose of this pull request?

[ ] New Icon
[ ] Bug fix
[ ] New Feature
[x] Documentation update
[ ] Other

Description
Added some clarification to pull request checklists, since multiple brand icons have been submitted, so apparently it wasn't clear for some folks that these requirements must all be fulfilled.
Before Submitting

[x] I've read the Contribution Guidelines.
[x] I've checked if there was an existing PR that solves the same issue.

If that doesn't help, we have to add a workflow that autocloses the pr if there are unchecked requirements.


Validate hash sign operation before execution.

The backend implementations should ideally perform all the hash length checks. Mbed Crypto doesn't implement the hash length checks on its side. This PR adds the changes required to validate the hash signing operation done for mbed-crypto and trusted services providers.
Fixes #107
Signed-off-by: Gowtham Suresh Kumar<EMAIL_ADDRESS>

Both sign_hash_bad_format_ecdsa_sha256 and verify_hash_bad_format_ecc are now passing for mbed crypto and trusted services. I've enabled the tests for them in the new commit.


Manually publish graphback package on dev tag

We have people interested in trying our runtime capabilities but it is hard to use it as we cannot make official release yet. We need to publish graphback package as dev tag in order to give it to testers and first users.
npm publish --tag=dev
We should use 0.9.0-dev1 dev2 etc. for every change we doing to master till we move to the state where we will be able to merge all changes

Okay - should it be 0.9.2-dev1 etc since the most recent release was 0.9.2?


add groupQuotaManager

Signed-off-by: xulinfei.xlf<EMAIL_ADDRESS>Ⅰ. Describe what this PR does

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews
V. Checklist

[ ] I have written necessary docs and comments
[ ] I have added necessary unit tests and integration tests
[ ] All checks passed in make test

/lgtm

After much thought, I think we should try to accomplish a few more things:

Several core functions, such as RefreshRuntimeQuota, consider adding a benchmark case to record the time overhead of the current version. If there are changes in this part in the future, we at least have a basis to judge whether the performance is improved or rolled back.
Enhance the maintainability of UT. The current PR is the core part of the entire ElasticQuota, and future generations need to use these UTs to understand the current implementation when maintaining this code.

@xulinfei1996 @buptcozy  cc @hormes

/approve


Property name added twice in _buildJsContructorForType within JsProxy

When using abstract mixins on a PolymerElement a property name can end getting added twice which results in Exception: TypeError: Cannot redefine property: x.
class LinearSelectable {
  String get direction;
}
class SelectionGroup extends PolymerElement with LinearSelectable {
  @property
  String direction;
}

In this case the call to smoke.query contains the value direction twice, with the following values.
// LinearSelectable
(mirror-based-declaration Symbol("direction") (property) final [])
// SelectionGroup
(mirror-based-declaration Symbol("direction") (field) [Instance of '_Override', Instance of 'Property'])

It then throws on context['Object'].callMethod('defineProperty', ...).
Open to fixing this just wasn't sure if this was a smoke problem or a polymer problem.
This is through the useMirrors path.

Interesting, @sigmundch what do you think? Should smoke only return the property from SelectionGroup in this case?

mmm good question.
On one hand, smoke's queries were originally designed to return all matching definitions and not just what would be visible with a lookup. On the other hand, I can't think of any use case for the current behavior :)
So while I'm not opposed to changing it in smoke, I am more inclined to have the fix in the polymer side of things.

I can attempt a patch and if it'd be useful to do something like an excludeOverriden you could cherry pick it for smoke.
That work for everyone?

sgtm

Sgtm as well

One thing that would probably make this easier is if there was an isAbstract on the smoke declaration. Then you could just ignore anything that's abstract.
I have a branch that's doing this which seems to do the trick. Can push that and open a pull request if that works.
/// Removes any overriden declarations from a smoke query.
List<smoke.Declaration> _removeOverriden(List<smoke.Declaration> declarations) {
  var remove = [];
  var declarationCount = declarations.length;

  // Search for duplicates
  //
  // This assumes that smoke is recursively going into the parent classes and
  // gathering info before the child class. It then searches for a symbol with
  // the same name. If it finds it then it marks the indice for removal.
  for (var j = 0; j < declarationCount; ++j) {
    var symbol = declarations[j].name;
    for (var i = j + 1; i < declarationCount; ++i) {
      if (symbol == declarations[i].name) {
        remove.add(j);
        break;
      }
    }
  }

  // Go backwards through the list so that the indices are valid
  var removeCount = remove.length;

  for (var i = removeCount - 1; i >= 0; --i) {
    declarations.removeAt(remove[i]);
  }

  return declarations;
}

One thing that would probably make this easier is if there was an isAbstract on the smoke declaration. Then you could just ignore anything that's abstract.

You can override non-abstract things as well, so I think what you have is probably better.

I have a branch that's doing this which seems to do the trick. Can push that and open a pull request if that works.

That sounds good, but since it does rely on the order of declarations I think it should live under the smoke package. I would add an option like excludeOverriden to QueryOptions here, and then you will have to add support for that in the various implementations, but they should be able to share a common helper function (you can just search for implements TypeInspectorService in the repo).

Sounds good I'll open an issue on smoke and start hacking on it.


build fix for some 3rd party oses.

Huh, I thought everything except Linux added the xlocale APIs.  I added them to FreeBSD around 2011 and they were in Darwin before then.  Thanks for catching this!


[ROCKETMQ-231] fix pull consumer pull result size

When using PullConsumer pull message by default result size is 32,and messages is more than 32 in a queue,but broker always returns 31.

Coverage decreased (-2.4%) to 36.756% when pulling 1d27251df0265e19397cffc1ee5098e12bc4cd0d on lindzh:fix_consumer_pull_msg_size into c297258d219277c932a84d37fec19aeaea54588a on apache:master.

Coverage increased (+0.4%) to 39.467% when pulling 54ce8e31a33fa0f9cefad7acf0d1a9020bde617e on lindzh:fix_consumer_pull_msg_size into c297258d219277c932a84d37fec19aeaea54588a on apache:master.

Coverage increased (+0.4%) to 39.467% when pulling 54ce8e31a33fa0f9cefad7acf0d1a9020bde617e on lindzh:fix_consumer_pull_msg_size into c297258d219277c932a84d37fec19aeaea54588a on apache:master.

Coverage increased (+0.5%) to 39.598% when pulling a35a4e38e036f35f46705c556949ed98ab607650 on lindzh:fix_consumer_pull_msg_size into c297258d219277c932a84d37fec19aeaea54588a on apache:master.

Coverage increased (+0.5%) to 39.59% when pulling bc492f514052673c9f80ff1b156ab301fabb0983 on lindzh:fix_consumer_pull_msg_size into c297258d219277c932a84d37fec19aeaea54588a on apache:master.

Coverage increased (+0.5%) to 39.59% when pulling bc492f514052673c9f80ff1b156ab301fabb0983 on lindzh:fix_consumer_pull_msg_size into c297258d219277c932a84d37fec19aeaea54588a on apache:master.

Coverage increased (+0.6%) to 39.308% when pulling a5d73d080e49e63457c2be4b996c339d6e488fae on lindzh:fix_consumer_pull_msg_size into 9bb6eae4bd35697808174a2ff9195e393450ec91 on apache:master.

Coverage increased (+0.9%) to 39.575% when pulling a5d73d080e49e63457c2be4b996c339d6e488fae on lindzh:fix_consumer_pull_msg_size into 9bb6eae4bd35697808174a2ff9195e393450ec91 on apache:master.

Coverage increased (+0.9%) to 39.575% when pulling a5d73d080e49e63457c2be4b996c339d6e488fae on lindzh:fix_consumer_pull_msg_size into 9bb6eae4bd35697808174a2ff9195e393450ec91 on apache:master.

Coverage increased (+0.9%) to 39.575% when pulling a5d73d080e49e63457c2be4b996c339d6e488fae on lindzh:fix_consumer_pull_msg_size into 9bb6eae4bd35697808174a2ff9195e393450ec91 on apache:master.

Now, LGTM

+1

Thanks @lindzh, i have merged it. Please close this PR :-)


Allow global admins to always get workflow instances for a media package

... even if that media package is already deleted from the asset manager. (We can't do the same for org admins because we can no longer make sure that the organization of the user and the media package are the same.)
This should allow global admins to delete events that were broken by #4084 (see also the PR #4137).

Tried this patch and works, the best thing is complements #4137 in the way that the bug #4084 if you try to delete is not getting deleted, like an incomplete deleted.  This patch, you can now delete those incomplete deletions without re-index.
The only thing was that the admin-ui showed me the message "this event can't be deleted" but I think is not-an-issue because those events were caused for a malformed deletion in the first place.


Misspelling on page

Exchange Management Shell documentation
The topic "Exchange cmdles systax"  appears instead of "syntax"

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

ID: c916371e-aef0-f91e-e04d-16110358a306
Version Independent ID: bd073f8e-ba80-25ed-0fe4-286641e9f043
Content: Exchange Server PowerShell (Exchange Management Shell)
Content Source: exchange/docs-conceptual/exchange-server/exchange-management-shell.md
Service: exchange-powershell
Product: exchange-server-itpro
GitHub Login: @chrisda
Microsoft Alias: chrisda

@mcwetzel Thank you for this feedback
It appears that Chris fixed this issue for us. If this issue is not resolved please re-open this issue.


Prune the last release history in case no deployed succeed before

What this PR does / why we need it:
In case of a history of release has no failed release, they could grow over the number of --max-history configuration.
giantswarm found out in some cases, helm secrets are counting almost ~1000 secrets for this reason.
This PR is to delete the last failed release history in case of no successful deployed yet, so we can respect --max-history for the edge cases.
Special notes for your reviewer:
If applicable:

[ ] this PR contains documentation
[ ] this PR contains unit tests
[ ] this PR has been tested for backwards compatibility

Hi @tomahawk28. Can you please provide a practical example we can use to reproduce the original issue? That way we can better understand how this scenario can occur.
For example, I cannot see how this might solve the usual scenario where you have a release ledger with 1 DEPLOYED release and then 1000 FAILED releases thereafter. This particular fix only appears to solve cases where you never reached an initial DEPLOYED state in the first place, or that state is somehow missing from the ledger, neither of which seem like practical scenarios.
Thanks!

@bacongobbler  Thanks for your response.
It's hard to give a concrete example you can run, but I can explain our situation.
We are automating helm install/upgrade by our component and it's failed to run every helm install/upgrade since we now have an admission-webhook running in the background.
helm -n giantswarm history aws-operator-9.1.2-dev
REVISION	UPDATED                 	STATUS	CHART                                                      	APP VERSION     DESCRIPTION
22      	Mon Oct 12 19:47:38 2020	failed	aws-operator-9.1.1-604634a7c4b900b4746b41197f2a8afd665387e6	9.1.2-dev Upgrade "aws-operator-9.1.2-dev" failed: failed to create resource: admission webhook "validation.gatekeeper.sh" denied the request: [denied by unique-operator-version] label app.kubernetes.io/version=9.1.2-dev is not unique in resources of kind "Deployment"
23      	Mon Oct 12 19:52:36 2020	failed	aws-operator-9.1.1-604634a7c4b900b4746b41197f2a8afd665387e6	9.1.2-dev Upgrade "aws-operator-9.1.2-dev" failed: failed to create resource: admission webhook "validation.gatekeeper.sh" denied the request: [denied by unique-operator-version] label app.kubernetes.io/version=9.1.2-dev is not unique in resources of kind "Deployment"
24      	Mon Oct 12 19:57:41 2020	failed	aws-operator-9.1.1-604634a7c4b900b4746b41197f2a8afd665387e6	9.1.2-dev Upgrade "aws-operator-9.1.2-dev" failed: failed to create resource: admission webhook "validation.gatekeeper.sh" denied the request: [denied by unique-operator-version] label app.kubernetes.io/version=9.1.2-dev is not unique in resources of kind "Deployment"
25      	Mon Oct 12 20:02:52 2020	failed	aws-operator-9.1.1-604634a7c4b900b4746b41197f2a8afd665387e6	9.1.2-dev Upgrade "aws-operator-9.1.2-dev" failed: failed to create resource: admission webhook "validation.gatekeeper.sh" denied the request: [denied by unique-operator-version] label app.kubernetes.io/version=9.1.2-dev-is not unique in resources of kind "Deployment"
26      	Mon Oct 12 20:08:10 2020	failed	aws-operator-9.1.1-604634a7c4b900b4746b41197f2a8afd665387e6	9.1.2-dev Upgrade "aws-operator-9.1.2-dev" failed: failed to create resource: admission webhook "validation.gatekeeper.sh" denied the request: [denied by unique-operator-version] label app.kubernetes.io/version=9.1.2-dev is not unique in resources of kind "Deployment"
... up to 500...

In the above case, it makes sense that you could reach the maximum number of helm histories as soon, and given the fact that admission-controller have been used widely these days, it's not the edge case anymore you have no deployed helm histories in a release ledger, (it could fail from the install process).
hope that it works for you!

@bacongobbler Sorry to ping again, but these are happening a lot from our clusters these days. We would like to see this patch from upstream. Thanks.

To give you more background regarding this issue; When using Helm in an automation platform like from within CICD, with a new Helm chart or a new cluster that has settings that lead to a failed release, it can happen that the release fails already on the first try.
When in this case automation is set to retry on failure it can lead to the case that the history/ledger gets way longer than the set value in max-history.
This could be the edge case but others who failed on helm release would benefit from this patch since the number of helm secrets would not be flooded by initial failure.

The documentation for this flag says...

limit the maximum number of revisions saved per release. Use 0 for no limit (default 10)

I've not really thought about how failed deployments play into that. If Helm is keeping around many failed deployments this could be thought of as a bug. Marketing that way and going to bring this up in meeting.

I'm still confused how one can get into this initial state. I thought we captured the case where an initial FAILED deployment will be overridden by the next helm install. Is that not the case?
I think it'd be best if we can get a base case going here so we can better understand the issue and the scenarios surrounding it before jumping to conclusions on a fix.

If Helm is keeping around many failed deployments this could be thought of as a bug.

I'm partially aware of this behaviour. The --release-max flag does not kick in until the first DEPLOYED release. That way the flag ensures the last DEPLOYED release is not purged from the release history.
For example, if you have 10 releases in the following order:
DEPLOYED
FAILED
FAILED
FAILED
FAILED
FAILED
FAILED
FAILED
FAILED
FAILED
If you deploy for the 11th time and it fails, --release-max will retain that initial DEPLOYED state until another DEPLOYED state is reached.
On the other side, this also works like the following:
FAILED
FAILED
FAILED
FAILED
DEPLOYED
FAILED
FAILED
FAILED
FAILED
FAILED
If you deploy another FAILED release, the release ledger should bump the last release off the list since it isn't the last DEPLOYED state.
But that goes back to the original question: how do you get into a state with no DEPLOYED releases and 1000 FAILED ones?
We can certainly try to fix this, but I'd like to better understand how one enters this state and see if there's a better way to address this issue.

But that goes back to the original question: how do you get into a state with no DEPLOYED releases and 1000 FAILED ones?

For example, if I try to apply a deployment object with a different spec.selector.matchLabels and spec.template.metadata.labels with helm install command and this would result in a failed release.
Later that, If I try to helm upgrade a failed release by a reasonable amount of retries, all helm secrets goes over the number of maximum helm records.
# try to upgrade a failed release 20 times
for i in (seq 1 20); helm upgrade test1 -n giantswarm ./; end;
Error: UPGRADE FAILED: failed to create resource: Deployment.apps "test1" is invalid: spec.template.metadata.labels:...

# check the number of helm secrets belongs to `test1`
k -n giantswarm get secret -lowner=helm,name=test1
NAME                           TYPE                 DATA   AGE
sh.helm.release.v1.test1.v1    helm.sh/release.v1   1      18m
sh.helm.release.v1.test1.v10   helm.sh/release.v1   1      13m
sh.helm.release.v1.test1.v11   helm.sh/release.v1   1      13m
sh.helm.release.v1.test1.v12   helm.sh/release.v1   1      13m
sh.helm.release.v1.test1.v13   helm.sh/release.v1   1      13m
sh.helm.release.v1.test1.v14   helm.sh/release.v1   1      13m
sh.helm.release.v1.test1.v15   helm.sh/release.v1   1      13m
sh.helm.release.v1.test1.v16   helm.sh/release.v1   1      13m
sh.helm.release.v1.test1.v17   helm.sh/release.v1   1      13m
sh.helm.release.v1.test1.v18   helm.sh/release.v1   1      13m
sh.helm.release.v1.test1.v19   helm.sh/release.v1   1      13m
sh.helm.release.v1.test1.v2    helm.sh/release.v1   1      15m
sh.helm.release.v1.test1.v20   helm.sh/release.v1   1      13m
sh.helm.release.v1.test1.v21   helm.sh/release.v1   1      13m
sh.helm.release.v1.test1.v22   helm.sh/release.v1   1      13m
sh.helm.release.v1.test1.v3    helm.sh/release.v1   1      14m
sh.helm.release.v1.test1.v4    helm.sh/release.v1   1      14m
sh.helm.release.v1.test1.v5    helm.sh/release.v1   1      14m
sh.helm.release.v1.test1.v6    helm.sh/release.v1   1      14m
sh.helm.release.v1.test1.v7    helm.sh/release.v1   1      13m
sh.helm.release.v1.test1.v8    helm.sh/release.v1   1      13m
sh.helm.release.v1.test1.v9    helm.sh/release.v1   1      13m

Someone can manually check whether the helm upgrade process is going well and stop retries but that means that person also needs to take care of helm secrets that left by the failed helm upgrades.

This is technically a bug. Thinking about this however, I would have to agree with @bacongobbler. Elaborating on a few points:

You want the --release-max flag to be based off the first/last deployed release so you contain at least one successful release in your history. Otherwise you have no successful release to rollback.
If you have a deployed release then the release history maintains the last successful release and purges the failed releases which maintains rollback functionality.
I wonder rather than "how one enters the state of all failed releases", should the question be why? Why if you failed the first install, would you continue upgrading unsuccessfully over and over again to the point of having 10s/100s of release revisions?

Lets push this out till 3.5.0 to get more feedback as 3.4.1 is being cut today.

"how one enters the state of all failed releases" is a plausible scenario if we use helm install/update operation with the automated method, likely operators. I admit I exaggerate the situation by saying there are 1000 failed releases only, but this is the bug we actually need to fix since not everyone using helm knows about helm didn't count the number of release ledger if releases are full of the failed one.

What if --max-history is 5, and history is full of 20 failed releases? I think it makes sense for helm intervene to delete the last 15 failed records from the helm ledger, even if that number is small.

@hickeyma @bacongobbler Let me know if it's still not convincing; Using helm in one of our component caught this problem and we notice it only after Prometheus alert reported the sudden increase of the number of secrets in k8s clusters. I think users who might have the same problem didn't catch this yet.


chore: release 1.2.137

:robot: I have created a release *beep* *boop*
1.2.137 (2022-07-21)
Bug Fixes

kubedog: generic tracker: improve logging + few possible fixes (b93b1fe)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/werf/werf/releases/tag/v1.2.137 :sunflower:


Add YieldExpression

Current coverage is 99.74%

Merging #18 into master will not affect coverage as of d869146

@@            master     #18   diff @@
======================================
  Files           77      78     +1
  Stmts          785     792     +7
  Branches        99     100     +1
  Methods          0       0
======================================
+ Hit            783     790     +7
  Partial          0       0
  Missed           2       2

Review entire Coverage Diff as of d869146

Powered by Codecov. Updated on successful CI builds.


restic --one-file-system --stdin fails with "zero allowed devices"

Since upgrading from 0.8.3 to 0.9.0, backups that receive a database dump via the --stdin options fail with the error "zero allowed devices" (and a Go backtrace). This is a minor regression.
Output of restic version
restic 0.9.0 compiled with go1.10.2 on linux/amd64 (binary downloaded from Github)
How did you run restic exactly?
The command is run as part of a larger script that runs the same "base command" (everything up to the --stdin below) for a number of paths. The exact command that fails is the first one that uses --stdin, below. This has happened with both B2 and sftp backends (set using RESTIC_REPOSITORY, B2 credentials set accordingly).
restic backup --tag "SCR:backup-restic.sh" --tag "VER:3" --tag "CFG:backup-restic.conf" --one-file-system --stdin --stdin-filename postgres.sql
The output:
zero allowed devices
main.gatherDevices
      src/github.com/restic/restic/cmd/restic/exclude.go:204
main.rejectByDevice
      src/github.com/restic/restic/cmd/restic/exclude.go:212
main.collectRejectFuncs
      src/github.com/restic/restic/cmd/restic/cmd_backup.go:194
main.runBackup
      src/github.com/restic/restic/cmd/restic/cmd_backup.go:376
main.glob..func2
      src/github.com/restic/restic/cmd/restic/cmd_backup.go:54
github.com/restic/restic/vendor/github.com/spf13/cobra.(*Command).execute
      src/github.com/restic/restic/vendor/github.com/spf13/cobra/command.go:756
github.com/restic/restic/vendor/github.com/spf13/cobra.(*Command).ExecuteC
      src/github.com/restic/restic/vendor/github.com/spf13/cobra/command.go:846
github.com/restic/restic/vendor/github.com/spf13/cobra.(*Command).Execute
      src/github.com/restic/restic/vendor/github.com/spf13/cobra/command.go:794
main.main
      src/github.com/restic/restic/cmd/restic/main.go:86
runtime.main
      /usr/local/go/src/runtime/proc.go:198
runtime.goexit
      /usr/local/go/src/runtime/asm_amd64.s:2361
pg_dumpall: pg_dump failed on database "stdiscosrv", exiting

What backend/server/service did you use to store the repository?
Issue exhibited with both B2 and SFTP backends.
Expected behavior
I expect restic to act as it did in 0.8.3, backing-up the data presented to it on stdin to the backend file named by --stdin-filename
Actual behavior
(See above for error and Go backtrace)
Steps to reproduce the behavior
I have observed this behaviour on at least two separate hosts since upgrading to 0.9.0, both backing-up to a mix of 3 different repositories (2 backends).
Do you have any idea what may have caused this?
It seems that --one-file-system, which used to be (and should be) a no-op with --stdin is now failing because no directories were passed and thus it was unable to determine which devices to include/exclude during filtering. If I run the restic command directly (without the --one-file-system my script prepended) the backup completes.
Do you have an idea how to solve the issue?
Not yet on restic's part; I haven't been able to trace this change in behaviour back to a commit yet. For my part, I need to update my script to not use --one-file-system when backing-up --stdin
Did restic help you or made you happy in any way?
It usually does... 0.9.0, not so much.

Thanks for the report! This is indeed a bug.

Some more information, seems that the bug was introduced in 0e78ac92d875e85c43aba9b315baca4be93d1383, before that commit there was a generic runBackup and a runBackupFromStdin.
If I'm not missing anything, the fix should be easy
index dc84ed28..1a0e5019 100644
--- a/cmd/restic/cmd_backup.go
+++ b/cmd/restic/cmd_backup.go
@@ -190,7 +190,7 @@ func (opts BackupOptions) Check(gopts GlobalOptions, args []string) error {
 // from being saved in a snapshot
 func collectRejectFuncs(opts BackupOptions, repo *repository.Repository, targets []string) (fs []RejectFunc, err error) {
        // allowed devices
-       if opts.ExcludeOtherFS {
+       if opts.ExcludeOtherFS && !opts.Stdin {
                f, err := rejectByDevice(targets)
                if err != nil {
                        return nil, err

later I will send a PR


[Bug]: Sequence number reset (Maximum->0) can lead to unexpected behaviour on certain network conditions

Client version
newest
Node version
all
Operating System type
Other
Operating system version
all
Describe the bug
The current implementation of queueing messages can fail if it encounters a sequence number overflow (aka reseting the sequence number back to zero).
Assume the following scenario: The sequence number has almost reached the maximum, say 65540, and due to network congestion the next package (65541) is not received.
The client goes on to receive the next few packages 65542, 65543, ... And stores them in the message queue. Until the maximum sequence number is reached that is. Packages 0, 1, 2, ... will not be stored since they are evaluated as 'already processed', due to:
https://github.com/bropat/eufy-security-client/blob/e9fb79b15007bf0f6072cf4d4eae684795cda89c/src/p2p/session.ts#L952-L958
When 65541 is eventually received the message queue is worked off, but now the packages after the reset of the sequence number will be missing.
This not only prevents the streaming from continuing. It also prevents all subsequent streams to fail, since the expected sequence numbers will not match up anymore.
Even further it seems that the automatic closing after the stream is prevented, since the timeout for this is in another conditional branch:
https://github.com/bropat/eufy-security-client/blob/e9fb79b15007bf0f6072cf4d4eae684795cda89c/src/p2p/session.ts#L959-L964
I've encountered at least two streams that did seem to go on, although the streaming was stopped from client side. It even seemed to drain the battery of my doorbell (which has a batter AND is wired with bell wire).
PR #255 should fix this.
To reproduce
Hard to reproduce, but should be understandable from looking at the code.
Screenshots & Logfiles
No response
Additional context
No response

Good Work! You explained it very well.

Pull request #255 merged.


make resources.isEqual case sensitive for non file URIs

@bpasero @sandy081 Please have a quick look as I changes some your of your classes.

I reverted the change of the default of ignorecase for remote resources.
The PR just fixes all callers to not define ignorecase.

@aeschli possibly this one (explorerModel.ts) should get the same treatment as well.

@bpasero Thanks, added 614db8bc770b2a989ce01f76946e473b31f79922


Added the possibility to use custom objective function in the sklearn…

Added the possibility to use custom objective functions in the sklearn API

The requested modifications have been done

Thanks!


Configure readme.md on nuget.org website

The current package is not including the readme.md file on the nuget.org website.

This was fixed on version 0.0.8


Pine fractal tree creator

Community Contribution
Hello, I am catching up with challenges. :) I would like to share this pine fractal tree.
Kind regards.
Link to live project, video, or image:
https://editor.p5js.org/jcponce/present/vJ5XRkjm7
Sharing

[x] I would be happy to have my project shared on The Coding Train's social media!

Instagram:
Twitter:
@jcponcemath

Cool

Cool


[question] how to customize "NMessenger" placeholder string from NMessengerViewController sub-class?

So, here is a property I'm interested in
open class NMessengerBarView: InputBarView, ... {
...
    open var inputTextViewPlaceholder: String = "NMessenger"

I tried to do the following :
class ChatRoomView: NMessengerViewController
{
    override func viewDidLoad()
    {
        super.viewDidLoad()

        // does not compile
        self.inputBarView.inputTextViewPlaceholder = "my new value"
    }
}

Is there any approach other than overloading the entire NMessengerViewController.inputBarView property? Not sure if I can cast NMessengerViewController.inputBarView to NMessengerBarView
(self.inputBarView as! NMessengerBarView).inputTextViewPlaceholder = "my new value"

P.S. So far, I've just opened the NMessengerBarView file and fixed the default value which is an ugly workaround.

So, it works just by modifying the text property which serves both as a placeholder and as user's input renderer.
class ChatRoomView: NMessengerViewController
{
    override func viewDidLoad()
    {
        super.viewDidLoad()

self.inputBarView.textInputView.text = NSLocalizedString("Chat.InputField.PlaceholderText", comment: "Write a message")
     }
}

For some reason fixing the NMessengerBarView did not take any effect. The "NMessenger" string comes right out of the storyboard.

The placeholder value from NMessengerBarView is used after we try to access the camera.
However, the text view is left blank after the message has been sent. Not sure if it's a bug but I'd like to see the placeholder in this situation as well (or have a tweak to control this behaviour).


test(ci) Test with Go 1.14

This PR updates Go from 1.13 to 1.14 on the CI testing server.

bors r+

bors retry

bors r-


Problem with the Manifest for Calico Kubernetes Hosted Install with Kubeadm

When installing Kubernetes with kubeadm on real hardware (running ubuntu) there is a problem with the manifest file.  It turns on IPIP for containers but kubeadm sets up the api server to run with host networking as a result containers can't talk to the api server.  Turning off IPIP fixes the problem for me.
  ippool.yaml: |
      apiVersion: v1
      kind: ipPool
      metadata:
        cidr: <IP_ADDRESS>/16
      spec:
        nat-outgoing: true

Is there a reason that IPIP is enabled by default?

Also, it would be nice to mention of how to reset calico when resetting the cluster with kubeadm.  I had to flush the route table and clear the etcd directory:
$  ip route flush proto bird
$ rm -rf /var/etcd/calico-data/*

@lslatr Enabling ipip shouldn't affect traffic from pods -> apiserver.  ipip is only used for pod->pod traffic.  Does your host subnet range overlap with the range used for Pods? That could cause trouble.
Docs on resetting Calico would be nice to have, and are probably applicable outside of kubeadm as well.  I've raised https://github.com/projectcalico/calico/issues/443 to track that part.

@caseydavenport in the case of a kubeadm setup the api server is running in a pod but with host networking on (that's how I understand it anyway I'm pretty new to kubernetes).  In any case there was no calico virtual interface for the api server which was running in a pod.  I think this is why turning off ipip fixed my problem.  Here's more detail on my problem.
After setting up the cluster I configured the dashboard but it wasn't working.  After some pain I realized that running curl -k https://IP_OF_API_SERVER never returned.
kubectl exec test-701078429-r81j9 -- curl -k https://<IP_ADDRESS>

Looking at the packets with tcpdump I could see them leave the pod running curl and be received by the host running the api server on it's native interface.  No reply ever came and the logs on the api server showed no request.
In this setup ipip is on and the tunl0 interfaces were being used.  Once I turned off ipip all routes for the remote pods used the native interfaces and the connection to the api server worked normally when connected to from a pod.
Does that make sense?

bump... not sure I've explained the problem correctly but the instructions as they stand right now don't work.  Would be nice to figure out why.

@lslatr sorry for the delay!

In any case there was no calico virtual interface for the api server which was running in a pod

Yep, that's correct, and should be the case whether or not Calico is using ipip since the API runs with host networking.

I could see them leave the pod running curl and be received by the host running the api server on it's native interface.

I think to debug this further, I'd need to take a look at the routing tables on the source node as well as the master to see what's going on.
The expected behavior here is that pod->apiserver traffic should not take the ipip tunnel.  Instead it should undergo DNAT when leaving the host.  The only reason I can think of that would cause that behavior is if the API's IP address falls within a Calico IP Pool, which is not recommended because it breaks things :)
Could you confirm that your master's IP address does not fall within <IP_ADDRESS>/16?
CC @gunjan5 who has been using Calico on various kubeadm clusters recently.

Ugh... I just ran through the setup again with ipip on and it worked.  I'm guessing I did have a conflict where my master IP fell in the range of the ip address pool for the containers.  It must have happened before I figured out how to reset calico's etcd (I switched to 172.16/16 from 192.168/16 which is a range my apiserver sits within).   Sorry for the bad report I'll close.


scrapy.exceptions.NotSupported: Unsupported URL scheme 'https': The installed reactor (twisted.internet.epollreactor.EPollReactor) does not match the requested one (twisted.internet.asyncioreactor.AsyncioSelectorReactor)

I am running my spider as follows:
def run_spider():
    '''see https://stackoverflow.com/questions/41495052/scrapy-reactor-not-restartable'''

    def f(q):
        try:
            runner = crawler.CrawlerRunner(get_project_settings())
            deferred = runner.crawl()
            deferred.addBoth(lambda _: reactor.stop())
            reactor.run()
            q.put(None)
        except Exception as e:
            q.put(e)

    q = Queue()
    p = Process(target=f, args=(q,))
    p.start()
    result = q.get()
    p.join()

    if result is not None:
        raise result

This way I can run multiple scrapers with running into the error mentioned in the stackoverflow post. However, I now get the error scrapy.exceptions.NotSupported: Unsupported URL scheme 'https': The installed reactor (twisted.internet.epollreactor.EPollReactor) does not match the requested one (twisted.internet.asyncioreactor.AsyncioSelectorReactor)
this is my settings file:
# playwright
DOWNLOAD_HANDLERS = {
    "http": "scrapy_playwright.handler.ScrapyPlaywrightDownloadHandler",
    "https": "scrapy_playwright.handler.ScrapyPlaywrightDownloadHandler",
}

# TWISTED_REACTOR = "twisted.internet.asyncioreactor.AsyncioSelectorReactor"
# TWISTED_REACTOR = "twisted.internet.epollreactor.EPollReactor"

I tried all versions of commenting/uncommenting the twisted reactor, but these all yield the same results.

I tried a similar solution as mentioned in #131 by using
    if sys.modules.get("twisted.internet.reactor", False):
        del sys.modules["twisted.internet.reactor"]

    scrapy.utils.reactor.install_reactor('twisted.internet.asyncioreactor.AsyncioSelectorReactor')

This simply does not work:
RuntimeError: There is no current event loop in thread 'MainThread'.

Instead of deleting "twisted.internet.reactor" from sys.modules, you could try not importing reactor at the module level in the first place, and instead import it where you are actually using it, after you call install_reactor.

I also have same issue and still finding the ideal solution for this error. I just recently switched from selenium   to scrapy-playwright for one of my spiders.
Here is  the script that runs those multiple spiders at
**runspider.py**
...

os.environ['DJANGO_SETTINGS_MODULE'] = 'webscraping.settings'
django.setup()

#import models
from project.models import TargetSite, Scrape
from scraper.urls_crawl import match_spiders

configure_logging()
settings = get_project_settings()
runner = CrawlerRunner(settings)

@defer.inlineCallbacks
def crawl(arg):

    for results in match_spiders(TargetSite, settings):
        for spider, url, domain, status in results:
            """
           For this setup, delete the previous scraped data and save for new scraped items.
            """
            if spider.__name__.lower() == f'{arg.lower()}spider' and status.lower() == 'active':
                scrapes_prev = TargetSite.objects.filter(primary_key__exact=domain).first().scrapes.all()
                if scrapes_prev.count():
                    scrapes_prev.delete()
                yield runner.crawl(spider, url=url)

            if arg.lower() == 'all' and status.lower() == 'active':
                scrapes_prev_all = Scrape.objects.all()
                if scrapes_prev_all.count():
                    scrapes_prev_all.delete()
                yield runner.crawl(spider, url=url)

            print(f'Done running: {spider.__name__}')
    reactor.stop()

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='spider name')
    parser.add_argument('-s', '--spider', type=str, metavar='', required=True, help='specify the spider, which is the domain name')
    args = parser.parse_args()

    crawl(args.spider)
    reactor.run()

And that one spider:
**example.py**
...

class TemplateSpider(scrapy.Spider):
    name = 'template '
    domain_name = ''

    custom_settings = {
        'TWISTED_REACTOR': 'twisted.internet.asyncioreactor.AsyncioSelectorReactor',
        'DOWNLOAD_HANDLERS': {
            'http': 'scrapy_playwright.handler.ScrapyPlaywrightDownloadHandler',
            'https': 'scrapy_playwright.handler.ScrapyPlaywrightDownloadHandler',
        },
        'PLAYWRIGHT_LAUNCH_OPTIONS': {
            'headless': True,
        },
        'DOWNLOADER_MIDDLEWARES': {'scraper.middlewares.ScraperDownloaderMiddleware': 543},
        'SPIDER_MIDDLEWARES': {
            'scraper.middlewares.JobStatLogsMiddleware': 300,
            'scraper.middleware_ftp.FtpServerMiddleWare': 300,
        },
    }

    def start_requests(self):
        self.domain_name = '.'.join(urlparse(self.url).netloc.split('.')[-2:])

        yield scrapy.Request(
            url=f'{self.url}/vehicles/',
            meta={
                "playwright": True,
                "playwright_include_page": True,
                "playwright_page_methods": [
                    PageMethod("wait_for_selector", "div.grid-view:nth-child(15)"),
                    PageMethod("evaluate", "window.scrollBy(0,document.body.scrollHeight)"),
                ],
            },
            errback=self.close_page,
        )

    async def parse(self, response):
        page = response.meta["playwright_page"]
        total_units = response.xpath('//h5[@convertus-data-id="srp__vehicles-found"]/text()').get()
        units_per_page = 15
        num_of_pages = math.ceil(int(remove_non_numeric(total_units)) / units_per_page)

        for _ in range(1, num_of_pages):
            await page.evaluate(
                """
                var scrollInterval = setInterval(function () {
                    var scrollingElement = (document.scrollingElement || document.body);
                    scrollingElement.scrollTop = scrollingElement.scrollHeight;
                }, 200);

                """
            )
            prev_height = None
            while True:
                cur_height = await page.evaluate('(window.innerHeight + window.scrollY)')
                if not prev_height:
                    prev_height = cur_height
                    time.sleep(1)
                elif prev_height == cur_height:
                    await page.evaluate('clearInterval(scrollInterval)')
                    break
                else:
                    prev_height = cur_height
                    time.sleep(1)

        html = await page.content()
        await page.close()

        target_elems = Selector(text=html).xpath('//div[@convertus-data-id="srp__vehicle-card"]')

        for num, elem in enumerate(target_elems):
            loader = ItemLoader(ScraperItem(), selector=elem)
            loader.add_xpath('stock_number', './/@data-vehicle-stock')
            loader.add_xpath('vin', './/@data-vehicle-vin')
            loader.add_xpath('vehicle_url', './/a/@href')
            loader.add_value('domain', self.domain_name)

            yield loader.load_item()

    async def close_page(self, error):
        page = error.request.meta['playwright_page']
        await page.close()

Before using selenium, I don't have issue any running  runspider.py -s example because it does not use twisted.internet.asyncioreactor.AsyncioSelectorReactor. Now, it's not working with scrapy-playwright .  I tried different solutions including the one in this post, but it's not working on my end.
It only works when I run that spider. i. e,  scrapy crawl template -a url=https://www.example.com/ and this not ideal because for one template spider, it has many site urls to scrape.
Right now, the temporary solution, I have is a bash script file that runs this particular template spider

I also have same issue and still finding the ideal solution for this error. I just recently switched from selenium   to scrapy-playwright for one of my spiders.
Here is  the script that runs those multiple spiders at
runspider.py
...

os.environ['DJANGO_SETTINGS_MODULE'] = 'webscraping.settings'
django.setup()

#import models
from project.models import TargetSite, Scrape
from scraper.urls_crawl import match_spiders

configure_logging()
settings = get_project_settings()
runner = CrawlerRunner(settings)

@defer.inlineCallbacks
def crawl(arg):

    for results in match_spiders(TargetSite, settings):
        for spider, url, domain, status in results:
            """
           For this setup, delete the previous scraped data and save for new scraped items.
            """
            if spider.__name__.lower() == f'{arg.lower()}spider' and status.lower() == 'active':
                scrapes_prev = TargetSite.objects.filter(primary_key__exact=domain).first().scrapes.all()
                if scrapes_prev.count():
                    scrapes_prev.delete()
                yield runner.crawl(spider, url=url)

            if arg.lower() == 'all' and status.lower() == 'active':
                scrapes_prev_all = Scrape.objects.all()
                if scrapes_prev_all.count():
                    scrapes_prev_all.delete()
                yield runner.crawl(spider, url=url)

            print(f'Done running: {spider.__name__}')
    reactor.stop()

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='spider name')
    parser.add_argument('-s', '--spider', type=str, metavar='', required=True, help='specify the spider, which is the domain name')
    args = parser.parse_args()

    crawl(args.spider)
    reactor.run()

And that one spider:
template.py
...

class TemplateSpider(scrapy.Spider):
    name = 'template '
    domain_name = ''

    custom_settings = {
        'TWISTED_REACTOR': 'twisted.internet.asyncioreactor.AsyncioSelectorReactor',
        'DOWNLOAD_HANDLERS': {
            'http': 'scrapy_playwright.handler.ScrapyPlaywrightDownloadHandler',
            'https': 'scrapy_playwright.handler.ScrapyPlaywrightDownloadHandler',
        },
        'PLAYWRIGHT_LAUNCH_OPTIONS': {
            'headless': True,
        },
        'DOWNLOADER_MIDDLEWARES': {'scraper.middlewares.ScraperDownloaderMiddleware': 543},
        'SPIDER_MIDDLEWARES': {
            'scraper.middlewares.JobStatLogsMiddleware': 300,
            'scraper.middleware_ftp.FtpServerMiddleWare': 300,
        },
    }

    def start_requests(self):
        self.domain_name = '.'.join(urlparse(self.url).netloc.split('.')[-2:])

        yield scrapy.Request(
            url=f'{self.url}/vehicles/',
            meta={
                "playwright": True,
                "playwright_include_page": True,
                "playwright_page_methods": [
                    PageMethod("wait_for_selector", "div.grid-view:nth-child(15)"),
                    PageMethod("evaluate", "window.scrollBy(0,document.body.scrollHeight)"),
                ],
            },
            errback=self.close_page,
        )

    async def parse(self, response):
        page = response.meta["playwright_page"]
        total_units = response.xpath('//h5[@convertus-data-id="srp__vehicles-found"]/text()').get()
        units_per_page = 15
        num_of_pages = math.ceil(int(remove_non_numeric(total_units)) / units_per_page)

        for _ in range(1, num_of_pages):
            await page.evaluate(
                """
                var scrollInterval = setInterval(function () {
                    var scrollingElement = (document.scrollingElement || document.body);
                    scrollingElement.scrollTop = scrollingElement.scrollHeight;
                }, 200);

                """
            )
            prev_height = None
            while True:
                cur_height = await page.evaluate('(window.innerHeight + window.scrollY)')
                if not prev_height:
                    prev_height = cur_height
                    time.sleep(1)
                elif prev_height == cur_height:
                    await page.evaluate('clearInterval(scrollInterval)')
                    break
                else:
                    prev_height = cur_height
                    time.sleep(1)

        html = await page.content()
        await page.close()

        target_elems = Selector(text=html).xpath('//div[@convertus-data-id="srp__vehicle-card"]')

        for num, elem in enumerate(target_elems):
            loader = ItemLoader(ScraperItem(), selector=elem)
            loader.add_xpath('stock_number', './/@data-vehicle-stock')
            loader.add_xpath('vin', './/@data-vehicle-vin')
            loader.add_xpath('vehicle_url', './/a/@href')
            loader.add_value('domain', self.domain_name)

            yield loader.load_item()

    async def close_page(self, error):
        page = error.request.meta['playwright_page']
        await page.close()

Before using selenium, I don't have issue any running  runspider.py -s template because it does not use twisted.internet.asyncioreactor.AsyncioSelectorReactor. Now, it's not working with scrapy-playwright .  I tried different solutions including the one in this post, but it's not working on my end.
It only works when I run that spider. i. e,  scrapy crawl template -a url=https://www.example.com/ and this not ideal because for one template spider, it has many site urls to scrape.
Right now, the temporary solution, I have is a bash script file that runs this particular template spider

I also have same issue and still finding the ideal solution for this error. I just recently switched from selenium   to scrapy-playwright for one of my spiders.
Here is  the script that runs those multiple spiders at
runspider.py
...

os.environ['DJANGO_SETTINGS_MODULE'] = 'webscraping.settings'
django.setup()

#import models
from project.models import TargetSite, Scrape
from scraper.urls_crawl import match_spiders

configure_logging()
settings = get_project_settings()
runner = CrawlerRunner(settings)

@defer.inlineCallbacks
def crawl(arg):

    for results in match_spiders(TargetSite, settings):
        for spider, url, domain, status in results:
            """
           For this setup, delete the previous scraped data and save for new scraped items.
            """
            if spider.__name__.lower() == f'{arg.lower()}spider' and status.lower() == 'active':
                scrapes_prev = TargetSite.objects.filter(primary_key__exact=domain).first().scrapes.all()
                if scrapes_prev.count():
                    scrapes_prev.delete()
                yield runner.crawl(spider, url=url)

            if arg.lower() == 'all' and status.lower() == 'active':
                scrapes_prev_all = Scrape.objects.all()
                if scrapes_prev_all.count():
                    scrapes_prev_all.delete()
                yield runner.crawl(spider, url=url)

            print(f'Done running: {spider.__name__}')
    reactor.stop()

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='spider name')
    parser.add_argument('-s', '--spider', type=str, metavar='', required=True, help='specify the spider, which is the domain name')
    args = parser.parse_args()

    crawl(args.spider)
    reactor.run()

And that one spider:
template.py
...

class TemplateSpider(scrapy.Spider):
    name = 'template '
    domain_name = ''

    custom_settings = {
        'TWISTED_REACTOR': 'twisted.internet.asyncioreactor.AsyncioSelectorReactor',
        'DOWNLOAD_HANDLERS': {
            'http': 'scrapy_playwright.handler.ScrapyPlaywrightDownloadHandler',
            'https': 'scrapy_playwright.handler.ScrapyPlaywrightDownloadHandler',
        },
        'PLAYWRIGHT_LAUNCH_OPTIONS': {
            'headless': True,
        },
        'DOWNLOADER_MIDDLEWARES': {'scraper.middlewares.ScraperDownloaderMiddleware': 543},
        'SPIDER_MIDDLEWARES': {
            'scraper.middlewares.JobStatLogsMiddleware': 300,
            'scraper.middleware_ftp.FtpServerMiddleWare': 300,
        },
    }

    def start_requests(self):
        self.domain_name = '.'.join(urlparse(self.url).netloc.split('.')[-2:])

        yield scrapy.Request(
            url=f'{self.url}/vehicles/',
            meta={
                "playwright": True,
                "playwright_include_page": True,
                "playwright_page_methods": [
                    PageMethod("wait_for_selector", "div.grid-view:nth-child(15)"),
                    PageMethod("evaluate", "window.scrollBy(0,document.body.scrollHeight)"),
                ],
            },
            errback=self.close_page,
        )

    async def parse(self, response):
        page = response.meta["playwright_page"]
        total_units = response.xpath('//h5[@convertus-data-id="srp__vehicles-found"]/text()').get()
        units_per_page = 15
        num_of_pages = math.ceil(int(remove_non_numeric(total_units)) / units_per_page)

        for _ in range(1, num_of_pages):
            await page.evaluate(
                """
                var scrollInterval = setInterval(function () {
                    var scrollingElement = (document.scrollingElement || document.body);
                    scrollingElement.scrollTop = scrollingElement.scrollHeight;
                }, 200);

                """
            )
            prev_height = None
            while True:
                cur_height = await page.evaluate('(window.innerHeight + window.scrollY)')
                if not prev_height:
                    prev_height = cur_height
                    time.sleep(1)
                elif prev_height == cur_height:
                    await page.evaluate('clearInterval(scrollInterval)')
                    break
                else:
                    prev_height = cur_height
                    time.sleep(1)

        html = await page.content()
        await page.close()

        target_elems = Selector(text=html).xpath('//div[@convertus-data-id="srp__vehicle-card"]')

        for num, elem in enumerate(target_elems):
            loader = ItemLoader(ScraperItem(), selector=elem)
            loader.add_xpath('stock_number', './/@data-vehicle-stock')
            loader.add_xpath('vin', './/@data-vehicle-vin')
            loader.add_xpath('vehicle_url', './/a/@href')
            loader.add_value('domain', self.domain_name)

            yield loader.load_item()

    async def close_page(self, error):
        page = error.request.meta['playwright_page']
        await page.close()

Before using selenium, I don't have any issues running  runspider.py -s template because it does not use twisted.internet.asyncioreactor.AsyncioSelectorReactor. Now, it's not working with scrapy-playwright .  I tried different solutions including the one in this post, but it's not working on my end.
It only works when I run that spider. i. e,  scrapy crawl template -a url=https://www.example.com/ and this not ideal because for one template spider, it has many site urls to scrape.
Right now, the temporary solution, I have is a bash script file that runs this particular template spider


Tile collection Problem

Sapui5
1.72.1,'1.65' version
Platform  :IOS,Android    Devices : (Phone)
URL (minimal example if possible):
https://openui5.hana.ondemand.com/#/entity/sap.m.TileContainer/sample/sap.m.sample.TileContainer
User/password (if required and possible - do not post any confidential information here):
Steps to reproduce the problem:
1.Open Tile Container Sample in Library
2.Go to second page
3.Rotate the phone
4.Go back to first page
What is the expected result?
Tile Container should has tiles.
What happens instead?
Tile Container empty the tiles for first slide.
Any other information? (attach screenshot if possible)
There video about it . You can view
https://drive.google.com/file/d/1GEPtesI3pxLX4H6hghMR8X1R0q6zay-9/view?usp=sharing

The description sounds like a duplicate of 2777. Or is there a difference?

Hi same problem but i’m getting it on the phone , urgently problem for me because customer complaint thank you for help
Best regards

Gönderen: Frank Weigel<EMAIL_ADDRESS>Gönderildi: Thursday, January 2, 2020 7:59:34 PM
Kime: SAP/openui5<EMAIL_ADDRESS>Bilgi: Veysi Aslan<EMAIL_ADDRESS>State change<EMAIL_ADDRESS>Konu: Re: [SAP/openui5] Tile collection Problem (#2778)
The description sounds like a duplicate of 2777. Or is there a difference?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSAP%2Fopenui5%2Fissues%2F2778%3Femail_source%3Dnotifications%26email_token%3DAI7CPLCUHZBKG3SOQ4IZUG3Q3YMPNA5CNFSM4KCEIXG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH62APY%23issuecomment-570269759&data=02|01||08d5d92325c14e285a9508d78fa52529|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637135811762303803&sdata=BDc4WKe6BzCS5MAqKwSL7nZbl5R9hGw1WnBSDn4aOss%3D&reserved=0, or unsubscribehttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI7CPLDNT6QOMFSR2CRU5ZTQ3YMPNANCNFSM4KCEIXGQ&data=02|01||08d5d92325c14e285a9508d78fa52529|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637135811762303803&sdata=py1tdjzjZqoxN9orRw4zhpjPcaMif7SY8TV8P2WmWJ4%3D&reserved=0.

First of all, I can confirm the issue. It is reproducible even in Chrome's device simulator.
As far as I can see, this is an inconsistency between the TileContainer's _onmove and _resize methods:

When the device orientation is changed, _resize removes the DOM for all tiles.
But when swiping the container (no matter what direction), the _onmove method always renders another page on the right hand side (never on the left hand side). Without device rotation, this is not a problem. The initial display starts with the leftmost page and only pages on the right hand side can become newly visible when swiping. As redundant rendering of tiles is internally avoided, this is even efficient.
But together with device rotation and the mentioned DOM cleanup of _resize, this approach no longer works as anything to the left of the current page is never rendered again.

If you need a temp. workaround to help your customers until a fix becomes available from control owners, the following dirty hack might help you (please remove it when it is no longer needed):
// Note: "Device" has been required from "sap/ui/Device"
var oTileContainer = ... // retrieve your TileContainer after creation, e.g. in controller oninit
if (Device.system.tablet || Device.system.phone) {
	Device.orientation.attachHandler(function() {
		oTileContainer._iCurrentPageStartTileIndex = 0;
	});
}

The newly added orientation change handler will be executed around the same time the original  handler of the TileContainer will be called, but before the _resize handler of the TileContainer acts. The new handler sets the position back to zero. This might not be handy for end users but better as seeing no tiles at all.
A correct fix could be to implement rendering of left hand pages in _onmove, depending on the direction of the swipe, but that's up to control owners (or to a contribution).
P.S.: When I say 'left' or 'right above', I refer to a Left-to-right scenario. In a Right-To-Left scenario, terms have to be exchanged. The hack above still works in that case, without modification.

For internal tracing, both #2777 and #2778 will be checked internally via #2080003916

I applied the above but didn't work , pls just try on the device? Thank you .

"above" refers to the proposed workaround or to the fix which has been submitted 4minutes ago?

No 4 days ago ,
https://github.com/SAP/openui5/issues/2778#issuecomment-570373115

Then please try the fix that has been provided a few minutes ago.


Build and Test for the CI

Fixes #40
Fixes #64
Fixes #66

@drpaneas I have an issue with make fmt on my machine.
I get error: /bin/sh: goimports: command not found.
goimports is configured and works properly on VSCode.
Maybe something wrong with GOPATH? Can you help here?


documentation: README.md has unterminated code-block at bottom

The markdown code-block for the resource description is not terminated correctly, which breaks display on GitHub.

Fixed on master (v1.5.0) and release-1-4.x (v1.4.1).


Link to Ansible Galaxy in description doesn't work

Your link: https://galaxy.ansible.com/detail#/role/3375 (empty page)
Working link: https://galaxy.ansible.com/ansiblebit/oracle-java/
Here:

fixed.


this is what it shows me in atom when i use this package.

Deprecated calls
saveallthetime (3 deprecations)
Store package style sheets in the styles/ directory instead of stylesheets/ in the saveallthetime package
Called 1 timeCreate Issue on saveallthetime repo
Package.getStylesheetsPath - /usr/local/share/atom/resources/app.asar/src/package.js:430:9
Package.getStylesheetPaths - /usr/local/share/atom/resources/app.asar/src/package.js:441:32
Package.loadStylesheets - /usr/local/share/atom/resources/app.asar/src/package.js:423:38
 - /usr/local/share/atom/resources/app.asar/src/package.js:167:19
Use ::getRepositories instead
Called 1 timeCreate Issue on saveallthetime repo
Project.getRepo - /usr/local/share/atom/resources/app.asar/src/project.js:579:12
Object.activate - /home/anand/.atom/packages/saveallthetime/lib/saveallthetime-atom.coffee:24:24
Package.activateNow - /usr/local/share/atom/resources/app.asar/src/package.js:222:19
 - /usr/local/share/atom/resources/app.asar/src/package.js:203:30
atom.workspaceView is no longer available. In most cases you will not need the view. See the Workspace docs for alternatives: https://atom.io/docs/api/latest/Workspace. If you do need the view, please use atom.views.getView(atom.workspace), which returns an HTMLElement.
Called 1 timeCreate Issue on saveallthetime repo
Atom.Object.defineProperty.get - /usr/local/share/atom/resources/app.asar/src/atom.js:57:13
Object.activate - /home/anand/.atom/packages/saveallthetime/lib/saveallthetime-atom.coffee:29:9
Package.activateNow - /usr/local/share/atom/resources/app.asar/src/package.js:222:19
 - /usr/local/share/atom/resources/app.asar/src/package.js:203:30
Deprecated selectors
saveallthetime
keymaps/saveallthetime-atom.cson
Use the atom-workspace tag instead of the workspace class.
Create Issue on saveallthetime repo

it does not work anymore.


Invalidated terminal block hash (by EL)

Description
I stuck how should we handle this, so explaining the issue.
We reach the terminal block and are sending FCU to the EL:
2022-08-08 13:56:28.120 INFO  - Loaded initial state at epoch 0 (state root = 0x71ef5939afd6e13ef0bf496e51144e4a95381ecdd7eba875aee705adfd43a31a, block root = 0x9a13008edfae88d4c53c4a48d8ca1bc3a207e0facb37b175dc4096df4684f40c, block slot = 0).
2022-08-08 13:56:28.132 INFO  - Genesis Event ***
Genesis state root: 0x71ef5939afd6e13ef0bf496e51144e4a95381ecdd7eba875aee705adfd43a31a
Genesis block root: 0x9a13008edfae88d4c53c4a48d8ca1bc3a207e0facb37b175dc4096df4684f40c
Genesis time: 2022-08-08 13:56:34 GMT
2022-08-08 13:56:48.086 TRACE  - engineForkChoiceUpdated(forkChoiceState=ForkChoiceState{headBlockRoot=0x9a13008edfae88d4c53c4a48d8ca1bc3a207e0facb37b175dc4096df4684f40c, headBlockSlot=0, headExecutionBlockHash=0x463bb01dc74aaf70ea402298240a43e40f323f535b00e9218da2df8a3a77552c, safeExecutionBlockHash=0x0000000000000000000000000000000000000000000000000000000000000000, finalizedExecutionBlockHash=0x0000000000000000000000000000000000000000000000000000000000000000, isHeadOptimistic=false}, payloadAttributes=Optional.empty) -> ForkChoiceUpdatedResult{payloadStatus=PayloadStatus{status=Optional[INVALID], latestValidHash=Optional[0x0fea94893de4066de64c5f3ad817b3370607cb1d95876f2e71b44ea7ad741aa1], validationError=Optional.empty, failureCause=Optional.empty}, payloadId=Optional.empty}

It looks like a correct answer by EL as it invalidates exact terminal block hash. But what we are doing next looks incorrect: we are trying to invalidate corresponding BeaconBlock which is not incorrect and getting an Exception:
2022-08-08 13:56:48.088 INFO  - node ProtoNode{blockSlot=0, stateRoot=0x71ef5939afd6e13ef0bf496e51144e4a95381ecdd7eba875aee705adfd43a31a, blockRoot=0x9a13008edfae88d4c53c4a48d8ca1bc3a207e0facb37b175dc4096df4684f40c, parentRoot=0x0000000000000000000000000000000000000000000000000000000000000000, justifiedCheckpoint=Checkpoint{epoch=0, root=0x0000000000000000000000000000000000000000000000000000000000000000}, finalizedCheckpoint=Checkpoint{epoch=0, root=0x0000000000000000000000000000000000000000000000000000000000000000}, unrealizedJustifiedCheckpoint=Checkpoint{epoch=0, root=0x0000000000000000000000000000000000000000000000000000000000000000}, unrealizedFinalizedCheckpoint=Checkpoint{epoch=0, root=0x0000000000000000000000000000000000000000000000000000000000000000}, executionBlockHash=0x0000000000000000000000000000000000000000000000000000000000000000, weight=0, parentIndex=Optional.empty, bestChildIndex=Optional.empty, bestDescendantIndex=Optional.empty, validationStatus=VALID} marking as invalid, 0x9a13008edfae88d4c53c4a48d8ca1bc3a207e0facb37b175dc4096df4684f40c, Optional[0x0fea94893de4066de64c5f3ad817b3370607cb1d95876f2e71b44ea7ad741aa1], true
2022-08-08 13:56:48.089 ERROR - PLEASE FIX OR REPORT | Unexpected exception thrown for forkchoice-async-0
java.util.concurrent.CompletionException: java.lang.IllegalStateException: Cannot change node validity from VALID to INVALID

From my view invalid terminal block hash should be handled here in the same way like in #5887 not invalidating transition BeaconBlock by default because it doesn't have any reference to the terminal block (and is not invalid btw). Do I understand it correctly?

Ah, it took me a bit to work out what the actual problem here was.  It looks like we're sending a fCU with a pre-merge beacon block and the terminal block we've selected as the execution hash.  The EL is then reporting that's INVALID which is causing us to try and mark the pre-merge block we sent as INVALID.
I can't see any way that this situation works out well. We've asked the EL for it's chain head and it's told us block A. We've check the TTD conditions for block A and found they pass. It is therefore a fully valid transition block. But then when we try to use it the EL changes it's mind and says it's INVALID. That has to be a bug or misconfiguration in the EL and we should report an error.
That said, the specific error we're reporting is the wrong one as the head block used in fCU is pre-merge we shouldn't be attempting to mark it as invalid. We probably should identify this particular case and log an error saying the EL reported the selected transition block as invalid despite it previously being valid.

Yeah, EL previously gave us this block, it's a good point.

We probably should identify this particular case and log an error saying the EL reported the selected transition block as invalid despite it previously being valid.

Sounds reasonable

but what if, say ttd = 1000
pre-terminal (999) - terminal 1 (1001)
- terminal 2 (1002) - arrives a bit later
And we are sending fcU with terminal 1? It looks like a correct EL behavior in this case

but what if, say ttd = 1000
pre-terminal (999) - terminal 1 (1001)
               \- terminal 2 (1002) - arrives a bit later

And we are sending fcU with terminal 1? It looks like a correct EL behavior in this case

No, it is entirely within the CL's prerogative to choose any terminal block that meets the conditions. It would normally pick the EL chain head which would have the highest total difficulty, but there is no requirement for that to be true and the block isn't invalid just because there's an alternative block.

yeah, CL could have requirement for hash, for example, right


Issue 145 spatial variables

Description
Creates and discretises SpatialVariable class
Fixes #145
Type of change

[x] New feature (non-breaking change which adds functionality)

Key checklist:

[x] No style issues: $ flake8
[x] All tests pass: $ python run-tests.py --unit
[x] The documentation builds: $ cd docs and then $ make clean; make html

Further checks:

[x] Code is commented, particularly in hard-to-understand areas
[x] Tests added that prove fix is effective or that feature works
[x] Any dependent changes have been merged and published in downstream modules

Codecov Report

Merging #157 into master will increase coverage by 0.08%.
The diff coverage is 100%.

@@           Coverage Diff            @@
##           master   #157      +/-   ##
========================================
+ Coverage   96.91%    97%   +0.08%
========================================
  Files          36     36
  Lines        1394   1401       +7
========================================
+ Hits         1351   1359       +8
+ Misses         43     42       -1

Impacted Files
Coverage Δ

pybamm/expression_tree/independent_variable.py
100% <100%> (+5%)
:arrow_up:

pybamm/discretisations/base_discretisation.py
99.18% <100%> (+0.01%)
:arrow_up:

Continue to review full report at Codecov.

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

Good spot, fixed


Strange behaviour for some Images

I load the source Image via the ImageLoader lib.
After that i set the Bitmap as image.setImageBitmap();
For most pictures it works great but for some pictues ( i cannot say whats the different between those pictures ) there is a strange behaviour.
As soon as i set the image, the visual crop area is set correcty in the center of the screen BUT the real  crop area is at the bottom of the screen.
When i crop the image via getCroppedImage(); the visual crop area moves automaticly down in the crop area and the image gets cropped.
Any ideas ?

I have same issue.
How can i resolve it ?

I think this happens when image scaled to "center inside" the crop view. Crop rectangle does not crop what you see in screen, instead it crops the place in original size.
But I don't have any solution.


west: Add atmosic remote

Atmosic HAL is not hosted in zephyrproject-rtos organization so it needs its own remote to tell where the HAL is hosted.

Hi, it seems that the HAL revision was no pushed to the hal_atmosic repository. Can you please update that ?


Warnings

After requiring simplecov-console in my test_helper.rb, I ran the tests and got three warnings from your gem. Check the attachment out.

I saw that there are a lot of things waiting for response in this repository.


First pass at Hip Pocket class on .NET

For David's review. Is that what he is looking for?
(Obviously not finished)

Thx. Will take a look later this afternoon.

On May 5, 2016, at 2:56 PM, Aaron K. Clark<EMAIL_ADDRESS>wrote:
For David's review. Is that what he is looking for?
(Obviously not finished)
You can view, comment on, or merge this pull request online at:
https://github.com/OperationCode/operationcode/pull/221
Commit Summary
First pass at Hip Pocket class on .NET
File Changes
A DOTNET/DOTNET.md (45)
A DOTNET/scotty_trek4.jpg (0)
Patch Links:
https://github.com/OperationCode/operationcode/pull/221.patch
https://github.com/OperationCode/operationcode/pull/221.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

Nice man! Love it. I can merge after lunch.

Made some changes to the header, far and some of the pages. Will tackled this in the next day or two.


Test Ubuntu 22.04 in workflows (OSOE-495)

On the 15th ubuntu-latest will refer to Ubuntu 22.04, see this issue. Let's test if our workflows have any issues with that.
Jira issue

If this is a concern, should we stop using the *-latest images in general?

Good idea. Let's actually change this to use the latest OS versions, but hard-coded, so we have control over the upgrades.


cloud storage is authenticated but still cannot use it

when i instantiate gCloudStorage and call the loadCredentials function - i'm seeing data. but when i call it in my app (aka using text speech or something else. it says "Error: Could not load the default credentials"
i did some digging, and even tho when i console.log(gCloudStorage.authClient) it still shows checkIsGCE: undefined. from digigng around in the package code, it seems that you are checking if the GCE .env variable is there for auth and doesn't seem to support/work for passing in the parsed json directly.
this is necessary for hosting in a cloud environment where i'd need to add the json as an .env and can't directly put in file path to json. also seems related to this bug, but not sure if it is exactly the same.
would appreciate any help or feedback! i currently can't use my cloud storage or any of the google cloud compute my app is built on in production.
code snippet
const { Storage } = require("@google-cloud/storage");

const base64EncodedServiceAccount = process.env.CLOUD_CREDENTIALS;
const decodedServiceAccount = Buffer.from(base64EncodedServiceAccount, 'base64').toString('utf-8');
const credentials = JSON.parse(decodedServiceAccount);

const gCloudStorage = new Storage({
   projectId: `palate-d1218`,
   keyFilename: "",
   credentials: credentials
})

async function loadCredentials() {
   console.log(gCloudStorage.authClient)
   try {
      const [buckets] = await gCloudStorage.getBuckets();
      console.log(`buckets: `)
      for (const bucket of buckets) {
         console.log(` - ${bucket.name}`)
      }
      console.log(`listed all buckets`)
   } catch (e) {
      console.log(`error getting buckets`)
      console.log(e)
   }

}
loadCredentials()

Environment details

which product (packages/*): "@google-cloud/storage": "^7.7.0"   "@google-cloud/text-to-speech": "^5.1.0",
OS: Mac OS Sonoma
Node.js version: v18.17.1
npm version: 9.6.7
google-cloud-node version: "@google-cloud/storage": "^7.7.0"   "@google-cloud/text-to-speech": "^5.1.0",

it seems that you are checking if the GCE .env variable is there for auth and doesn't seem to support/work for passing in the parsed json directly.

Two things here:

Checking if GCE is used for certain flows; it is not required for local development or using via another cloud provider
Parsed JSON is supported via new GoogleAuth({credentials}) or GoogleAuth#fromJSON:

import {GoogleAuth} from 'google-auth-library';

const auth = new GoogleAuth({credentials : {}});

Here are instructions for authenticating via Application Default Credentials:

docs: https://cloud.google.com/docs/authentication/provide-credentials-adc
video: https://www.youtube.com/watch?v=PAOb2hl__08

okay it seems i'm authenticated. i'm able to see my storage buckets when loadCredentials runs above, but do you have any idea why am i still seeing errors when trying to call text to speech api? @danielbankhead
i've tried to use the api to output a speech file and to just output voices using googleTextToSpeechClient.listVoices({ languageCode }).
i'm getting this error on both -
Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.
    at GoogleAuth.getApplicationDefaultAsync (/Users/idodekerobo/Documents/gCloudApp/node_modules/@google-cloud/text-to-speech/node_modules/google-auth-library/build/src/auth/googleauth.js:207:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async GoogleAuth.getClient (/Users/idodekerobo/Documents/gCloudApp/node_modules/@google-cloud/text-to-speech/node_modules/google-auth-library/build/src/auth/googleauth.js:624:17)
    at async GrpcClient._getCredentials (/Users/idodekerobo/Documents/gCloudApp/node_modules/@google-cloud/text-to-speech/node_modules/google-gax/build/src/grpc.js:145:24)
    at async GrpcClient.createStub (/Users/idodekerobo/Documents/gCloudApp/node_modules/@google-cloud/text-to-speech/node_modules/google-gax/build/src/grpc.js:308:23)
(node:95143) MetadataLookupWarning: received unexpected error = Invalid response from metadata service: incorrect Metadata-Flavor header. code = UNKNOWN
(Use `node --trace-warnings ...` to show where the warning was created)

There could be a compatibility issue with the file or it may not be found. Could you try passing the GoogleAuth instance to the Text-to-Speech client?


Open Access?

I am wondering if we could make a push to have this published open-access? Possible provisions this could fall under:

articles describing reporting and experimental standards, consensus statements and white papers presenting the roadmap of large community initiatives (policy introduced in April 2011)
articles describing community experiments to compare the performance of software tools (policy introduced in November 2012)

@obigriffith, @malachig, what do you think?


Add pre-commit hook and GHA workflow to apply black linter to Python files

Description
Add a pre-commit hook and GHA workflow to apply the black linter to Python files.
Expected coding style
ITK contains numerous Python files: by applying a pre-commit hook and GHA workflow to apply the black linter to such files would improve readability across such files by standardizing their style.
Actual coding style
No Python linter is applied other than the one done locally by some maintainers and contributors.
Versions
master.
Additional Information
N/A.

#xref #4235, which does have a black linter, but the ruff linter does the same and more, so it may be sufficient.


Place Option Order

Is it possible to support option order?

This has been added in this release. https://github.com/MaxxRK/firstrade-api/releases/tag/v_0030
I will leave this issue open for a little while longer as I am not an advanced trader and do not trade options very much/at all. Please let me know if you encounter any problems and I will work to get them fixed.
Thanks and enjoy!

Have you tried to use this for option orders?

closing this there has been no response


"docker volume ls" with spureous warning/error

Hi,
I have docker-volume-netshare installed, with this content in /etc/default/docker-volume-netshare
DKV_NETSHARE_OPTS="cifs"

I also installed cifs-utils only on Ubuntu 16.04, with docker 1.11.
$ sudo docker volume ls
list nfs: Post http://%2Frun%2Fdocker%2Fplugins%2Fnfs.sock/VolumeDriver.List: dial unix /run/docker/plugins/nfs.sock: connect: connection refused
DRIVER              VOLUME NAME

I tried installing nfs-common and the message persists.
Any idea on how to get rid of this message?
Besides the aesthetics, it add a 15s delay to a simple "docker volume ls".
Thx

The problem probably is, you once started the plugin with DKV_NETSHARE_OPTS="nfs" which created the /run/docker/plugins/nfs.sock socket.
Simply remove this file (it is recreated at startup with option set to nfs mode in case you need it in future) by
rm /run/docker/plugins/nfs.sock

That solved it. Thx


It is recommended to provide different priority IO for different storage volumes

In the actual production environment, a set of chubaofs can allocate a lot of storage volumes and use them for different storage services. Although these storage volumes are in different namespaces, the bottom layer is the same set of storage resources, but the business has priority.
Therefore, it is recommended that different businesses, on the datanode, have their IO priority sorted.
Cannot put the IO priority of mysql, es and the priority of database backup at the same level

we can solve this problem by another way, e.g. use two different clusters


Add UI tag to routes

👋 hi all, Robert Monarch's Coursera course brought me here. I'm hoping I can make myself useful 🙂
Pull Request
Description
Adds a URL param to identify requests coming directly from the web app
Fixes https://github.com/openclimatefix/nowcasting/issues/373 - lmk if I misunderstood the intention here!
How Has This Been Tested?
I ran the web app and API locally and checked that the param was propagated and persisted to Postgres in some test queries. Example:
postgres=# select * from (select distinct on (url, email) * from api_request join "user" on user_uuid = "user".uuid where url like '%national/forecast%' and email not like '%openclimatefix%' order by url, email, created_utc desc) as anon_1 where created_utc > '2023-06-20' order by created_utc desc;

                 uuid                 |                                               url                                               |              user_uuid               |          created_utc          |                 uuid                 |  email
--------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------------------+-------------------------------+--------------------------------------+---------
 b7d9dc1c-32f7-4fb9-be6d-f69b1478c2e1 | http://localhost:8000/v0/solar/GB/national/forecast?historic=false&only_forecast_values=true&UI | 4ad2d486-51b8-44d3-bfea-1adcdc225a4b | 2023-07-22 17:59:22.880993+00 | 4ad2d486-51b8-44d3-bfea-1adcdc225a4b | unknown
 (1 row)

Checklist:

[x] My code follows OCF's coding style guidelines
[x] I have performed a self-review of my own code
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[x] I have checked my code and corrected any misspellings

Thanks for this @okjake , @braddf would you be able to resovle conflicts and get this merged?

Thanks for this @okjake , @braddf would you be able to resovle conflicts and get this merged?

or @okjake do you fancy resolving the conflicts? thanks


Document how we add Additional state (non entity state)

how do we customize state? (e.g. we have loading and filters on one, but another has different state)

Done as part of the move to @ngrx/entity


python3Packages.gocardless-pro: remove nose dependency

Description of changes
Addresses #326513.
Dependency nose was removed in favor of pytest in version 1.46.2 (See changlelog).

Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[ ] Fits CONTRIBUTING.md.

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

Thanks! Can you handle the PEP 517 migration by replacing the format with pyproject = true; and switching the setuptools dependency to build-system = [ setuptools ];?

Done!

@ofborg build python3Packages.gocardless-pro


Geofencing link is not helpful

It's supposed to be used an example of how to do something with an API, but the linked explainer looks like it was never finished before it was abandoned.

We discussed on the call today. The consensus was to keep it (as it's just an example) unless there is a more relevant and current example that could be used in its place? To be clear, this is referencing section 2.4.

There is a (likewise abandoned) spec, which may at least be the better link target: https://www.w3.org/TR/geofencing/.

Thanks for that inout, Thomas. We discussed this in the our virtual f2f and decided to keep it the way it is.


elmPackages.elm: move makeWrapper to nativeBuildInputs

partially addresses https://github.com/NixOS/nixpkgs/issues/188296
and moves us closer towards working cross compilation

Built on platform(s)

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

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

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

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

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

[x] Fits CONTRIBUTING.md.

@GrahamcOfBorg build elmPackages.elm

Addressed in c6568adb005175fb77ef94fee09aa4e8cc248a60.

thanks @sternenseemann


Warmage Spells Missing on Level up

Bug:  My Warmage only has the option of Wind Wall for 3rd level spells.
Expected Behavior:  I was expecting the 3.5e warmage spell list or as close to it as ToEE can get.
Fire Shield, Fireball, Flame Arrow, Gust of Wind, Ice Storm, Lightning Bolt, Poison, Ring of Blades, Sleet Storm, Stinking Cloud
The 2nd level list seems a little light too.

You only select spells for advanced learning (extra evocations spells not normally on the warmage list).  You should automatically get the other spells after you level up.

Looks like you figured it out...


Mount /run/metatron for containers as a shared tmpfs, so that all containers in a pod can use it

This is to enable a shared /run for all containers in a pod,
mostly for sharing metatron credentials.
The thing is, '/run' is too much. We'll have all sorts of conflicts
over pid files, locks, logs, etc if we share the whole thing.
This change only shares /run/metatron to the other containers.
I was hoping that I could implement Country&Western in such a way
that the existing behavior of the main container remains unchanged,
but the tmpfs stuff is unavoidable. Hopefully when we get to the "stage1" approach,
this runtime dir will just be reused.

Tested this a bit in real life, added the explicit /run/metatron mount (not all of /run).
Also, because it is VK creating this tmpfs (and not docker), that means vk must clean up!
A new failure mode I could be potentially introducing would be failing to clean up the tmpfs when done.
If someone kill -9's VK or something, these tmpfs will be left behind :(
Still though, no sensitive material will be left on disk.

Per @JackOfMostTrades 's guidance, I've added /metatron (static certs) to also be shared. It doesn't have anything sensitive, so it doesn't need to live in a tmpfs, and can be shared via the normal means.

Let me test this a little more thoroughly on my dev stack first.

Confirmed, this works fine. For whatever reason we've been able to get metatron+systemd working since forever.

If for some reason this starts causing trouble with leftover junk, we can instead change to depend on the /run tmpfs of the host (because these end up in /run/titus-executor anyway) if we wanted to, and clean up via systemd instead of via titus-executor cleanup hooks.


Python-3.11 on CI

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@5ecd1ca). Click here to learn what that means.
The diff coverage is n/a.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@           Coverage Diff           @@
##             main       #5   +/-   ##
=======================================
  Coverage        ?   98.70%
=======================================
  Files           ?        4
  Lines           ?      155
  Branches        ?        0
=======================================
  Hits            ?      153
  Misses          ?        2
  Partials        ?        0

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


:sparkles: feat(ui): add new component strength password

To which ticket/issue is this PR linked to?
https://jira.lyft.net/browse/MGW-26
What does this PR add, change or fix?
Add new component Password Strength
Related PR
https://github.com/pbsc/react-native-ui-components/pull/72
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] Documentation update
[ ] Code refactoring
[ ] CI/CD or build process changes
[ ] Other

:tada: This PR is included in version 2.1.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


PHP 8.3 | Tokenizer/PHP: add support for readonly anonymous classes

Description
PHP 8.3 introduced readonly anonymous classes, fixing an oversight in the PHP 8.2 introduction of readonly classes.
As things were, for PHP 8.1+, the tokenizer would change the token code for the readonly keyword from T_READONLY to T_STRING in the "context sensitive keyword" layer, thinking it to be a class name.
And for PHP < 8.1, the readonly polyfill would ignore the token as it being preceded by the new keyword would be seen as conflicting with the "context sensitive keyword" layer, which meant it would not be re-tokenized from T_STRING to T_READONLY.
This commit fixes both.
Includes adding tests in a number of pre-existing test classes to cover this change.
Suggested changelog entry

Added

Support for PHP 8.3 readonly anonymous classes.

Related issues/external references
Related to #106
Types of changes

[x] New feature (non-breaking change which adds functionality)

Unless there are objections/someone leaves a comments on this PR, I will merge this tomorrow.

Rebased and made one more small tweak (limit the exception in the context sensitive keywords layer to strtolower($token[1]) === 'readonly'). Merging once the build passes.