Help me understand remove_widget

Hi
I got a small problem, I started using gridster today :)
My requirements are as following:

Two widgets per row
When a user clicks  "Add widget" a widget should be created as the last widget in the grid
When a user clicks close button (resides in the li.header) the selected widget should be removed and all other widgets should reposition themselves to grab empty space on the left or up a row.

Reality:

When a user clicks "Add widget" a widget is created at the end
When a user clicks close button the widget is removed but only a single widget is repositioned (the one that resides in the row under). So, say we have 3 widgets on the left side of the grid and 3 on the right side (remember, two widget per row). If I remove the 3rd widget on the left side then result is 2 on left side and 3 on the right insted of the 3rd from the right side moving to the left side on the same row.

This is the code I use to remove the widget:
gridster.$el
.on('click', 'li header a', function ()
{
var currentWdg = $(this).closest('li');
gridster.remove_widget(currentWdg, false);
})
Any ideas?
Kind regards
Toto

Did you find a solution for this or could you provide some example code?


Cube interface crashing again

Trying to tab from first item to second item action causes Quicksilver to crash when using the Cube interface plugin.

It sure does. What version of macOS are you on? I think this might be new in Sierra.

Never mind. I could reproduce it in 10.10.

FTR, 10.12. But yes, I also reproed on 10.10.
Not to say that there aren’t other serious issues that are crashing QS that are most likely specific to 10.12. Can’t really provide repro steps, but after the upgrade, I quite frequently hit the trigger for QS only to find that it has crashed out from under me at some indeterminate period in the past!

On Apr 14, 2017, at 09:00, Rob McBroom<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
Never mind. I could reproduce it in 10.10.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/quicksilver/Quicksilver/issues/2340#issuecomment-294149725, or mute the thread https://github.com/notifications/unsubscribe-auth/AaMv4oD32dSd3Dd_EYarh8Sggd_bIFahks5rv235gaJpZM4M9cTs.

Considering the Cube interface 'unsupported' at this time. Please switch to an alternative interface.


Rename respondWith()/canRespond → transitionWhile()/canTransition

Looking at the spec, they have changed from the fetch like respondWith, to AppHistory independent transitionWhile
https://github.com/WICG/app-history/issues/94#issuecomment-888248569
https://github.com/WICG/app-history/pull/151
In the tests and code for this repo, respondWith is used

This also changes canRespond to canTransition
https://github.com/Yannic/chromium/commit/6cf2470054220f5bd919de04399f0e31e6b3f783#diff-e6da4f6c72af2c3585fe2b7c17f04ee183773bd20a7dd5171a949f3f90e4d3a9R14

I haven’t had time to work on this repo for awhile.

No worries at all! I am about to raise a PR, a direct replace + yarn test pass!

Fix in #3 I believe.

@frehner Can you publish changes on npm?


"error: ambiguous restricted type" while trying to deploy on emulator

Hi,
I'm getting this error when trying to deploy on emulator
error: ambiguous restricted type
   --> f8d6e0586b0a20c7.NFTStorefront:350:47
    |
350 |             nftProviderCapability: Capability<&{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>,
    |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: ambiguous restricted type
   --> f8d6e0586b0a20c7.NFTStorefront:384:47
    |
384 |             nftProviderCapability: Capability<&{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>,
    |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)

I thought it was because of some changes that I did but it also appeared when cloning from scratch.
Any ideas?
Thanks! any help is appreciated! 🙏

Did you deploy the NonFungibleToken contract to the emulator, and change the imports to use the corresponding emulator addresses for both contracts?


elm-export is now on hackage

Is it possible to update the readme. Is it no longer necessary to build with a custom stack.yaml?

Actually, it is still necessary - servant-elm currently relies on a forked version of elm-export. I'm working with krisajenkins to get the features we need into the upstream version - track https://github.com/krisajenkins/elm-export/pull/15 for updates.
I've updated the README here too.

Everything is now on Hackage :)

Great, thanks!


HorizontalPodAutoscaler (HPA) resource does not work for newer kubernetes versions

Describe the bug
When attempting to apply the helm chart with the following configurations:
autoscaling:
    enabled: true
    minReplicas: ${apiserver_configs.min_replicas}
    maxReplicas: ${apiserver_configs.max_replicas}
    targetCPUUtilizationPercentage: ${apiserver_configs.target_cpu_utilization}
    targetCPU: ${apiserver_configs.target_cpu_utilization}
    targetMemoryUtilizationPercentage: ${apiserver_configs.target_memory_utilization}

for both testkube-api or testkube-dashboard, the apply will fail with the following error:
Error: error validating "": error validating data: [ValidationError(HorizontalPodAutoscaler.spec.metrics[1].resource): unknown
field "targetAverageUtilization" in io.k8s.api.autoscaling.v2.ResourceMetricSource,
ValidationError(HorizontalPodAutoscaler.spec.metrics[1].resource): missing required field "target" in
io.k8s.api.autoscaling.v2.ResourceMetricSource]

I'm running kubernetes version 1.23, I believe the problem is kubernetes deprecated the apiVersion autoscaling/v2beta1 for HPA since 1.22, and we need to use autoscaling/v2 instead for newer versions with a slightly different syntax (see example PR in Additional Context section).
To Reproduce
Steps to reproduce the behavior:

Have a cluster with server version >= 1.23
Turn autoscaling configuration on
install/upgrade helm with the autoscaling configuration
see the error

Expected behavior
The apply should succeed with the HPA resources created for any kubernetes server version
Version / Cluster

Which testkube version? latest helm chart version 1.11.126
What Kubernetes cluster? EKS
What Kubernetes version? 1.23

Additional Context
Found an example PR with similar issue and fix: https://github.com/bitnami/charts/pull/10061/files

hi @zepeng811,
please upgrade TK charts version to the latest one. You should be able to create HPA now.
let me know how it will go. Thanks!

@ypoplavs Thanks for the quick turnaround! I can confirm that HPA works for both api-server and dashboard with the latest chart version.
Will mark this issue as completed, Thanks again!


DiscordClient.Connect

When i put the code supplied on the documentation it give me "No overload for method 'connect' takes 1 arguments" and then suggests that i change Connect to Disconnect

Im new to C# programming im not really sure what you mean

With the connect you can either connect with just an email and password or with a token provided to you by Discord.
Intellisense shows that there are two signatures:
Connect(string email, string password);
which will let you use Discord.Net with just a normal account if you don't want to mess with the Discord API and getting a token, etc and
Connect(string token, TokenType tokenType);
for cases where you have a proper token. There are two token types which are TokenType.Bot and TokenType.User. You're most likely going to be using a Bot token type.
So to fix your example, you'd be doing:
await _client.Connect("THIS-IS-THE-API-TOKEN-DISCORD-PROVIDED-YOU", TokenType.Bot);

@Jackdouglas99 this is, by far, not a beginner's library. You should take a look at the tutorials on the .Net Core website https://www.microsoft.com/net/learn


ldifs changes

To allow the creation of ldifs in the correct sequence we need to number them.

@xnulinu  @rohit2b


fix(dialog): prevent close when click released in scrim

This is an attempt to avoid the dialog to close when the mouse click was initiated inside the content but released from the scrim.

Update on this, there's some screenshot test failures that need more investigating, so apologies for the delay

Update on this, there's some screenshot test failures that need more investigating, so apologies for the delay

Can you give me more details? the tests run fine on my end.

Update on this, there's some screenshot test failures that need more investigating, so apologies for the delay

Can you give me more details? the tests run fine on my end.

It's internal tests, so they don't run on github 😔

I noticed quite a few quirks on the select element (not just in a dialog), maybe it's a good opportunity to polish this element instead of trying to fix one problem related to this specific case.

the failing screenshot test seems to be weird. I can't nail down the exact issue but looks flaky when attempting to reproduce the issue with a debugger in a live environment in the test. Otherwise, normal interaction looks good. Gonna have to spend a bit of time to figure out what's going on here

I've got a failing case that's easy to reproduce:

Put a checkbox in the dialog
Toggle the checkbox with the Spacebar
Watch it close the dialog

Not every click event has a preceding pointerdown event so the next click will fail the check. You should probably just handle both events.

@austinw-fineart This looks like a different issue to me, plus I couldn't reproduce it.
If you have a problem could you open another issue and join a playground to it?
You can use this template: https://lit.dev/playground/#gist=db372518cfa9cd6097b7842e6da5f740
Thanks

@vdegenne I'm afraid I do not know how to import this into playground. I ran the test case on this pull request.


Roll Engine from a1468f9b2495 to 98387f3ce3c3 (4 revisions)

https://github.com/flutter/engine/compare/a1468f9b2495...98387f3ce3c3
2021-07-07<EMAIL_ADDRESS>Roll Skia from 2dc2859c70b0 to f60052072ca9 (2 revisions) (flutter/engine#27220)
2021-07-07<EMAIL_ADDRESS>(Reland) enable DisplayList mechanism over SkPicture by default (flutter/engine#27175)
2021-07-07<EMAIL_ADDRESS>Roll Dart SDK from 6f9810c8f7da to 8697e05f98df (2 revisions) (flutter/engine#27217)
2021-07-07<EMAIL_ADDRESS>Roll Skia from 55d339c34879 to 2dc2859c70b0 (2 revisions) (flutter/engine#27216)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.


Log request body in Azure Functions

Same as this issue
https://github.com/microsoft/ApplicationInsights-aspnetcore/issues/940
The recommended workaround was to use a custom middleware as a workaround as the ITelemetryInitializer was now only being called once at the end of the request when the requestbody stream was already disposed.
I am however using an Azure function, is there a way to accomplish the same but in an azure function where I cannot inject middleware?
My initial thought is to modify the Microsoft.ApplicationInsights.AspNetCore.DiagnosticListeners.HostingDiagnosticListener class to store the requestbody in a memory stream from the OnHttpRequestInStart event handler. I believe it's possible to call StoreRawObject on the TelemetryContext and later retrieve that stream in a telemetry initializer?

Any chance you can log the request body using ilogger and have applicationinsights capture the log?

Yeah that's what the workaround is currently, would be nice to log requests also when the azure function bindings fail, 401's, etc

We are tracking a work item for likely 2020 execution - https://feedback.azure.com/forums/357324-azure-monitor-application-insights/suggestions/13949925-add-support-for-viewing-raw-body-requests
Until then Ilogger workaround is the only option :(

Closing as we have a duplicate item for Application Insights already: https://github.com/microsoft/ApplicationInsights-dotnet/issues/1880
This is not planned for this year 2020.

https://docs.microsoft.com/en-us/aspnet/core/fundamentals/http-logging/?view=aspnetcore-6.0 .New middleware from asp.net core 6.0 makes this easy to do.


MS SQL

MS SQL

✓ Checklist:

[ ] This PR has been added to CHANGELOG.md (at the top of the list);
[ ] Tests for the changes have been added (for bug fixes / features);
[ ] Docs have been added / updated (for bug fixes / features).

Codecov Report

Merging #173 (cc2923d) into main (921af66) will decrease coverage by 10.46%.
The diff coverage is 0.57%.

@@             Coverage Diff             @@
##             main     #173       +/-   ##
===========================================
- Coverage   86.02%   75.55%   -10.47%
===========================================
  Files          54       67       +13
  Lines        3777     4296      +519
===========================================
- Hits         3249     3246        -3
- Misses        528     1050      +522

Impacted Files
Coverage Δ

cli/mssql_datanymizer/src/app.rs
0.00% <0.00%> (ø)

cli/mssql_datanymizer/src/options.rs
0.00% <0.00%> (ø)

cli/pg_datanymizer/src/app.rs
44.61% <ø> (ø)

dumpers/datanymizer_dumper/src/indicator.rs
100.00% <ø> (ø)

dumpers/datanymizer_dumper/src/lib.rs
76.59% <ø> (ø)

dumpers/mssql_datanymizer_dumper/src/column.rs
0.00% <0.00%> (ø)

dumpers/mssql_datanymizer_dumper/src/connector.rs
0.00% <0.00%> (ø)

dumpers/mssql_datanymizer_dumper/src/dumper.rs
0.00% <0.00%> (ø)

...s/mssql_datanymizer_dumper/src/schema_inspector.rs
0.00% <0.00%> (ø)

dumpers/mssql_datanymizer_dumper/src/scripter.rs
0.00% <0.00%> (ø)

... and 18 more

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 921af66...cc2923d. Read the comment docs.


Confirm destructive actions

jitsu should ask user for confirmation when performing destructive actions like apps destroy.

That looks like everything worth confirming.  Personally, I think asking for confirmation on the deletion of configuration keys or environment variables seems like too much.

right, I was thinking in adding another attribute to the function, something like  apps.destroy.destructive = true (just like apps.destroy.usage), that way we use the same message for all the destructive commands. The message could be "This operation can not be undone, Would you like to proceed?". What do you think?

+1 to this solution, @thepumpkin1979

Fixed by #141.


New viz: treemap

Hi,
This PR adds a treemap visualisation for hierarchical data (see screencap in commit).
Would appreciate if someone could run the test script to confirm my slice creation - I am on a windows machine at the moment and having some trouble.
Treemap is not as beautiful as I would like but shouldn't be difficult to improve going forward.
@mistercrunch I've been having a think about how we might be able to make it easier adding visualisations - I'll make an issue to discuss.

Coverage increased (+0.2%) to 72.656% when pulling 68b7ba1b04f554359b1f1048c61d6b736415ce3b on andrewhn:treemap into 5cadd6794cfb6c70f54e968b9e82b2c991f5ea5b on airbnb:master.

I loaded it up and it looks/works great. I like the support for multi-metrics as well. This is solid!
Tooltips showing the full path could be great but that may be a lot of event listeners. Could be optional.

:+1: definitely agree there should be a way of showing nesting levels and values, could even be similar to the sunburst chart. I'll have a go at beautifying it in the next couple of days if no one does before me


test that journal is set up correctly

Q
A

Bug fix?
no

New feature?
no (only tests added)

BC breaks?
no

Deprecations?
no

Related tickets
Test to prevent regression in #112

Documentation
-

License
MIT

What's in this PR?
A test about the debug toolbar because tests in #112 where green but the toolbar broken.
Why?
We should prevent regressions.

Awesome @dbu. Thank you!


Add more details

Please, can you provide more details about this DMV? For example, it is possible I have longs I/O related wait type like "ASYNC_IO_COMPLETED" and no request displayed in this DMV?

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

ID: 2f730b78-bfe2-b47f-cf2e-c9c9b2f0bd5d
Version Independent ID: 6a2d3b45-8cc8-bf3f-b12f-626d05bbad54
Content: sys.dm_io_pending_io_requests (Transact-SQL) - SQL Server
Content Source: docs/relational-databases/system-dynamic-management-views/sys-dm-io-pending-io-requests-transact-sql.md
Product: sql
Technology: system-objects
GitHub Login: @CarlRabeler
Microsoft Alias: carlrab

@rrg92 -- Rodrigo, thank you for your question.  Please try these resources:

DBA Stack Exchange
Stack Overflow

@CarlRabeler -- Carl, please look into this issue.

@rrg92 we are investigating further - in the meantime - please see this article: https://www.sqlskills.com/blogs/paul/cause-high-duration-async_io_completion-waits/

@rrg92 please see explanation here: https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.sqlskills.com%2Fblogs%2Fpaul%2Fcause-high-duration-async_io_completion-waits%2F&data=02|01|Carl.Rabeler%40microsoft.com|206039dd00264d423ff108d7f525f3ab|72f988bf86f141af91ab2d7cd011db47|1|0|637247415655440900&sdata=EoZzIFev1Um6yX5gLnB9Rs4VMAk2DPB73k%2FhDXudP1Y%3D&reserved=0
seeing ASYNC_IO_COMPLETED does not guarantee seeing pending IOs in sys.dm_io_pending_IO_requests


react-native-git-upgrade fails trying to upgrade from 0.47.1 to 0.55.4

[x] I have reviewed the documentation
[x] I have searched existing issues
[ ] I am using the latest React Native version

When trying to upgrade to newer React Native version (from 0.47.1 to 0.55.4) with react-native-git-upgrade command fails with following errors:

Environment

(Not sure if I'm doing something wrong but when I do react-native info...
)
Current RN version: 0.47.1
React version: 16.0.0-alpha.12
OS: macOS High Sierra 10.13.4
npm: 5.6.0
xCode: Version 9.3.1 (9E501)
Watchman: 4.9.0
Steps to Reproduce

Just try to $ react-native-git-upgrade on a project with version 0.47.1
Expected Behavior

Upgrade successfully to version 0.55.4
Actual Behavior

Fails with above errors.

As I said, when I run react-native info throws an error...

That's because you're on a significantly old version of React Native that did not yet have the info command. I'm not sure a GitHub issue is the best place to debug issues upgrading a particular project, but I'll let the authors of react-native-git-upgrade chime in if they're around.

Delete your node_modules folder and try upgrading again.


Migrate designs to rtk

Notes for Reviewers
This PR fixes #

[x] move patterns fetching to rtk
[x] wrapping meshery patterns component to redux-provider wrapper
[x] move provider capabilities to rtk query
[ ] cloning, download, deleting of designs
[ ] move import and publish api to rtk
[ ] remove schema fetching and use sistent schemas for import and publish of designs

[!NOTE]
Each tasks above are independent tasks so they are not dependent on each other, even if we want to merge we can because this will not break the ui.

Signed commits

[x] Yes, I signed my commits.

@dottharun it will be nice if checkout this branch and test , thanks.

The left task of schema to use sistent schema can be done in iterative pr because that will not include rtk migration just use schema and fix around that.

All feedbacks incorporated @dottharun , thanks


Backup restore doesn't work in Docker.

I have a docker instance of pocketbase running in the cloud. I make a backup of the db on my local machine which saves the backup to an S3 bucket. I have the cloud instance connected to the same S3 bucket.  When I choose the back up file and try to restore it starts the process, reloads the page but doesn't actually change anything. All collections and user records are still empty.

Could you share your Dockerfile?

Generating backups inside a container works fine, but there seems to be an issue with the restore operation. I was able to reproduce it with the following minimal Dockerfile:
FROM alpine:3.16.3

ARG PB_VERSION

RUN apk add --no-cache \
    unzip

ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_arm64.zip /pocketbase/pb.zip

RUN unzip /pocketbase/pb.zip -d /pocketbase/

CMD ["/pocketbase/pocketbase", "serve", "--http=<IP_ADDRESS>:8090", "--debug"]

On restore the following log is printed:
failed to move the current pb_data to a temp location: rename /pocketbase/pb_data /pocketbase/pb_restore_Erjo/.pb_temp_to_delete/old_pb_data: device or resource busy

I guess it is because pb_data is a volume entry and probably can't be moved around so easily, but I'll try to investigate it further a little bit later.

I've submitted a fix in master that manually moves each pb_data entry to avoid directly performing mv on the mounted volume dir.
The fix will be available with the next minor v0.16.1 release sometime later next week.


Restore delayed merge check to getTypeFromJSDocValueReference

This is needed when a function merges with a prototype assignment. The resulting merged symbol is a constructor function marked with SymbolFlags.Class. However, the merge doesn't happen until getTypeOfFuncClassEnumModule is called, which, in the getTypeReferenceType code path, doesn't happen until getTypeFromJSDocValueReference. That means the check for SymbolFlags.Class is missed.
Previously, getTypeFromJSDocValueReference had a weird check symbol !== getTypeOfSymbol(symbol).symbol, which, if true, ran getTypeReferenceType again on getTypeOfSymbol(symbol).symbol. For JS "aliases", this had the effect of dereferencing the alias, and for
function-prototype merges, this had the effect of ... just trying again sfter the merge had happened.
This is a confusing way to run things. getTypeReferenceType should instead detect a function-prototype merge, cause it to happen, and then run the rest of its code instead of relying on try-again logic at
the very end. However, for the RC, I want to fix this code by restoring the old check, with an additional check to make sure that #33106 doesn't break again:
const valueType = getTypeOfSymbol(symbol)
symbol !== valueType.symbol && getMergedSymbol(symbol) === valueType.symbol

I'll work on the real fix afterwards and put it into 3.8.
Fixes #34685

Not yet!

https://github.com/microsoft/TypeScript/issues/34707

@typescript-bot cherry-pick this to release-3.7


Split TbdexHttpClient.sendMessage() into separate methods createExchange(), submitOrder(), and submitClose()

sendMessage is misleading for two reasons.

The client should not be able to send just any message to a PFI. They should only be able to send RFQs, Orders, and Closes. Other message kinds are created and sent by the PFI.
sendMessage sends to several different endpoints with different options. We are using clever typescript to enforce that the correct options are available for each message type, but these clever tricks result in less obvious usage for consumers of http-client. This is part of my crusage against generics.

Current sendMessage method signature:
export type SendMessageOptions<T extends Message> = {
  message: T
  replyTo?: T extends Rfq ? string : never
}

static async sendMessage<T extends Message>(opts: SendMessageOptions<T>): Promise<void>

Proposed method signatures:
static async createExchange(rfq: Rfq, opts?: { replyTo?: string }): Promise<void>

static async submitOrder(order: Order): Promise<void>

static async submitClose(close: Close): Promise<void>

The proposed methods are less DRY because DRY APIs are not very tasty.

@angiejones This would constitute a breaking change in the http-client implementation. It would make it harder to use the client incorrectly.

This should be opened against the protocol, yes? Since it would need to be implemented in all SDKs. Would we have time to do this before v1 (end of the month)?

@angiejones Good call, I opened an issue in the tbdex repo to track across implementations https://github.com/TBD54566975/tbdex/issues/254. This issue doesn't affect the TBDex spec, but since it affects multiple of our implementations, makes sense to track it that way.
Regarding timeline, yes this will be done by v1. The javascript and kotlin implementations are ready for review. I will keep an eye on the PRs to close them out as soon as possible.

@angiejones KT and JS are both merged


Parameterless contructors for some CandleStickPatterns

Parameterless contructors added to AbandonedBaby, DarkCloudCover, EveningDojiStar, EveningStar, MatHold, MorningDojiStar and MorningStar.

I didn't commit the changes first :-1:


Add interface for other components to build an instance of an LLM

Currently, we have a few places that instantiate an LLM class (vectorsearch and agent).
The current implementation ends up looking at
a constant to find a mapping from a name to a class name, and then uses const_get on Langchain::LLM::Base to get instantiate it. They do use a method from Base to make sure it's valid first. But even with that, the component using an LLM ends up pretty coupled to the LLM data structure for tracking what it supports.
Since we are using a name, and building an instance, it made me think factory pattern. And thinking factory pattern, reminded me of factory_bot. That inspired this interface:
Langchain::LLM.build(:openai, api_key: "123")

I almost left it there, but something that has been bugging me is how to allow third party LLMs that aren't part of the repo. The current way does requires it to be in that hash of names to class names. I got to thinking, maybe we can support passing in an LLM object directly? In that case, we don't need to do anything to look it up.
This actually lines up with how langchain.py is simplemented:
llm = OpenAI(temperature=0.9)
prompt = PromptTemplate(
    input_variables=["product"],
    template="What is a good name for a company that makes {product}?",
)
chain = LLMChain(llm=llm, prompt=prompt)

I ended up adding these to the LLM module directly, and moved some logic from LLM::Base, which left that class solely responsible for a base class, instead of also being responsible for validating and knowing what LLMs are supported.

@zewelor had literally brought this up today. @zewelor did you already build something out?
@technicalpickles Btw, a lot of us are in the Ruby AI Builders Discord.

@technicalpickles I do like being able to pass the object around instead of re-instantiating a new LLM object every single time.
With the factory pattern... if we implement it here, do you feel like we ought to extend it to everything else in the project?

Hi
Yes same idea I've wrote yesterday on discord. I think its step in right direction. Here is my finished implementation: https://github.com/andreibondarev/langchainrb/pull/109
I've changed it, after looking here to extract build logic to separate module, just like done here. I guess main difference is whether to still allow to pass llm, and llm_key down to the classes, and then build_or_resuse like here. From my point of view if class has less arguments its better because its simpler. Its also somehow undefined behavior now, when someone passes llm: as build object and also llm_key: . What should happen then ?
Class doesn't need, to know, what to do with different kind of arguments. Logic is extracted but still in constructor, each class needs to know to call build_or_reuse etc. We still provide helper class to quick build object, like before, but interfaces in rest of the code are simpler when sticking with llm_client. Thats my reasoning, happy to discuss of course.

With the factory pattern... if we implement it here, do you feel like we ought to extend it to everything else in the project?

@andreibondarev Yeah, that would make sense to me. And in general, support passing around objects, rather than specifying names as symbols. LLM is just where I first saw it in practice.

Yes same idea I've wrote yesterday on discord.

@zewelor Can I ask which Discord? I don't see any mentioned in the repo or docs or whatever.

I've changed my code, after looking here, to extract build logic to separate module, just like done here. Cleaner than my initial approach !

Nice. Can you make sure to credit this PR if that's the case?

I guess main difference is whether to still allow to pass llm, and llm_key down to the classes, and then build_or_resuse like here. From my point of view if class has less arguments its better because its simpler. Its also somehow undefined behavior now, when someone passes llm: as build object and also llm_key: . What should happen then ?

Good points. I think in practice, people would probably pass around the same key. I think passing in an llm_key when there's an LLM object would be an error. That logic can live in build_or_reuse.

Class doesn't need, to know, what to do with different kind of arguments. Logic is extracted but still in constructor, each class needs to know to call build_or_reuse etc. We still provide helper class to quick build object, like before, but interfaces in rest of the code are simpler when sticking with llm_client. Thats my reasoning, happy to discuss of course.

Between classes needing to know to always call build_or_reuse, and that the constructors take extra arguments for LLM keys, is a sign that we should consolidate on one key, the LLM object. To draw comparison to langchain.py again, that is how it is implemented.
I would recommend using llm as the key, rather than  llm_client though. I think the client doesn't add much, because for most practical purposes, a developer can think of the client as the LLM, at this level of abstraction.

@technicalpickles Ruby AI Builders

I've changed my code, after looking here, to extract build logic to separate module, just like done here. Cleaner than my initial approach !

Nice. Can you make sure to credit this PR if that's the case?

After request from reviewer and @andreibondarev I've removed build logic completely in my PR now. Sorry for not linking it here right away.

Closing in favor of other work that landed. I'll review and see if there's anything else worth pulling out here still.


added proxy support

proxy support + proxies file

fixing

fixeddd

change from colored import stylize to  from colored import fore, back, style i forgot

how do i download

how to get proxies


Pull in server loid into the Account model

The api/me call now returns loid and loid_created fields. This patch passes those along to the Account model.

:eyeglasses: @schwers

Not eyeglassed but this seems good to me. just in case you need it, :fish:


XP pulling causes heavy lag on servers

https://github.com/MelanX/UtilitiX/blob/d32a0c2a1089b948c0615c70476e7af5f54034b3/src/main/java/de/melanx/utilitix/content/BetterMending.java#L64
This line of code drains about 20% of the server performance using ATM7 (see this log for details). The reason seems to be that every existing entity is added to the map, regardless of whether it has mending or not. This list tends to become huge on larger servers, and walking through it with forEach every tick drains a lot of CPU time for no reason.
I assume that entities are in addition not removed properly from that map, as even a list of 2000 entities shouldn't cause a 20% CPU usage.

Spark profiler dump where I was seeing the same thing: https://spark.lucko.me/8QxAIEymIG


Notification Center have unpredictable behaviour

I am using v5.4.3. I am using the exposed API with to push notifications.
The notification is about 150 characters and the pop-up appear with success. Then 3 possibilities may occur:

let the timer run out - notification center may not store the notification
click ok - notification center may not store the notification
stop the timer of pop-up - notification center will always show the notification

Config:

`notification_center:
enabled: true
index: "notification-%{+YYYY.MM.DD}"
template:
name: "notification_center_template"
overwrite: false
api:
# If false then disable all of REST APIs.
enabled: true
# The maximum size of the notification that user can pull from the server in a single request.
pull.maxSize: 200
`

Thanks for your issue! 😄
Notification center is created to check history of notification. Not replace of kibana notification toasts.
When a notification toast occurs, the notification center stores it and remains until it is explicitly cleared.
What parts do you think are unpredictable? Could you tell me more detail?


Vulnerability: SPF Record

Please look into the following reported vulnerability from an Anonymous person.  We do not know this person, however it seems to have merit.  Investigate and fix.
On Sun, Sep 5, 2021 at 2:40 PM Hammad Chauhan<EMAIL_ADDRESS>wrote:
Hi,
I'm an independent cyber security researcher and I have found multiple issues in your website.
Vulnerability : Missing SPF
I am just looking at your SPF records then found following. SPF Records missing safe check which can allow me to send mail and phish easily any victim.
PoC:

The TXT records found for your domain are:
v=spf1 include:_spf.google.com ~all
@
Checking to see if there is a valid SPF record.
Found v=spf1 record for asrg.io:
v=spf1 include:_spf.google.com ~all
Fix
The TXT records found for your domain are:
v=spf1 include:_spf.google.com -all
@
Checking to see if there is a valid SPF record.
Found v=spf1 record for asrg.io:
v=spf1 include:_spf.google.com -all
Let me know if any further info is required.
Regards,
Hammad

Change "v=spf1 include:_spf.google.com ~all" to "v=spf1 include:_spf.google.com -all"
~ instructs the email server to soft fail, - instructs the email server to fail. Using - may cause more legitimate mail to be dropped, but will prevent email spoofing.


how can change the ip of the mockWebServer?

i'm testing an app that use external SDK which have okhttpclient.
i set mockWebServer and than set proxy to httpClient of the SDK using okHttpClient.setProxy(mockWebServer.toProxyAddress())
and i set a dispatcher to simulate the server.
the ip of the mockWebServer is set to localhost (127.0.01), and this is working fine when testing on real device, but when i use emulator (genymotion),  i need to mockWebServer to have a specific ip adress.
i tried, but couldn't find a way to change the IP address, can someone please give me code example?
thanks

Call start(InetAddress inetAddress, int port) with the local IP address you'd like to listen on.

Someone knows wich IP shoud be set on genymotion to run with mockWebServer?


replace vuetify with tailwind css

vuetify does some things that don't play nice with other libraries, and because it's still in beta for vue 3, it's blocking a lot of the upgrades we want to make.
After speaking with @RageZBla I'd like to propose migrating this site to tailwind, part by part. Let's add the basic framework in this ticket and then we can divvy up the work component by component.
There will be some changes switching from a Material to a more open ended framework. Perhaps we can build some basic "card" components and do a "material light" style

This is too messy. Going to just leave as is for now


Add option to create PR against base branch other than master

At this moment, the action only allows creating a PR against the master branch, which is problematic for repositories that don't use master as the base branch. This creates an error and fails to create a PR (example).
This PR extends the action to allow a base_branch input which can be used to define the repository's base branch. master is the fallback so that it is backwards-compatible.

Thank for the PR! Indeed, I have only used it on old repositories where the default branch is master.
I'll release a v2.1.0 shortly.

And there you have it. Happy coding.


Allow adding additional telemetry info

My use case is this in ARM:
ext.reporter = createTelemetryReporter(
    context,
    {
        autoDetectJsonTemplates: String(vscode.workspace.getConfiguration('armTools').get<boolean>(configKeys.autoDetectJsonTemplates))
    });

The given config key is useful to know, but it affects whether we activate functionality on opening JSON files, so if it's false, no telemetry would normally be sent, and we don't want to send an event on every JSON file opened.

Yep, that makes more sense


HF Hub download

Offer an additional method hf_hub_download to bypass the call of hf_hub_url followed by cached_download

I feel like hf_hub_download is really the better name here

I feel like it works, but was wondering if maybe the more explicit cached_download_from_hf_hub was more explicit

It is indeed more explicit but I feel that it's a mouthful to say the same thing.
We don't mention cache everywhere in downloading methods (snapshot_download, from_pretrained etc) and yet I think everyone knows it's cached.

sounds good :)


Using subclasses in a static attribute definition

Minimal example:
shared abstract class A {
    shared static A someA => b; // error
    shared new() { }
}
shared object b extends A() { }

Error: “Anonymous class b may not be used in initializer of superclass A: b is an anonymous class that inherits A”.
However, we can write following:
shared abstract class A {
    shared static A someA => aB;
    shared new() { }
}
shared object b extends A() { }
shared A aB => b;

which semantically is I think the same, and compiles.
One can even swap some =>s here for =s but I’m not sure it should be allowed to change them all or, equivalently, to change the sole => to = in the first code.

IMO, this should be allowed. Statics and toplevels should act the same, and ceylon.language.InitializationError should be thrown at runtime as necessary.
It's interesting to note that the second example, but with =, exposes a java.lang.NullPointerException and an initialization error java.lang.ExceptionInInitializerError:
shared class A {
    shared static A someA = aB;
    print(someA.val);
    shared String val => "theValue";
    shared new() { }
}
shared object b extends A() { }
shared A aB = b;

but it seems this would be resolved by treating statics as top levels.

Related: https://github.com/ceylon/ceylon/issues/6720

This error is perfectly correct according to the rules of the language. And I guess I don't see any particular reason why we should make the rules more complicated in order to allow it. So I'm inclined to leave it alone.

Statics and toplevels should act the same

Well, no, that's not how this has been designed. They're not treated the same at all.

And I guess I don't see any particular reason why we should make the rules more complicated in order to allow it.

It's normal to expect a static function (e.g. parse()) to be able to return an instance of its containing class, singleton or not. Having the restriction is more complicated than not having it.
This restriction doesn't solve cyclic initialization (a. there's no expectation that the static member will actually be used during initialization, and b. initialization problems exist despite this rule). It seems to be a carry over from the rules for non-static initialization code.

Well, no, that's not how this has been designed. They're not treated the same at all.

Are you saying we don't need runtime cyclic initialization checks?

Something very similar just came up in some code I was writing.
A crude workaround:
Face[6] faceValues = [Face.left, Face.right, Face.top, Face.bottom, Face.front, Face.back];
shared class Face of left | right | top | bottom | front | back {
    shared static Face[6] values = faceValues;
    shared actual String string;
    abstract new create(String name) {
        string = name;
    }
    shared new left extends create("left") {}
    shared new right extends create("right") {}
    shared new top extends create("top") {}
    shared new bottom extends create("bottom") {}
    shared new front extends create("front") {}
    shared new back extends create("back") {}
}

although, this crashes on the Java backend...


Some special characters missing, are these difficult to add?

Hey, I have noticed that there are some characters missing such as \bigtriangleup and various others (can see them here http://www.combinatorics.net/weblib/A.6/a6.html). Would it be difficult to add these commands? What would be the basic steps required to do this? thanks!

These are easy to add in your own code as follows:
[MTMathAtomFactory addLatexSymbol:@"<symbolname>"
                            value:[MTMathAtom atomWithType:kMTMathAtomRelation
                                                     value:@"<unicodevalue>"]];

If there are standard symbols that should be included for everyone let me know.


Using System.Net.Sockets on Linux

I develop an application which uses a .Net Framework v4.6.1-compiled library to connect to a payment terminal over udp sockets. If I debug or publish it on Windows everything works fine, when publishing to Linux and running it as root I get the following error:

System.Net.Sockets.SocketException (13): Permission denied
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.SendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remoteEP)
at System.Net.Sockets.UdpClient.Send(Byte[] dgram, Int32 bytes, IPEndPoint endPoint)

I tried to change firewall settings, checked the Linux kernel security settings, changed the file permissons, but everthing without success.
Is there something special to keep in mind for running the application on Linux?
Thanks

run the app under strace -f -s 20 -e trace=%network dotnet foo.dll
That will show you what is happening.
Note that you need root privilege to use ports bellow 1024.
Check if you have SELinux enabled in enforcing mode.
If so, policy there may need to be adjusted.

Using strace i found the following error:

[pid  3998] bind(254, {sa_family=AF_INET, sin_port=htons(33335), sin_addr=inet_addr("<IP_ADDRESS>")}, 16) = -1 EADDRINUSE (Address already in use)
[pid  3998] socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_UDP) = 257
[pid  3998] sendmsg(257, {msg_name={sa_family=AF_INET, sin_port=htons(33334), sin_addr=inet_addr("<IP_ADDRESS>")}, msg_namelen=16, msg_iov=[{iov_base="SIXml\r\nTerminalReque"..., iov_len=47}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_WAITALL|MSG_BATCH|MSG_ZEROCOPY|MSG_CMSG_CLOEXEC|0x2600000}, 0) = -1 EACCES (Permission denied)

That is good clue.
Are you setting SocketOptionName.Broadcast on the socket?
(https://docs.microsoft.com/en-us/dotnet/api/system.net.sockets.socketoptionname?view=netcore-2.1)
Sending broadcast is restricted operation on Linux.
https://stackoverflow.com/questions/16217958/why-do-we-need-socketoptions-so-broadcast-to-enable-broadcast
You should be able to see same problem with running echo foo | nc -v  -u <IP_ADDRESS>

The socket is generated by the library, which means that I cannot set SocketOptionName to Broadcast
Is there a way to start the application with a flag which allows broadcasts?

My understanding was that you need to turn OFF the broadcast.
We do not have overrides like that, it would create giant mess. The library needs to be updated and ported to Linux.

I'm not aware of any global flag.  But that does not need to be done at creation.
You can do it any time after - just before the send.

@wfurt so there isnt any way without a library update?

What API do you have available? You can try to find the socket object via reflection and make the call as needed.

Answered - there is no magic solution, just potential hacks or update of the library.
Closing.


Support for identity.name

Hi and thanks for making this
I'm using it and works fine for me
Wanted to ask if I'm missing something or this feature isn't supported:
When you create a token, along with the identity and other stuff, you can also give that user a name (in the participant info)
https://docs.livekit.io/server/room-management/#participantinfo
That name is used in the front-end
displayName = participant.name || participant.identity;
But I don't see anywhere in this package the name
For example, this php package seems to have it
https://github.com/agence104/livekit-server-sdk-php/blob/f6965a4d593356ffa762648c4acbb2cbfe048251/src/AccessToken.php#L89
I presume it's a new feature of livekit, perhaps

Looks like the participant name was added in v0.15.2: https://github.com/livekit/livekit/releases/tag/v0.15.2
I'll update to the latest livekit version soon!

thanks for your quick reply
that would be awesome, thank you :)

@crisrat Just released v0.4.0. Let me know if it works for you.

Already in use
Works as expected
Thank you so much
On Thu, 1 Dec 2022, 21:38 Alex Mohr, @.***> wrote:

@crisrat https://github.com/crisrat Just released v0.4.0. Let me know
if it works for you.
—
Reply to this email directly, view it on GitHub
https://github.com/tradablebits/livekit-server-sdk-python/issues/1#issuecomment-1334480518,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABGKRGPJFGKFE5N3TZ5ZPQTWLELELANCNFSM6AAAAAASRBQUYU
.
You are receiving this because you were mentioned.Message ID:
@.***>


Installation guide references 0.7.0 tag on the images but that tag does not exist

I was following the install guide and the yaml referenced for the kubectl apply references an image tag that does not exist.
/kind bug

The install documentation is versioned, so I guess you were looking at the master branch version of the documentation here, hence the issue.
You can see the 'latest' documentation (for v0.6.x) here: https://cert-manager.readthedocs.io/en/latest/getting-started/install.html
Hope that helps, and sorry for the confusion!
/kind documentation
/remove-kind bug
/area deploy


[Remote Store] Throw IOException when remote is not in sync

Description
This is just a refactor. Earlier the callers of IndexShard.waitForRemoteStoreSync needed to verify if it is really in sync and throw exception if not .
With this change, waitForRemoteStoreSync will throw an IOException , making it easy for the consumers to fail directly .
Related Issues
Resolves

Check List

[x] New functionality includes testing.

[x] All tests pass

[ ] ~New functionality has been documented.~

[x] New functionality has javadoc added

[x] Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
[x] Commits are signed per the DCO using --signoff
[ ] ~Commit changes are listed out in CHANGELOG.md file (See: Changelog)~
[ ] ~Public documentation issue/PR created~

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Changed LGTM.


added metric requested in #133

Intended for #131 and its successor branch (TBD).
TODO: Don't forget to update #139 after merging.

Based on our discussion today I've defined the metric as a table now, which is how it would be included in mzQC files.
However, the columns of the table are the newly-defined USI column type and a count column type. So with these definitions we don't have have a term to associate with individual spectra, e.g. in mzML files.

I think this PR is ready now. @bittremieux  @cbielow what do you think?

After more discussion and some superseding changes to the CV organisation, this is now outdated (see https://github.com/HUPO-PSI/psi-ms-CV/issues/106)

@mwalzer I think we also need to update this new term in the mzml-mzqc-example.mzML example, right?

:frowning_face: Yes, I noticed this week that we actually have to update the examples quite a bit (at least in terms of [Terms]). That's why I opened two new request issues with terms we have been using in the examples and another one or two to follow soon.


Subscription deployment failing in China

Bicep version
Bicep CLI version 0.4.1124 (66c84c8ee5)
Describe the bug
Using a template for subscription deployment 'Microsoft.ApiManagement/service/subscriptions@2022-08-01' based on https://learn.microsoft.com/en-us/azure/templates/microsoft.apimanagement/2022-08-01/service/subscriptions?pivots=deployment-language-bicep#resource-format
Without any changes, the template started throwing errors when used for Azure China (in Global, it is still working as expected) for the past few days.
The error is:
"details": [
            {
                "code": "LinkedInvalidPropertyId",
                "message": "Property id '/products/productname' at path 'properties.scope' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'."
            }
        ]

To Reproduce
param p_apim_service_name string
resource r_apim_subscription 'Microsoft.ApiManagement/service/subscriptions@2022-08-01' = {
  name: ${p_apim_service_name}/fn-subscriptionname'
  properties: {
    ownerId: resourceId('Microsoft.ApiManagement/service/users', p_apim_service_name, '1')
    scope: '/products/productid'
    displayName: 'productid: subscriptionname'
    state: 'active'
  }
}]

Additional context
Workaround:
Based on the error we have changed the "scope" property to an actual resource ID (of the existing product) and this way the deployment succeeds.
param p_apim_service_name string

resource product 'Microsoft.ApiManagement/service/products@2022-08-01' existing = {
  name: '${p_apim_service_name}/productid'
}

resource r_apim_subscription 'Microsoft.ApiManagement/service/subscriptions@2022-08-01' = {
  name: ${p_apim_service_name}/fn-subscriptionname'
  properties: {
    ownerId: resourceId('Microsoft.ApiManagement/service/users', p_apim_service_name, '1')
    scope: product.id
    displayName: 'productid: subscriptionname'
    state: 'active'
  }
}]

@majastrz can you look into this?

This looks like it was an authoring error. The "workaround" described above looks to be what the APIM resource requires. I think we can close this.
FYI @vandanchev - that bicep version is quite old. That is unrelated to this issue, but you should upgrade to a more recent version.

@alex-frankel
Let`s not rush on closing it as this template has been working and still works in Azure Global. Also, it is based on the documentation
https://learn.microsoft.com/en-us/azure/templates/microsoft.apimanagement/2022-08-01/service/subscriptions?pivots=deployment-language-bicep#resource-format
This suggest for the "scope"

scope | Scope like /products/{productId} or /apis or /apis/{apiId}. | string (required)

And this is what we have been using. However, in China the very same thing was also working until Friday 09.02.2024. Now we are getting the error without changing anything on the templates. This means that something else was changed.
P.S. Indeed I pasted the old version but we have the same thing with Bicep CLI version 0.4.1124 (66c84c8ee5)

I see - if there were no changes, then this is an issue with the APIM RP. We would recommend opening a support case to have this properly routed.


switch on unit test for iceoryx binding

Currently unit tests are not executed in case of using iceoryx shared memory layer. Lets switch them on and check :-)

Can be reopened if iceoryx released version 1.0


issue with livewire and turbolink

for some reason which i could not figure out, there is a bug using this package alongside turbolinks and livewire. if you have an action that needs ReCaptcha/honey verification it works the first time but if you intend to do it again you HAVE to refresh the page to get the new token or else the verification fails. not refreshing the page is the whole point of SPA and turbolinks. not sure what could be the issue since im not a javascript guru but i guess it might be because there is no data-turbolinks-track="true" for the ReCaptcha script.
any idea what is causing this issue and how to fix it?

You may need to tear down something in the ReCaptcha script?
document.addEventListener('turbolinks:before-cache', () => {
// do whatever needs to be done to remove the recaptcha from the page
}
});


conflict with jekyll-relative-links

jekyll-relative-links
I used this plugin to easily generate relative links between .md files.
but it cannot co-work with jekyll-postfiles, I must disable it to let jekyll-postfiles works.
any suggestions?

I changed _config.yml setting
permalink: pretty
into
permalink: /:year-:month-:day-:title.html
Both plugins can work together now.

@phoenixwu thanks for opening the issue. I see you reopened it. Does it mean your workaround finaly isn't enough?

Oops, I accidentally reopened this issue. Sorry.
Changing permalink to permalink: /:year-:month-:day-:title.html is still working.


Conversion 'py2rpy' not defined for objects of type '<class 'numpy.ndarray'

After installing latest master of scIB I get this error:
Traceback (most recent call last):
  File "/storage/groups/ml01/code/karin.hrovatin//qtr_intercode_reproducibility-/scripts/integration_benchmarks/run_metrics.py", line 113, in <module>
    kBET_per_label=sm.kBET(adata=latent_adata, batch_key=args.batch,
  File "/storage/groups/ml01/code/karin.hrovatin/scib/scIB/metrics/kbet.py", line 161, in kBET
    score = kBET_single(
  File "/storage/groups/ml01/code/karin.hrovatin/scib/scIB/metrics/kbet.py", line 38, in kBET_single
    ro.globalenv['data_mtrx'] = matrix
  File "/home/icb/karin.hrovatin/miniconda3/envs/scib2/lib/python3.8/site-packages/rpy2/robjects/environments.py", line 34, in __setitem__
    robj = conversion.converter.py2rpy(value)
  File "/home/icb/karin.hrovatin/miniconda3/envs/scib2/lib/python3.8/functools.py", line 874, in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
  File "/home/icb/karin.hrovatin/miniconda3/envs/scib2/lib/python3.8/site-packages/rpy2/robjects/conversion.py", line 188, in _py2rpy
    raise NotImplementedError(
NotImplementedError: Conversion 'py2rpy' not defined for objects of type '<class 'numpy.ndarray'>'

I have tried importing numpy arrays into r as done in the function in the same env on the same server node, but there it had worked.
I have also tried adding activate numpy before every activate anndata call in scIB code (as suggested here https://github.com/theislab/anndata2ri/issues/50 ), but it did not work either.

Minimal example to reproduce:
import numpy as np
import scanpy as sc
import scIB

import anndata2ri
anndata2ri.activate()

import rpy2.robjects as ro
ro.globalenv['x'] = np.ones((10, 10))

ad = sc.datasets.pbmc68k_reduced()
kbet_bbknn_df = scIB.metrics.kBET(ad, 'louvain', 'phase')

@LuckyMD Can you close this one too, it should be fixed in the master branch.

You guys might consider added the snippet above as a unit test for kBET though, apparently the existing test didn't catch this one.

Thanks @gokceneraslan! @mumichae is now tracking this in #270

Thanks!


Can't install on OSX

I've seen this issue posted here, followed a number of instructions and am not making progress.
Running: sudo npm install -g homebridge
Gets me:
<EMAIL_ADDRESS>install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519
node-gyp rebuild

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-gyp: command not found

<EMAIL_ADDRESS>install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum
node-gyp configure build

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-gyp: command not found

<EMAIL_ADDRESS>install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns
node-gyp rebuild

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-gyp: command not found

<EMAIL_ADDRESS>install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/ed25519
node-gyp rebuild

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-gyp: command not found
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homebridge"
npm ERR! node v4.4.4
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR<EMAIL_ADDRESS>install: `node-gyp rebuild`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the curve25519 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls curve25519
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/stubelshe/npm-debug.log

As I said, I've followed a number of instruction on these boards and others and had no progress, any ideas?
Thanks

Have you installed XCode and Homebrew and Node.js first?
Here's some instructions to get you going.

Install XCode
Install HomeBrew
From terminal type: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Node.js
From terminal type: brew install node
To verify the versions type: node -v npm -v
Install HomeBridge
Type: sudo npm install -g homebridge

Updates:
Xcode v.7.3.1 i already installed
Homebrew was already installed, to ensure I ran your command;
It appears Homebrew is already installed. If your intent is to reinstall you should do the following before running this installer again:     ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)" The current contents of /usr/local are bin Cellar CODEOFCONDUCT.md CONTRIBUTING.md etc git include lib Library LICENSE.txt mysql-5.5.21-osx10.6-x86_64 mysql-5.6.10-osx10.7-x86 opt README.md share SUPPORTERS.md .git .gitignore
Node was already installed, to endure I ran node -v;
v4.4.4
Npm was also installed; I ran npm -v;
2.5.1
I then ran sudo npm install -g homebridge and got this;
`><EMAIL_ADDRESS>install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519

node-gyp rebuild

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-gyp: command not found

<EMAIL_ADDRESS>install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum
node-gyp configure build

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-gyp: command not found

<EMAIL_ADDRESS>install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/ed25519
node-gyp rebuild

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-gyp: command not found

<EMAIL_ADDRESS>install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns
node-gyp rebuild

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-gyp: command not found
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homebridge"
npm ERR! node v4.4.4
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>install: node-gyp rebuild
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the curve25519 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls curve25519
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /Users/stubelshe/npm-debug.log`

Sorry for the late response. It looks to me like there's permissions issues. Are you logging in as an Administrator account on your Mac Mini? When you run the sudo command, are you getting prompted for your password?

Don't use homebrew to install nodejs.  Go to HTTP://nodejs.org and download the pkg, and install it.
Then use the sudo npm -g homebridge command.
It will throw some security warnings that root does not have access to .node-gyp folders and then a follow-up that it is attempting reinstall using temp dev dir.  Then it should work.
Make sure you have write access to /use/local/* folders.  Because of rootless mode in OS X El Capitan, the root user no longer gets full access to everything.
Depending on your version of brew, it may be trying to do work in /usr instead of /usr/local

Yes and yes.
Sent from my iPhone

On May 27, 2016, at 2:36 PM, jer78<EMAIL_ADDRESS>wrote:
Sorry for the late response. It looks to me like there's permissions issues. Are you logging in as an Administrator account on your Mac Mini? When you run the sudo command, are you getting prompted for your password?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

That's the process I successfully followed.
Sent from my iPhone

On May 27, 2016, at 3:13 PM, apwelsh<EMAIL_ADDRESS>wrote:
Don't use homebrew to install nodejs. Go to HTTP://nodejs.org and download the pkg, and install it.
Then use the sudo npm -g homebridge command.
It will throw some security warnings that root does not have access to .node-gyp folders and then a follow-up that it is attempting reinstall using temp dev dir. Then it should work.
Make sure you have write access to /use/local/* folders. Because of rootless mode in OS X El Capitan, the root user no longer gets full access to everything.
Depending on your version of brew, it may be trying to do work in /usr instead of /usr/local
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@jer78 yes, I mad working as an admin and it does ask me for a password. It's actually a Mad Pro if it matters, haha.

Here's my latest status;
Went to nodejs.org and downloaded the latest
Ran node -v;
v6.2.0
Ran npm -v;
3.8.9
I then ran sudo npm install -g homebridge and got this;
/usr/local/bin/homebridge -> /usr/local/lib/node_modules/homebridge/bin/homebridge

<EMAIL_ADDRESS>install /usr/local/lib/node_modules/homebridge/node_modules/mdns
node-gyp rebuild

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-gyp: command not found
/usr/local/lib
└── (empty)

npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homebridge"
npm ERR! node v6.2.0
npm ERR! npm  v3.8.9
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR<EMAIL_ADDRESS>install: `node-gyp rebuild`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the mdns package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs mdns
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls mdns
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/stubelshe/npm-debug.log
npm ERR! code 1

I used an old iMac I have that has home-brew, but not node.js installed.  I used home-brew to install node.js.  sudo brew install nodejs
The result was it installed a very old version:
Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.
==> Downloading https://homebrew.bintray.com/bottles/node-0.12.7_1.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring node-0.12.7_1.el_capitan.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
🍺  /usr/local/Cellar/node/0.12.7_1: 2780 files, 30M

Then I used npm to install homebridge.  sudo npm -g install homebridge which installed just fine.  It did generate warning, because root is not longer god-mode user account due to rootless mode of OS X, but it recovers by using a temporary directory to build the package and deploy it.
Now that I know it works, I removed homebridge sudo npm -g uninstall homebridge and node.js sudo brew remove nodejs to undo my testing.
Next I installed node.js using the pkg from the website, because it's just so nice to have this on my systems.
So, knowing it's not homebrew, node.js, nor homebridge, what can be causing your problem?  Most likely answer is rootless.  But don't turn it off, instead, just make sure to setup your directory permissions correctly.
In your output your first error reports that /usr/local/lib is empty.  Rather than provide a bunch of testing, lets just run the commands to create the structure and assign ownerships correctly...
sudo mkdir -p /usr/local/bin /usr/local/lib /usr/local/share /usr/local/etc
sudo chown root:admin /usr/local
sudo chown root:admin /usr/local/bin /usr/local/lib /usr/local/share /usr/local/etc
sudo find /usr/local -type d -exec chmod 755

this should fix the important directories, and create any missing ones.  if you had home-brew installed before upgrading to El Capitan, then you had it running in a mode that required root.  The updated version, when installed on a clean install of El Capitan support rootless mode, and permissions the /usr/local folder appropriately.  Anyways, give this a try, and if you cannot get in, we should look at your directory permissions much closer.

Could someone remote into my mac so set this up? I would like to get this up and running but would feel more comfortable with one of you guys doing this !


How sure are we about the accuracy of the data?

I wish to know how confident are we when we are showing BPM, I understand we can't be 100% accurate but by how much?
Also could you share some logic of how we calculate BPM with video?
Thanks!

@kvedala @KarlMathuthu any idea about this? Is there any way to verify accuracy of the algorithm?
@apoorvpandey0 did you happen to find it?


Implemented Spanish Translation

Critical Changes
Changes
HEDA now provides a standard translation for Spanish.
Issues Closed
Fixes #492
New Metadata
Deleted Metadata

@lianeyee
Good morning! Could you review the release note, please?
Thank you so much!

@xinnanlisf Thanks! I revised slightly to be consistent with how we describe the availability of translations in NPSP. See what you think.

Hi @weizsforg,
(Oops wrong pr)
Thank you for jumping on this pull request.
Basically, you need to switch the language to Spanish under your user settings and make sure all the translations are properly implemented.
You should be able to find the translation file under the work item.
Feel free to let me know if any questions!

@davidjray
Hi David, could you do a quick check before we assign this to QA?
Thank you!

@davidjray
Great catch! I just removed all the English translation files.

@chrismcmahon this is ready for QA!

Added those English translation files back to support build script.


UHF-9617: Migrate to MySQL 8

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

Comparison is base (1ecaece) 63.36% compared to head (5d53c24) 63.36%.

:exclamation: Current head 5d53c24 differs from pull request most recent head 66d05bf. Consider uploading reports for the commit 66d05bf to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##               main      #69   +/-   ##
=========================================
  Coverage     63.36%   63.36%
  Complexity       82       82
=========================================
  Files            14       14
  Lines           232      232
=========================================
  Hits            147      147
  Misses           85       85

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


Revert "Adding option to install Tiller"

This reverts commit f329dd7969f1ad7635b9e297b838e447fff3faa8.
Removal needed until tiller images are added back.

lgtm

@SlickNik / @rbwsam - FYI, the UI buttton for tiller has been removed, it'll need to be added back again once the tiller licence stuff is resolved.

@kiall Roger -- thanks for the FYI.


[06192021] - Chapter04 Session05 - Open Source Program Office by Deborah Bryant

Jamboard: https://jamboard.google.com/d/1o0ldaPsWUbMMNPhIjKlTpko-n6tAK8TWM_SOddAH_G0/edit?usp=sharing

I love how engaging and fun the session is!

What are the pre-requistes for getting started with open source

What are some exciting beginner friendly projects out there, according to you?

Should we start with open source even when we are learning things?

do you have any sandbox project to contribute to?

How to learn on job while starting to contribute an open source project which is related operation system?

How to start contibuting in open source while learning things?

Is "free software" same as "open source".

do open source projects have a well versed security of data?

Can you share some experience  or references where we can get materials for universities for sharing and starting open source projects as curriculum?

How can i connect to fedora community to know any sandbox project?


Cannot easily set task step label

Let's say I want all my task steps to be displayed in the PDF output as "Step 1", "Step 2", etc.
Looking in the XSLT stylesheet plugins\org.dita.pdf2\xsl\fo\task-elements.xsl there is an XSLT template looking like this:
<xsl:template match="*[contains(@class, ' task/steps ')]/*[contains(@class, ' task/step ')]">

which uses a variable called 'Ordered List Number'. Ideally it would use a step-specific variable which could then be changed in the translation files.
I also do not see a way to do this for the HTML-based outputs.

@raducoravu are you referring to old code, as develop branch uses Step Number variable.

Sorry, did not look at the newest code. I'll close this...

For HTML, we don't generate the step number from string variables, it's just using <ol> and the numbering is handled by browser and can be modified with CSS.

hi,
Is there any way to make prereq and  postreq task label for single item
ex: for  with single paragraph should display "Next Step"
for  with single  should display "Next Step"
 for <postreq> with two paragraph should display "Next Steps"
for <postreq> with two <li> should display "Next Steps"

 for <prereq> with one paragraph should display "prerequisite"
 for <prereq> with two paragraph should display "prerequisites"

my Code sample
under Prereq template
<xsl:when test="count(ol/li) < 2 or count(p) < 2">
	 <xsl:apply-templates select="." mode="dita2xslfo:task-heading">
            <xsl:with-param name="use-label">
                <xsl:call-template name="insertVariable">
                    <xsl:with-param name="theVariableID" select="'Task Prereq'"/>
                </xsl:call-template>
            </xsl:with-param>
        </xsl:apply-templates>
	</xsl:when>
	<xsl:when test="count(ol/li) > 1 or count(p) > 1">

	 <xsl:apply-templates select="." mode="dita2xslfo:task-heading">
            <xsl:with-param name="use-label">
                <xsl:call-template name="insertVariable">
                    <xsl:with-param name="theVariableID" select="'Task Prereqs'"/>
                </xsl:call-template>
            </xsl:with-param>
        </xsl:apply-templates>
	</xsl:when>


Ancient ruins spawn in the middle of the ocean

If an instance has both Embers and a mod that lowers terrain height like Tectonic, the ancient ruins will spawn floating in the middle of the ocean. Not a huge problem, but it looks kind of ugly. It could be fixed if a config option was added for the max height of the ruins. That would be pretty RAD of you. ;)

you can use a datapack to change the max height that the ruins generate at, you just have to change this value.
Though I just had an idea that would allow the ruins to always spawn lower than the bottom of the ocean even if a mod changes it, so I guess that will be in the next update.

Thanks!

In version 1.2.0 the small ruins now spawn relative to the bottom of the ocean which should work even if another mod has a biome with a lower ocean floor.


@cloudflare/worker-types IncomingRequestCfProperties is missing geo data

Hello,
This issue pertains to @cloudflare/worker-types. I would open a pull request as I have the issue resolved in my local package, but I'm not sure how the type generation works in this repo.
The issue is that IncomingRequestCfProperties is not including the IncomingRequestCfPropertiesGeographicInformation.
IncomingRequestCfProperties are currently generated as:
declare type IncomingRequestCfProperties<HostMetadata = unknown> =
  IncomingRequestCfPropertiesBase &
    IncomingRequestCfPropertiesBotManagementEnterprise &
    IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<HostMetadata> &
    IncomingRequestCfPropertiesGeographicInformation &
    IncomingRequestCfPropertiesCloudflareAccessOrApiShield;

Which is fine, but the IncomingRequestCfPropertiesGeographicInformation is omitted from the export as it is a union type and not an interface.
Currently the following is generated for IncomingRequestCfPropertiesGeographicInformation:
/**
 * Geographic data about the request's origin.
 */
declare type IncomingRequestCfPropertiesGeographicInformation =
  | {}
  | {
      /** The country code `"T1"` is used for requests originating on TOR  */
      country: "T1";
    }
  | {
      /**
       * The [ISO 3166-1 Alpha 2](https://www.iso.org/iso-3166-country-codes.html) country code the request originated from.
       *
       * If your worker is [configured to accept TOR connections](https://support.cloudflare.com/hc/en-us/articles/203306930-Understanding-Cloudflare-Tor-support-and-Onion-Routing), this may also be `"T1"`, indicating a request that originated over TOR.
       *
       * If Cloudflare is unable to determine where the request originated this property is omitted.
       *
       * @example "GB"
       */
      country: Iso3166Alpha2Code;
      /**
       * If present, this property indicates that the request originated in the EU
       *
       * @example "1"
       */
      isEUCountry?: "1";
      /**
       * A two-letter code indicating the continent the request originated from.
       *
       * @example "AN"
       */
      continent: ContinentCode;
      /**
       * The city the request originated from
       *
       * @example "Austin"
       */
      city?: string;
      /**
       * Postal code of the incoming request
       *
       * @example "78701"
       */
      postalCode?: string;
      /**
       * Latitude of the incoming request
       *
       * @example "30.27130"
       */
      latitude?: string;
      /**
       * Longitude of the incoming request
       *
       * @example "-97.74260"
       */
      longitude?: string;
      /**
       * Timezone of the incoming request
       *
       * @example "America/Chicago"
       */
      timezone?: string;
      /**
       * If known, the ISO 3166-2 name for the first level region associated with
       * the IP address of the incoming request
       *
       * @example "Texas"
       */
      region?: string;
      /**
       * If known, the ISO 3166-2 code for the first-level region associated with
       * the IP address of the incoming request
       *
       * @example "TX"
       */
      regionCode?: string;
      /**
       * Metro code (DMA) of the incoming request
       *
       * @example "635"
       */
      metroCode?: string;
    };

This should be converted to an interface so the intersection IncomingRequestCfProperties type is valid. It should be changed to something like:
/**
 * Geographic data about the request's origin.
 */
declare interface IncomingRequestCfPropertiesGeographicInformation {
  /**
   * The [ISO 3166-1 Alpha 2](https://www.iso.org/iso-3166-country-codes.html) country code the request originated from.
   *
   * If your worker is [configured to accept TOR connections](https://support.cloudflare.com/hc/en-us/articles/203306930-Understanding-Cloudflare-Tor-support-and-Onion-Routing), this may also be `"T1"`, indicating a request that originated over TOR.
   *
   * If Cloudflare is unable to determine where the request originated this property is omitted.
   *
   * @example "GB"
   */
  country?: Iso3166Alpha2Code | 'T1';
  /**
   * If present, this property indicates that the request originated in the EU
   *
   * @example "1"
   */
  isEUCountry?: "1";
  /**
   * A two-letter code indicating the continent the request originated from.
   *
   * @example "AN"
   */
  continent?: ContinentCode;
  /**
   * The city the request originated from
   *
   * @example "Austin"
   */
  city?: string;
  /**
   * Postal code of the incoming request
   *
   * @example "78701"
   */
  postalCode?: string;
  /**
   * Latitude of the incoming request
   *
   * @example "30.27130"
   */
  latitude?: string;
  /**
   * Longitude of the incoming request
   *
   * @example "-97.74260"
   */
  longitude?: string;
  /**
   * Timezone of the incoming request
   *
   * @example "America/Chicago"
   */
  timezone?: string;
  /**
   * If known, the ISO 3166-2 name for the first level region associated with
   * the IP address of the incoming request
   *
   * @example "Texas"
   */
  region?: string;
  /**
   * If known, the ISO 3166-2 code for the first-level region associated with
   * the IP address of the incoming request
   *
   * @example "TX"
   */
  regionCode?: string;
  /**
   * Metro code (DMA) of the incoming request
   *
   * @example "635"
   */
  metroCode?: string;
};

Making all the properties optional handles the case where there is no data {} and making the country field a union of Iso3166Alpha2Code | 'T1' handles the TOR case.
Looking forward to seeing this patched.  In the mean time I just have to modify my local node_modules/@cloudflare/workers-types on every install.  Its pretty annoying.  I can't create my own fork since https://github.com/cloudflare/workers-types is no longer maintained.  If you have a better suggestion for a stop gap that doesn't involve // @ts-ignore I'm all ears.
Thanks!

In addition to this, I think it would be beneficial to differentiate between incoming requests and requests constructed within the worker code.  I have made the following changes in my local types:
declare class IncomingRequest<CfHostMetadata = unknown> extends Body {
  constructor(input: RequestInfo, init?: RequestInit);
  clone(): IncomingRequest<CfHostMetadata>;
  /** Returns request's HTTP method, which is "GET" by default. */
  readonly method: string;
  /** Returns the URL of request as a string. */
  readonly url: string;
  /** Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header. */
  readonly headers: Headers;
  /** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default. */
  readonly redirect: string;
  readonly fetcher: Fetcher | null;
  /** Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler. */
  readonly signal: AbortSignal;
  readonly cf?: IncomingRequestCfProperties<CfHostMetadata>;
}
declare class Request extends Body {
  constructor(input: RequestInfo, init?: RequestInit);
  clone(): Request;
  /** Returns request's HTTP method, which is "GET" by default. */
  readonly method: string;
  /** Returns the URL of request as a string. */
  readonly url: string;
  /** Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header. */
  readonly headers: Headers;
  /** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default. */
  readonly redirect: string;
  readonly fetcher: Fetcher | null;
  /** Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler. */
  readonly signal: AbortSignal;
  readonly cf?: RequestInitCfProperties;
}

The reasoning behind this is my worker uses pipelines to create sub requests. After the sub request is constructed and returned to the next function in the pipe, the cf object becomes the IncomingRequestCfProperties which is incorrect. It should be RequestInitCfProperties. Also, Requests constructed within the worker do not need the generic type for the custom hostname metadata.  I think separating Incoming Requests that enter the worker from the cloudflare network and requests that are constructed within the worker helps reduce complexity, increases readability and eliminates type ambiguity.  Let me know if you would like this broken out into another issue.
Here's a simple use case that illustrates the requirement:
function fetchHandler (request: IncomingRequest) {
  const region = (request.cf?.country ?? 'US').toLowerCase()
  const url = new URL(request.url)
  url.pathname = `/${region}${url.pathname}`

  const subRequest: Request = new Request(url.toString(), {
    cf: {
      cacheTtl: 3600
    }
  })

  return fetch(addCacheKey(subRequest))
}

function addCacheKey (request: Request): Request {
  if (request.cf) {
    request.cf.cacheKey = 'custom-key'
  }
  return request
}

I'm not sure what the default behavior is, but if the cf object is initialized as {} in the constructed requests, we can even get rid of the optional denotation on the Request type, eliminating the need for the conditional.

Hi :wave:,
What compatibility date are you using? At least in oldest and the latest stable one (2022-11-30) I see the type exported just as it is in the source, which is actually better in my opinion than an interface:

the union type ensures that if there is a country specified, and it is not T1, the rest of the geoinformation will also be there
it results in cleaner TS code if one check narrows down the union to the "regular" case, and I don't have to use optional chaining on both latitude and longitude, for example - assuming I haven't checked country first to guarantee their presence already.

As for your second proposal, RequestInitCfProperties turns into IncomingRequestCfProperties when you pass it on to a Service Binding - and you can also pass custom data in cf, which is what the generic type is trying to represent, so while in theory de-generifying and separating the two types of requests simplifies the types, it wouldn't fully match how the runtime works.

Hey @DaniFoldi!
Thanks for getting back to me.
First Issue
So for the first part, I've tried all the compatibility dates including experimental and oldest. Here is a screenshot of what I am seeing in vscode. Note that typescript thinks the type for request.cf is
IncomingRequestCfPropertiesBase &
IncomingRequestCfPropertiesBotManagementEnterprise &
IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<...> &
IncomingRequestCfPropertiesCloudflareAccessOrApiShield;

and not
IncomingRequestCfPropertiesBase &
IncomingRequestCfPropertiesGeographicInformation &
IncomingRequestCfPropertiesBotManagementEnterprise &
IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<HostMetadata> &
IncomingRequestCfPropertiesCloudflareAccessOrApiShield;

as it is defined in the source.  This took a long time to debug, but I found that my above solution fixes it.  I agree that the union type is technically better, but its not being picked up by typescript.  Are you saying you are seeing different behavior?  I also ran tsc to make sure its not just vscode and it comes up with the same compilation errors.  My typescript version is 4.9.4.

Here is a TS sandbox that boils down the problem.  It looks to me that you cant mix intersection and union types.
https://www.typescriptlang.org/play?#code/PTAEBEHsFMGdQHaQC6gO6QE4GsBQuBLBZaTAMwEMBjaUASQDFJJQBvUM5gLlFmUyIBzUAF98yAJ4AHWgCEKmUAF42I0AB82oAEYUAXjwDkARgBMAZkOiNW3Qd78hAGlABHAK4APHgncBbbVJRXEkZemJSWGgqZAJIBGV6JhYAMlB5THwydwQYuISSPlAACiJkHjoIzCi8+IBKNlxQUDKAOjtcMVwQUAB1LGxYcWk5fUT2Ox4+AQRBFw9vRH9AzDFQ2kqSaujY+NNExmZQNPk9LJzagrhkfdLiCqqa3YRTBtYmluJ2-U6gA
I also don't think it matters all that much because these are all on the Incoming Requests.  The type checker is not going to be able to determine the value of country at compile time as its not something the developer should ever be trying to set.  Its set by the runtime on received requests (network or service binding).
Second Issue
So when you pass a request to a service binding, it is no longer in the context of the initial worker (different source code/project/wrangler.toml).  It would then become an IncomingRequest on the service chained worker. A generic would work, but we would need to hoist CfType up to the request level.  Something like:
declare class Request<CfHostMetadata = unknown, CfType = IncomingRequestCfProperties<CfHostMetadata>> extends Body {
  constructor(input: RequestInfo, init?: RequestInit);
  clone(): Request<CfHostMetadata>;
  /** Returns request's HTTP method, which is "GET" by default. */
  readonly method: string;
  /** Returns the URL of request as a string. */
  readonly url: string;
  /** Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header. */
  readonly headers: Headers;
  /** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default. */
  readonly redirect: string;
  readonly fetcher: Fetcher | null;
  /** Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler. */
  readonly signal: AbortSignal;
  readonly cf?: CfType;
}

This would allow us to specify that a Request was created by the developer in userland and not by the runtime (incoming from network or other service bound workers).
const request: Request<unknown, RequestInitCfProperties> = new Request('https://foo.com')
if (request.cf) {
  request.cf.cacheTtl = 3600
}

I still think it would be better to differentiate between Incoming Requests created by the runtime and Requests created by the developer. It would make the code easier to understand and eliminate type complexity.  Currently the generic for CfHostMetadata does not apply to requests created by the developer. I think this also satisfies the Service Binding as when a request is sent from the worker it is a Request and when it is received by the fetch event it is an IncomingRequest.  The worker doesn't care if the request came from the network or a service binding.  Everything that comes in over the fetch event is a IncomingRequest.
If you aren't convinced than no worries.  I can always make my own type for Incoming Requests and Userland Requests, but I thought I would share this with you as I think it is a definite improvement to the readability and complexity of the Request Type.  Let me know what you ultimately decide.

@DaniFoldi,
Any input? Trying to figure out how to best move forward on this project to avoid a massive refactor in the future.

Hey, sorry I've been busy this week. We've discussed this with MrBBot, and I've been trying to reproduce your issue.
For reference, see this TS playground, and you have a point regarding the union type if it contains {} - removing it fixed the issue, replacing it with Record<string, never> re-introduced the desired optional nature.
@mrbbot, any thoughts about changing it? 🤔

@mrbbot Sounds good on the IncomingRequestCfPropertiesGeographicInformation interface!
In regards to the second issue, my worker constructs sub requests using a pipeline of pure functions. The problem I'm seeing is that when you construct a request (new Request()) the cf object changes from IncomingRequestCfProperties to RequestInitCfProperties.  I understand that the RequestInit type has the correct cf interface, but I don't set all the cf properties at construct time. Here is a simplified example.
https://codesandbox.io/p/sandbox/practical-flower-q8twiw?selection=[{"endColumn"%3A1%2C"endLineNumber"%3A14%2C"startColumn"%3A1%2C"startLineNumber"%3A14}]&file=%2Fsrc%2Findex.ts
Do you have any ideas to support this use case?  I think we would either need to break the type out into IncomingRequest and Request or add another generic.
If we broke it out into two types you could do:
async handleFetch(request: IncomingRequst) {
  return fetch(request as Request)
}

Or we can modify fetch to accept IncomingRequest | Request.  I understand why you would want to keep one type for requests, but as it stands the Request type is inaccurate. We should at least add a way to force it to be accurate via another generic type:
declare class Request<CfHostMetadata = unknown, CfType = IncomingRequestCfProperties<CfHostMetadata>> extends Body {
  constructor(input: RequestInfo, init?: RequestInit);
  clone(): Request<CfHostMetadata>;
  /** Returns request's HTTP method, which is "GET" by default. */
  readonly method: string;
  /** Returns the URL of request as a string. */
  readonly url: string;
  /** Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header. */
  readonly headers: Headers;
  /** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default. */
  readonly redirect: string;
  readonly fetcher: Fetcher | null;
  /** Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler. */
  readonly signal: AbortSignal;
  readonly cf?: CfType;
}

I am still of the belief that these are really two different classes. CfHostMetadata is not present on a constructed request and there is ambiguity between the cf object... but I would be happy with what ever solution you decide on as long as I can pass a constructed request around and have it typed correctly.

So I'm trying to make some changes to my local index.d.ts so I can start this refactor ahead of your release. Are you planning on flattening out the IncomingRequestCfProperties type?  Currently its:
declare type IncomingRequestCfProperties<HostMetadata = unknown> =
  IncomingRequestCfPropertiesBase &
  IncomingRequestCfPropertiesBotManagementEnterprise &
  IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<HostMetadata> &
  IncomingRequestCfPropertiesGeographicInformation &
  IncomingRequestCfPropertiesCloudflareAccessOrApiShield;

and in the sandbox its:
interface IncomingRequestCfProperties extends Record<string, unknown> {
    colo: string;
}

Sounds good! I've got it working locally and I think this is definitely an improvement. 👍 Any thoughts on when it might land?

I also want to know the ETA of this.

Any updates on this and #397?  I'm hesitant to update dependencies until these changes land so I don't have to keep manually updating the .d.ts files (its pretty tedious).  I might consider using https://www.npmjs.com/package/patch-package if its going to be a while.  Can you give us a rough ETA?

Fantastic!

@mrbbot can you also roll in #397 while you are at at?


Benchmark reordering of cases in pattern matches

Let's see whether reordering of cases in pattern matches in hot spots makes a difference performance-wise. Both Scalac and Dotty do that, and I was always curious how important that is.

After doing preliminary experimentation with the "Benchmark architectural change XXX" tickets, we found out that performance effects of many of these changes lie within the range of run-to-run variance of our current benchmark suite. This makes it hard to form an informed judgement about these changes, so we decided to postpone further experiments until we implement support for more language features and make our benchmark suite more diverse.


add meter bar

I assume this should be made unto the gh-pages branch, and not the master from now on?

@Haroenv I think I'm going to keep the master branch around for now, in case this project ever evolves (at this point, doubtful, but you never know). I will add this manually and merge it into gh-pages, too. Thanks again for the update!

added as of 0.4.0


Bug: IO Error when uploading a larger zip file

What happened?
When uploading a larger zip (in this case 6 gigabyte) file, an error occurs.
Version
latest (ghcr.io/diced/zipline or ghcr.io/diced/zipline:latest)
What browser(s) are you seeing the problem on?
Firefox
Zipline Logs
[Error: ENOENT: no such file or directory, open 'C:\Users\ADMINI~1\AppData\Local\Temp\2\zipline\zipline_partial_Uv2c_0_20971520'] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2\\zipline\\zipline_partial_Uv2c_0_20971520'
}

Browser Logs
Browser is not noticing this issue as I saw, tries to continue to upload but the upload bar stays stuck.

Additional Info
No response

Is this issue still happening? Could you turn on the debug logs and show the logs surrounding the error if it's still happening?

A possibility is that the temp directory isn't being created, I don't test Zipline on windows but try to create the C:\Users\ADMINI~1\AppData\Local\Temp\2\zipline directory your self and see if the issue is resolved. Obviously this isn't a solution but I'll have to investigate it in more detail later on windows.

Hey there,
the named folder already exists.
https://pumpline.de/cloud/aiv314TzUFoPipftwKuh.png

Not sure if this will fix it, but try setting the CORE_TEMP_DIRECTORY variable to somewhere other than inside of AppData\Local\Temp for example maybe just your user folder and call the directory something like zipline_temp.

closing as stale


add UNEFCO University

@RogerMendez Please provide us with an URL of a page on the official website where the school offers an IT-related long-term (>1 year) course

@RogerMendez Please provide us with an URL of a page on the official website where the school offers an IT-related long-term (>1 year) course

https://unefco.edu.bo
courses for teachers, with more than 57 years working with this segment

@RogerMendez Thank you for the clarification. Pull request merged.