[FEATURE] Setup origin remote on new workspace for compatibility with VSCode pull request plug-in

Is your feature request related to a problem? Please describe.
Please note, this issue is only exists for using the try-in-web-ide GitHub action for testing PRs made from forks.
It would be great if new workspaces have the origin remote already set up on new workspaces for out-of-the-box compatibility with vscode pull request plug-in.
By default, the vscode pull-request plugin searches for pull requests in the origin and upstream remote:
Please see the Getting Started section from https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github.
Currently, the workspace created by the factory url provided by the try-in-web-ide GitHub action sets the origin remote to be the repository for the pull request branch, rather than the base repository. Pull requests would be for the base repository, therefore the vscode pull request plug-in does not detect the pull request if the pull request is coming from a forked repository.
Describe the solution you'd like
One way to address this issue could be to have the try-in-web-ide action to configure the remotes via the factory url. To setup the remotes for DevWorkspaces, the spec.template.projects field can be configured.
For example:
    projects:
      - git:
          checkoutFrom:
            remote: fork
            revision: <pull request branch name>
          remotes:
            fork: <user fork repo url>
            origin: <base repo url>
        name: <project name>

This adds two remotes, origin and fork, and checks out the pull request branch from the fork remote.
Currently, it is not possible to override the spec.template.projects section via the factory url. Please see https://github.com/eclipse/che/issues/20137.

Describe alternatives you've considered
It is possible manually setup the git remotes within the editor so that the vscode pull request plug-in can detect the pull-request.
Related issue
https://github.com/eclipse/che/issues/20137

Fixed by https://github.com/redhat-actions/try-in-web-ide/pull/21


Add headwords extraction

There are several things which still have to be added/checked:

Stephan assumed that there might be several spans as an output from most_common_ancestor function. I put the length check just in case. We can remove it if not relevant.
Issue with conj relation. I will have a look at it and if required find out how to split conj as heads.
Apply functions to the output from triplets extraction.
Create the pipeline for frequency count and lists creation.

In set_extentions() I am not sure about setting them for Token. I assumed the procedure is the same as for Span.
I also do not know how to call Doc, Span and Token in type hints here level:List[?]  .

In set_extentions() I am not sure about setting them for Token. I assumed the procedure is the same as for Span.
You can use the same trick as you use in normalize to span ;)

I also do not know how to call Doc, Span and Token in type hints here levels: List[?] .
If your list can contain multiple elements you can use Union Union[Token, Span, Doc]
e.g.
List[Union[Token, Span, Doc]] or Union[List[Token], List[Span], List[Doc]]
The only different here being that the first one says that the list should contain either a token span or docs (can contain multiple types) while the second says that it should be a List containing only tokens, or only span or only docs.

I managed to make it work as a component but I have several issues:

@Language.component gives me an Attribute error, while @Language.factory works fine. I use it but may be it is a wrong approach.
How can I access functions' parameters? F.ex., I cannot set 'normalize_token_to_entity' in ._.normalize_token_to_span.
There is default_config param in  @Language.factory. But it does not work for some reason when I use it.
Should contains_ents()' be just the function not a component?  Otherwise, I cannot use it with filter()`.
If a function can be used for both Doc and Span should I define input args as Union[Doc, Span]?
I have problems while running pytest def test_headword():. You suggested to use simply:
`text = "Mette Frederiksen is the Danish politician."
doc = nlp(text)
for span in doc..relation_head:
headword = span..most_common_ancestor'

However, this does not work. In the examples for RelationExtraction Lasse always uses a list of sentences as an input and pipe = nlp.pipe(test_sents).

It is not clear what you mean in here

It is not clear what you mean here

I recommend don't set them in a loop as the function shouldn't all be set the same way on all objects.
The normalize_to_span function I think is best set as the extension as_span e.g. Token._.as_span

Do you want 3 different functions normalize_to_span, normalize_to_entity, normalize_to_noun_chunk?

@HLasse This still does not work :(
>       for span in doc._.relation_head:        TypeError: 'NoneType' object is not iterable

Hmm a Yea right. I want something like this:
Token._.to_span
Where when you add the pipe you can specify normalize_to_entity and normalize_to_noun_chunk.
E.g. nlp.add_pipe('headword_extraction', config={'normalize_to_entity'=True})
Does this make sense?

Then those still can be args for a single function normalize_to_span. And if needed, one can set those in config to True.
Or.....you want sep functions which are called inside the body of 'to_span' function when normalize_to_entity and normalize_to_noun_chunk are set to True?
Smth like:
def normalize_to_span(token: Token, normalize_to_entity: bool = False, normalize_to_noun_chunk: bool = False):
    if normalize_to_entity == True:
       ent = to_ent(token)
  if normalize_to_noun_chunk == True:
      noun_chunk = to_noun_chunk(token)
.............

I also do not understand why even though I black formatted files, black test fails on git.

I also do not understand why even though I black formatted files, black test fails on git.

The black-formatting error is probably due to a version mismatch between the github action and your local version. 22.3.0 is the GH action here, which matches the requirements - so pip install -r requirements.txt followed by black . should fix it 👍

There is a problem with normalize_to_entity. If a token is not an entity, the function returns None and unsurprisingly len() cannot be applied. We do not need to normalize heads to the whole entity for the current task. But I think we still need to decide how to deal with it :)
I also downgraded black to 22.1.0 as in requirements. Hope, the test won't fail.

@KennethEnevoldsen  I pushed the new version of scripts. There is no option to request a review since one is still in the queue.
There is a problem with normalize_to_entity(). If a token is NOT an entity, it returns  None. Consequently, len() cannot be applied in  most_common_ancestor() (line 168). We do not need this functionality for the current task. But still I think this should be solved. May be check if empty instead of len()  and return an empty str instead of None?
I also downgraded black to the version specified in req-s. Hope, the test won't fail.

@martbern 22.3.0 is stable? I have also specifically fixed the version in both requirements.txt and the workflow.
Regardless the black part is quite easy to fix when everything else is ready so wouldn't worry too much about it.

If a function returns a class, how to define it in type hints (in create_component())?
We still have problem when applying to_noun_chunk in most_common_ancestor(). If None is returned, len() results in error.

If a function returns a class, how to define it in type hints (in create_component())?
You can simply put the class:

create_component() -> Component:
    # your code

Where Component is your class the create_component outputs.

We still have problem while applying to_noun_chunk in most_common_ancestor(). If None is returned, len() results in error.
I have added some corrections on this. Basically the solution is to only return if there is a value otherwise you fall back to the token normalisation

Sounds great! Go for it!


[Removal]:

Hotspot Name
Upbeat Menthol Gorilla
Hotspot b58 Address
11VbeJkM7riuzV8idVo5rJS3awNLKPFQJPdWDsUGf6hqy8TN4qw
Discord Handle
No response
Hotspot Manufacturer
Heltec Indoor Hotspot
Removal Reason
Adjust the best scheme to make the greatest contribution. Adjust the best scheme to make the greatest contribution
Modifications
No
Extra forwarders
No
Extra antennas
No
Additional Information
No response

We have taken into account this removal request in the next iteration of the denylist. It may take some time before it's processed. This is an automated comment due to the volume of addition and removal requests. A future tool is in the works to provide more insight into the analysis approach made by the Helium team and community members that maintain this list.


Interface to view previous quantifications

Fix for issue #195. This adds an interface for viewing the quantifications of a plate.
It displays all quantifications associated with a plate.

Should be good to merge if tests pass...
On Mon, May 7, 2018 at 6:07 PM Yoshiki Vázquez Baeza <
<EMAIL_ADDRESS>wrote:

@ElDeveloper approved this pull request.
Two minor comments but looks good otherwise.
In labman/gui/handlers/process_handlers/quantification_process.py
https://github.com/jdereus/labman/pull/229#discussion_r186593192:

@@ -96,3 +96,56 @@ def post(self):
self.current_user, plate, concentrations).id)

     self.write({'processes': processes})

+class QuantificationViewHandler(BaseHandler):

@authenticated
def get(self, plate_id):

   # plate_id = self.get_arguments('plate_id')

Can you remove this line?
In labman/gui/handlers/process_handlers/quantification_process.py
https://github.com/jdereus/labman/pull/229#discussion_r186593241:

+class QuantificationViewHandler(BaseHandler):

@authenticated
def get(self, plate_id):

   # plate_id = self.get_arguments('plate_id')

   plate = Plate(plate_id)

   quant_processes = plate.quantification_processes

   quant_values = []

   for quant in quant_processes:

       concentrations = np.zeros_like(plate.layout, dtype=float)

       names = np.empty_like(plate.layout, dtype='object')

       blanks = np.zeros_like(plate.layout, dtype=bool)

       # fetch the sample names and whether or not the samples are blanks

I think this comment can either be deleted or relocated.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jdereus/labman/pull/229#pullrequestreview-118201455,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH6JAAF6pl4Opex_3LtJdNA8oUfZnaLZks5twO_JgaJpZM4T1wVP
.


Do not pass the schema as argument to ReconcileOwnedResources

The scheme is already part of the reconciler, so there is no need of
passing it to the function, which is itself a method of the reconciler.
This is probably something that was left from an older implementation.
/kind cleanup
/priority important-longterm
/assign

/lgtm

/approve


Add button which has a side-effect on the demo page.

I'll add a button which has a side effect on the demo page (to demonstrate that JS clicks still work on the buttons). I'll see if I can use SweetAlert because it looks pretty nifty.

I've checked your Snarl notification, and it works nicely. I will push it to v0.6.0. Thanks for your great project! :smile:


Campaign stats not updating

Hello! We sent a campaign to a dynamic list. The campaign stats have stopped updating after a while.
If I check MySQL for the campaign opens, this is what I see -

ParcelVoy campaign list view shows this

I see some deadlocks in the performance tab; however, I'm not sure if they are related.

Am I  looking at this correctly? Would you have any thoughts on how to investigate this?
Another question - My dynamic list's criteria is email opened on or before a certain date. Would this impact the list population as well and we might miss out on some users who have opened the email later but won't be included in the list?

What is "a while"? When did you send the campaign?

Apologies for missing this - the campaign was sent on 21st December (Friday). The stats updated for 2 days and then stopped. Maybe the dynamic list got regenerated and this update stopped?

That is currently as designed. Campaign stats only update for 48hrs after finishing. Counting queries are expensive and you'd have a thundering horde problem with campaigns continuing to update as you added more and more campaigns with diminishing returns as to what updating the stats would bring you. Could potentially extend slightly, but there will always be a cutoff date where stats stop updating.

Understood.
Another question - Our dynamic list's criteria is email opened on or before a certain date. I hope the list population will work as is and we won't miss out on some users who have opened the email after 48 hours?

Rules in lists are based on events and have nothing to do with the campaigns themselves, yes they will continue to update


Paginate commits and changes on new pull request

Currently, commits and changes on a new pull request are not paginated. I just opened a massive pull request with almost 300 commits, which took about half a minute to render in my browser.
Perhaps we should limit it to ~50 commits (or something) and add pagination to browse through the commits.
I understand it's a pretty rare event, but it'd be nice to have.

@lunny Are there any news to that?

We have also such issues, because we are using PRs with 300 comments+. Our page load takes 4-5 minutes which is way too long and takes 1 GB RAM and more. Could anyone have a look on this and maybe introduce some performance buff / pagination?


Hover info#129

This resolves the issue where a single segment(RSP) would be rendered rather than all segments for a route. It also repairs the operator and mode style rendering. This does not resolve the hover info issue, which will be tackled in a separate branch.

[x] Render all segments of route lines

[x] Render mode and operator styles

Closes #129

Closes #132


[Fix] Add delay property for checkpointing, refactor loading checkpoint (DeepSpeed Checkpointing Fix 1/n)

What does this PR do?
Related to #8397.
This PR introduces a property to the training type plugin that allows the plugin to delay loading the checkpoint till after pre-dispatch, and moves loading the checkpoint file (resume_start) into the same block of logic.
After discussions with @awaelchli I couldn't unfortunately come up with another method to load via the deepspeed engine but to introduce this branch into the run function. This branch will allow us to call deepspeed_engine.load_checkpoint when loading the checkpoint file.
This PR relys on #8347 which will not be included till 1.5, so should skip this from 1.4.x. I'll also to a combo CHANGELOG update in #8397 instead of here, as on it's own its confusing!
Before submitting

[x] Was this discussed/approved via a GitHub issue? (not for typos and docs)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together?
[x] Did you make sure to update the documentation with your changes? (if necessary)
[x] Did you write any new necessary tests? (not for typos and docs)
[x] Did you verify new and existing tests pass locally with your changes?
[x] Did you list all the breaking changes introduced by this pull request?
[ ] Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

[x] Is this pull request ready for review? (if not, please submit in draft mode)
[x] Check that all items from Before submitting are resolved
[x] Make sure the title is self-explanatory and the description concisely explains the PR
[x] Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?
Make sure you had fun coding 🙃

Hello @SeanNaren! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file pytorch_lightning/plugins/training_type/training_type_plugin.py:

Line 244:17: W291 trailing whitespace


PSA: Rationale for resubmitted packets being copies of the original?

@hanw @vgurevich
If the goal of resubmit is to do something different, or 'extra' on the packet after resubmission, it seems a little odd that the contents of packet_in are defined to be exactly the same as the packet that was resubmitted.
One use case for something similar to resubmission in some ASICs I have seen is tunnel encapsulation or decapsulation.  I know that such things can be implemented without a resubmit operation, but if you could do a tunnel encap or decap operation in the first pass through ingress, then resubmit the modified packet that comes out of the ingress deparser back to the ingress parser, it becomes much easier to implement what you want to do on the modified packet, than it would be to do it on the original.

I discussed this with @vgurevich today, and realized that if one wants the capability of 'doing over' a packet after modifying its headers (either removing some, adding some, or some arbitrary mix of those two), you can send the packet normally from ingress to egress, then recirculate it, because the recirculated packet contents are whatever comes out of the egress deparser.  That seems to satisfy the use cases I had in mind for resubmitting a post-deparser-modification packet.  Perhaps it is worth mentioning this in the PSA spec somewhere, for those wishing for something similar.

Closing this issue, as the use case I had in mind is achievable via recirculation.


[DOCS] Add contributions.md

Description
Add contributions.md
Screenshots
No response
Additional information
No response

Can I add this file? Please assign this issue to me.

Can I add this file? Please assign this issue to me.


Broken Links due to Moved Files

Describe the bug
The CLI files moved to new folders in this PR were not accounted for in the _redirects file. This has resulted in many broken links.
To Reproduce
running yarn build in the terminal will reveal the following:
[WARNING] Docusaurus found broken anchors!

Please check the pages of your site in the list below, and make sure you don't reference any anchor that does not exist.
Note: it's possible to ignore broken anchors with the 'onBrokenAnchors' Docusaurus configuration, and let the build pass.

Exhaustive list of all broken anchors found:
- Broken anchor on source page path = /build/cross-chain/awm/overview:
   -> linking to /learn/avalanche/subnets-overview#virtual-machines
- Broken anchor on source page path = /build/cross-chain/teleporter/overview:
   -> linking to #teleporter-protocol (resolved as: /build/cross-chain/teleporter/overview#teleporter-protocol)
- Broken anchor on source page path = /build/subnet:
   -> linking to /learn/avalanche/subnets-overview#virtual-machines
- Broken anchor on source page path = /build/subnet/deploy/fuji-testnet-subnet:
   -> linking to /learn/avalanche/subnets-overview#virtual-machines
   -> linking to /nodes/run/node-manually#connect-to-fuji-testnet
   -> linking to /nodes/validate/what-is-staking#fuji-testnet
   -> linking to /build/subnet/deploy/local-subnet#create-a-custom-subnet-configuration
   -> linking to /nodes/validate/add-a-validator#add-a-validator-with-avalanche-wallet
- Broken anchor on source page path = /build/subnet/deploy/mainnet-subnet:
   -> linking to /nodes/validate/add-a-validator#add-a-validator-with-avalanche-wallet
- Broken anchor on source page path = /build/subnet/info/wagmi:
   -> linking to /build/subnet/info/wagmi#adding-wagmi-to-metamask
- Broken anchor on source page path = /build/subnet/upgrade/considerations-subnet-upgrade:
   -> linking to /nodes/configure/avalanchego-config-flags#snow-sample-size-int
- Broken anchor on source page path = /build/subnet/upgrade/customize-a-subnet:
   -> linking to /reference/subnet-evm/api#ethgetchainconfig
- Broken anchor on source page path = /build/vm/create/rust-vm:
   -> linking to /nodes/configure/avalanchego-config-flags#vm-configs
- Broken anchor on source page path = /build/vm/golang-vms/golang-vm-simple:
   -> linking to /nodes/configure/avalanchego-config-flags#vm-configs
- Broken anchor on source page path = /build/vm/rust-vms/installing-vm:
   -> linking to /nodes/configure/avalanchego-config-flags#vm-configs
- Broken anchor on source page path = /deprecated/tutorials-contest/2022/local-subnet-development:
   -> linking to /build/subnet/utility/deploy-smart-contract-to-subnet#step-1-setting-up-metamask
- Broken anchor on source page path = /learn/avalanche/subnets-overview:
   -> linking to /nodes/run/node-manually#requirements
- Broken anchor on source page path = /nodes/maintain/setting-up-node-monitoring:
   -> linking to /nodes/run/third-party/aws-node#f8df
- Broken anchor on source page path = /nodes/run/third-party/google-cloud-node:
   -> linking to #setup-instructions (resolved as: /nodes/run/third-party/google-cloud-node#setup-instructions)
- Broken anchor on source page path = /nodes/validate/what-is-staking:
   -> linking to /intro#avax
- Broken anchor on source page path = /reference/avalanchego/admin-api:
   -> linking to /build/vm/intro#load-a-vm
- Broken anchor on source page path = /reference/avalanchego/p-chain/txn-format:
   -> linking to /reference/standards/cryptographic-primitives#secp-256-k1-addresses
- Broken anchor on source page path = /reference/avalanchego/x-chain/api:
   -> linking to /learn/avalanche/avalanche-platform#exchange-chain-x-chain
- Broken anchor on source page path = /reference/avalanchego/x-chain/txn-format:
   -> linking to /reference/standards/cryptographic-primitives#secp-256-k1-addresses
- Broken anchor on source page path = /reference/standards/guides/issuing-api-calls:
   -> linking to /nodes/configure/chain-config-flags#--http-host-string
- Broken anchor on source page path = /reference/standards/guides/x-chain-migration:
   -> linking to /reference/avalanchego/index-api#x-chain-vertices
- Broken anchor on source page path = /tooling/avalanchejs-overview:
   -> linking to /#Requirements
- Broken anchor on source page path = /tooling/cli-create-deploy-subnets/deploy-fuji-testnet-subnet:
   -> linking to /learn/avalanche/subnets-overview#virtual-machines
   -> linking to /nodes/run/node-manually#connect-to-fuji-testnet
   -> linking to /nodes/validate/what-is-staking#fuji-testnet
   -> linking to /build/subnet/deploy/local-subnet#create-a-custom-subnet-configuration
   -> linking to /nodes/validate/add-a-validator#add-a-validator-with-avalanche-wallet
- Broken anchor on source page path = /tooling/cli-create-deploy-subnets/deploy-mainnet-subnet:
   -> linking to /nodes/validate/add-a-validator#add-a-validator-with-avalanche-wallet

@laviniat1996
[Action Required:] Please fix these broken links with a New PR

A nit:
The new folders created in that PR should be nested into 1 CLI folder instead of having 3 CLI folders at the same level as the other tools.

cc: @sukantoraymond

@sukantoraymond
when a file is moved to a new path, all links to that file are broken. the links in all other docs must therefore be adjusted, and all new file paths included in the _redirects file.
the compartmentalization of tutorials makes sense, but it is just my opinion that the folder structure is not great.
i would've done:
├── docs
│   └── tooling
│   │   └── cli
│   │   │   └── guides
│   │   │   └── nodes
│   │   │   └── subnets

closing this as it was fixed by #1666 , there are still issues with the spanish docs links, but that's another issue to tackle


New NegativeInt type

Description
Introduce a new NegativeInt type in the kotools.types package having the same feature of the kotools.types.number.NegativeInt type.
The final design for explicit integers in Kotools Types 4.0.0 could look like the following:
import kotlin.jvm.JvmInline

sealed interface ExplicitInt {
    val value: Int
}

@JvmInline value class NonZeroInt(override val value: Int) : ExplicitInt
@JvmInline value class PositiveInt(override val value: Int) : ExplicitInt
@JvmInline value class StrictlyPositiveInt(override val value: Int) : ExplicitInt
@JvmInline value class NegativeInt(override val value: Int) : ExplicitInt
@JvmInline value class StrictlyNegativeInt(override val value: Int) : ExplicitInt

Checklist

[x] Add the kotools.types.NegativeInt type and its primary builder.
[ ] Add conversions to the new type.
[ ] Add unary operations to the new type.
[ ] Add binary operations to the new type.
[ ] Make the new type serializable.
[ ] Deprecate the kotools.types.number.NegativeInt type.
[ ] Update Work in progress section in changelog.

Convert its member functions to extensions.

Done.


Multiple templates per component, allowing arguments

Summary
Fixes #387
This PR builds on the branch by @joelhawksley and @fermion, and adds the ability to specify arguments for the generated functions.
The logic being that one may want to use templates to extract sections, without wanting to build a full component. For example, I could have a Table component, and I would want to have the row definition in a sidecar template. This requires being able to pass in each item for every iteration:
class TableComponent < ViewComponent::Base
  def initialize(models)
    @models = models
  end
  template_arguments :row, :model
end

<%# table_component.html.erb %>

  <% @models.each do |model| %>
    <%= call_row model: model %>
  <% end %>

<%# row.html.erb %>

  <%# I can use `model` here %>
  <%= model.name  %>

Conceptually, this is very similar to ActionView's usage of locals:. However, this way has the following benefits:

Performance is increased as the template needs to be compiled only once.
We don't need to instance_exec things in a custom-build binding, further improving performance.
Ruby checks our argument list.
We force the user to specify the locals, thus forcing them to specify the interface.

Other Information
I'm submitting as a draft, because there are some important API issues that need discussing:

Should we always use keyword arguments? Maybe we should use positional arguments? (I happen to like keyword arguments, but it may not be everyone's cup of tea).
This doesn't allow default values for any parameter. Is this a problem that needs addressing?

Thanks for the PR! We're starting to think about slots v2 and this is a use-case we should definitely take into account. Would you be willing to share your thoughts on this discussion https://github.com/github/view_component/discussions/454?

I'm with @BlakeWilliams that this feels like a use case that Slots could/should support.
If this doesn't get baked into slots I'd encourage us to think hard about the rendering API and making it "Rails like". I agree with the four points you mention - they seem consistent with ViewComponents strong APIs and cached templates. However, the call_row api feels awkward and not very Rails like. What I love about the ViewComponent implementation is that you call 'render' in a view just like you would for a partial etc. Can we make this similar. Could it be render template: :row or render_template :row, .... ?

Hi!
I remember discussing this with @joelhawksley , and he also said that slots v2 could take this role. Maybe it can, but I have not yet seen how that works. Discussion #454 doesn't mention slot templates, for example. I have posted my further thoughts there.
I think we first need to address this bigger point before tackling the one raised by @jonspalmer (although I do agree that call_foo is very ugly).

Hi!
Friendly ping to ask about this feature. Do you consider Slots V2 to cover this use case? AFAICT, it could be, but it is rather cumbersome:

Using a Component Slot requires creating a new component + view, and requires creating a new object for each slot item (when it renders_many).
Using a Delegate Slot does not allow using ERB syntax.
A pass through slot is not applicable.

All three options also expose the slot to the user, which is not desired.
If splitting templates is still a desired feature, I'd like to move this forward, and also give it a nicer interface than call_<template_name>

Hi!
Friendly ping to ask about this feature. Do you consider Slots V2 to cover this use case? AFAICT, it could be, but it is rather cumbersome:

Using a Component Slot requires creating a new component + view, and requires creating a new object for each slot item (when it renders_many).
Using a Delegate Slot does not allow using ERB syntax.
A pass through slot is not applicable.

All three options also expose the slot to the user, which is not desired.
If splitting templates is still a desired feature, I'd like to move this forward, and also give it a nicer interface than call_<template_name>

Using a Component Slot requires creating a new component + view, and requires creating a new object for each slot item (when it renders_many).
Using a Delegate Slot does not allow using ERB syntax.
A pass through slot is not applicable.

All three options also expose the slot to the user, which is not desired.

I agree 2 and 3 are mostly incompatible with this goal (2 could work imo, depending on the use case). I do think option 1 could work though. Your point about the slots being exposed to the user is completely valid, but I wonder if that could be resolved by adding a private: true option to slots if this becomes a proven/valuable use of slots?

Using a Component Slot requires creating a new component + view, and requires creating a new object for each slot item (when it renders_many).
Using a Delegate Slot does not allow using ERB syntax.
A pass through slot is not applicable.

All three options also expose the slot to the user, which is not desired.

I agree 2 and 3 are mostly incompatible with this goal (2 could work imo, depending on the use case). I do think option 1 could work though. Your point about the slots being exposed to the user is completely valid, but I wonder if that could be resolved by adding a private: true option to slots if this becomes a proven/valuable use of slots?

Hi @BlakeWilliams !
I'm going to create an example. Imagine a Table Component:
class TableComponent < ApplicationComponent
  renders_many :columns, "ColumnComponent"
  def initialize(rows:)
    @rows = rows
  end

  class ColumnComponent < ApplicationComponent # This one actually doesn't need to be a component :)
     def initialize(attribute:)
        @attribute = attribute
     end

    def render_value model
       model.send(@attribute) # for brevity, we don't implement other ways of rendering the value
    end
  end
end

<%# table_component.html.erb %>

  <% @rows.each do |row| %>

      <% columns.each do |col| %>
        <%= col.render_value(row) %>
      <% end %>

  <% end %>

Now, imagine that I add a bunch of options, and thus creating each row is a bit more complicated. Thus, I want to extract a method to render the row. I can use option 1 above:
class RowComponent
  def initialize(item:, columns:, **some_more_options)
    @item = item
    @columns = columns
    @options = some_more_options
  end

  def row_options
     # something based on @options
  end
end

<%# row_component.html.erb %>
<%= content_tag :tr, row_options do %>
    <% @columns.each do |col| %>
      <%= col.render_value(@item) %>
    <% end %>
<% end %>

class TableComponent < ApplicationComponent
  renders_many :columns, "ColumnComponent"
  # @api private
  renders_many :rows, -> (item) do
    RowComponent.new(item: item, columns: columns, **some_options)
  end

  def initialize(rows:)
    @rows = rows
  end

  def before_render
<EMAIL_ADDRESS>{item: item, columns: columns} })
  end
end

<%# table_component.html.erb %>

  <% rows.each do |row| %>
    <%= row %>
  <% end %>

The problem with this solution is that:

RowComponent is now public. This can be worked around with some documentation though.
It creates a new Hash and a new RowComponent for each Row, each in one. This is actually the deadly problem, since creating large arrays is very problematic for the ruby GC and can create large pauses. A simple example with 6000 rows means passing 10% of the time in GC (as measured by miniprofiler flamegraph) vs 0% in the first version.
Actually, I also find the solution to be a bit ugly. I need to remember to populate the rows slots in before_render, with a weird map in between.

Hi @BlakeWilliams !
I'm going to create an example. Imagine a Table Component:
class TableComponent < ApplicationComponent
  renders_many :columns, "ColumnComponent"
  def initialize(rows:)
    @rows = rows
  end

  class ColumnComponent < ApplicationComponent # This one actually doesn't need to be a component :)
     def initialize(attribute:)
        @attribute = attribute
     end

    def render_value model
       model.send(@attribute) # for brevity, we don't implement other ways of rendering the value
    end
  end
end

<%# table_component.html.erb %>

  <% @rows.each do |row| %>

      <% columns.each do |col| %>
        <%= col.render_value(row) %>
      <% end %>

  <% end %>

Now, imagine that I add a bunch of options, and thus creating each row is a bit more complicated. Thus, I want to extract a method to render the row. I can use option 1 above:
class RowComponent
  def initialize(item:, columns:, **some_more_options)
    @item = item
    @columns = columns
    @options = some_more_options
  end

  def row_options
     # something based on @options
  end
end

<%# row_component.html.erb %>
<%= content_tag :tr, row_options do %>
    <% @columns.each do |col| %>
      <%= col.render_value(@item) %>
    <% end %>
<% end %>

class TableComponent < ApplicationComponent
  renders_many :columns, "ColumnComponent"
  # @api private
  renders_many :rows, -> (item) do
    RowComponent.new(item: item, columns: columns, **some_options)
  end

  def initialize(rows:)
    @rows = rows
  end

  def before_render
<EMAIL_ADDRESS>{item: item, columns: columns} })
  end
end

<%# table_component.html.erb %>

  <% rows.each do |row| %>
    <%= row %>
  <% end %>

The problem with this solution is that:

RowComponent is now public. This can be worked around with some documentation though.
It creates a new Hash and a new RowComponent for each Row, each in one. This is actually the deadly problem, since creating large arrays is very problematic for the ruby GC and can create large pauses. A simple example with 6000 rows means passing 10% of the time in GC (as measured by miniprofiler flamegraph) vs 0% in the first version.
Actually, I also find the solution to be a bit ugly. I need to remember to populate the rows slots in before_render, with a weird map in between.

@fsateler are you still interested in building out this functionality? If so, perhaps opening a PR with and ADR would be a good next step?

Hi @joelhawksley ! Indeed I might. I have two questions though:

What changed since the last comment? I'm happy to update and move this forward but the previous messages here suggesteds slots as a way for this problem. I'd like to know what changed that something like this would be acceptable for you.
What is an ADR? Any pointers on how to create one?

Hi! I have rebased the branch and added the ADR.

Hey @fsateler, I'm a latecomer to this PR and discussion, but I hope you'll allow me to state my opinion anyway. I'm concerned rendering partials in components breaks the component abstraction. One of the benefits of view_component is that it avoids many of the problems inherent in traditional Rails views, key among them being the problem of shared state. While there's nothing stopping you from rendering normal Rails view partials inside components today, I'm not sure it's a good idea to bake it into the view_component framework like this, since doing so further encourages using partials that should probably be their own components.
Is there something preventing you from converting your partials into components?

@camertron I think it is best if you comment directly on the parts of the ADR that don't make sense to you. I don't know what is missing there to answer your question.

Btw, this merge explicitly is not about invoking unrelated partials. Its about being able to extract some parts of a large method into several smaller methods

@fsateler ah I used the word "partial" when I meant to say "additional sidecar asset." Correct me if I'm wrong, but a big part of your proposal is providing additional .html.erb files scoped to the component (i.e. sidecar assets) that get rendered from another sidecar asset. Perhaps my earlier comment makes more sense with the right terminology 😅  I'll make additional comments on the ADR 😄

Hmm, any hint on how to investigate pvc test? I don't see how this change could cause a accessibility failure..

I re-ran the pvc test and it passed. It can be a bit flaky, so never mind :)

I have applied (almost) all suggestions. Thanks for the review. I liked the new method name pattern. I did not apply @Spone 's suggestion for the new name in the documentation, but that could be applied easily if there is consensus about that. IMO, the name partial could cause confusion, but that is just a gut feeling, I have no data to back this up.

Looking at this during office hours today, I think we're in a tough spot. We now have a situation where some ViewComponent templates support variants and some don't, which I think would be quite confusing to consumers. (Although I'm of the opinion generally that variants shouldn't exist at all). This makes me want to lean more on @BlakeWilliams's inline templates proposal.

Hi!

We now have a situation where some ViewComponent templates support variants and some don't, which I think would be quite confusing to consumers

I don't understand this point. AFAICT, you can have variants in this PR. Perhaps you mean you need to know which variant to render? That may be addressable with something like I proposed earlier: https://github.com/ViewComponent/view_component/pull/451#discussion_r988396530
def render_foo_template **args
   case @__vc_variant
   when 'some_variant'
      render_list_template_some_variant **args
   else
      render_list_template_default_variant **args
   end
end

This would allow rendering the current template forcing a variant (via the _some_variant suffix) or via the current variant (via the method without suffix).

Hi @joelhawksley ! I'm still interested in moving this forward, but I'd need to understand better this objection:

We now have a situation where some ViewComponent templates support variants and some don't, which I think would be quite confusing to consumers.

You can have variants in this PR, although they are not very ergonomic. Do you want me to think about improving that? Or is something else you have in mind?

@fsateler I haven't forgotten about this PR ❤
We're iterating on https://github.com/ViewComponent/view_component/pull/1556 and want to see where we end up API-wise to inform our decisions on your PR here.

Reading over this (trying to get the full context of the direction of variants), I

It creates a new Hash and a new RowComponent for each Row, each in one. This is actually the deadly problem, since creating large arrays is very problematic for the ruby GC and can create large pauses. A simple example with 6000 rows means passing 10% of the time in GC (as measured by miniprofiler flamegraph) vs 0% in the first version.

Isn't this exactly the problem lazy enumerators are supposed to solve?

Reading over this (trying to get the full context of the direction of variants), I

It creates a new Hash and a new RowComponent for each Row, each in one. This is actually the deadly problem, since creating large arrays is very problematic for the ruby GC and can create large pauses. A simple example with 6000 rows means passing 10% of the time in GC (as measured by miniprofiler flamegraph) vs 0% in the first version.

Isn't this exactly the problem lazy enumerators are supposed to solve?

Not really.  Lots of transformations are more memory efficient in lazy enumerators. For example, some_list.select(&:something?).reject(&:other?).take(10) will be a lot more efficient with lazy enumerators, because you avoid all the intermediate arrays.
In this case, however, we are doing a map. So, while we would be avoiding a new array allocation, it doesn't avoid allocating a new Hash and Component for each item, even if the objects are then inmediately discarded.

@fsateler responding to https://github.com/ViewComponent/view_component/issues/387#issuecomment-1664553704 here ❤
Revisiting this with @camertron and @BlakeWilliams, we're wondering if it'd make sense to first land hooks to the compiler that would allow a gem to add this behavior. I don't think it would be too bad to do so. We're still ultimately feeling hesitant to confuse folks' use of Slots, which are already quite complex.
I also wonder if we might want to consider a Rails core contribution to add named render helper methods for views such as render_users_show. I might take a look into this idea over the holidays here!

@joelhawksley awesome! if there is anything that I can help with I'm happy to do so.

Hi @joelhawksley any chance this feature could be released?

Summary
Fixes #387
This PR builds on the branch by @joelhawksley and @fermion, and adds the ability to specify arguments for the generated functions.
The logic being that one may want to use templates to extract sections, without wanting to build a full component. For example, I could have a Table component, and I would want to have the row definition in a sidecar template. This requires being able to pass in each item for every iteration:
class TableComponent < ViewComponent::Base
  def initialize(models)
    @models = models
  end
  template_arguments :row, :model
end

<%# table_component.html.erb %>

  <% @models.each do |model| %>
    <%= call_row model: model %>
  <% end %>

<%# row.html.erb %>

  <%# I can use `model` here %>
  <%= model.name  %>

Conceptually, this is very similar to ActionView's usage of locals:. However, this way has the following benefits:

Performance is increased as the template needs to be compiled only once.
We don't need to instance_exec things in a custom-build binding, further improving performance.
Ruby checks our argument list.
We force the user to specify the locals, thus forcing them to specify the interface.

Other Information
I'm submitting as a draft, because there are some important API issues that need discussing:

Should we always use keyword arguments? Maybe we should use positional arguments? (I happen to like keyword arguments, but it may not be everyone's cup of tea).
This doesn't allow default values for any parameter. Is this a problem that needs addressing?


Readme could use better orientation

Perhaps I am the issue (as I am new to programming and wavernn), but your instructions are not clear on how to:

Use the Pretrained Checkpoints
Generate audio files from checkpoints
Create your own data set to train from

A generating tool would be amazing (user could put large mp3/wav files in a folder with a .txt with sentences it would do all the work to generate sentences from the files... and/or give you warnings if the audio data wasn't sufficient (creating a data set by dividing large audio files into 5-10 seconds where there are moments of silence is not easy)

I would love to have a link to a YouTube video that shows how you got Obama and Bernie setup. Such a fun example. Made me laugh.

I really appreciate you sharing your work; please do not take this issue as a lack of appreciation

Yes you are right. It is a very nice project but there is a lack of teaching.


Flash messages not shown or shown in wrong environment

Flash messages with 'error' or 'notice' tag not shown in admin. However, when 'error' or 'notice' flash message is thrown in admin area, it appears in store area.

I think this is solved on https://github.com/elcodi/bamboo/pull/275
@fjavier-moreno can you check this?

@tonipinel I think that Aldo added the "error" but a "notice" or "info" will still be needed :)

This is something to support in the template, so I'm going to nominate @tonipinel. Thee I invoke!

@fjavier-moreno this PR should have fixed it https://github.com/elcodi/bamboo/pull/275

@tonipinel Still no "notice" or "info" message. Isn't it?

Not fixed @alch


Getting started guide

This looks very promising, but have to say this is quite hard to get up and running. As a C# dev, took me a while to realise I need nodejs for the interface. Been installing, tweaking and trying for an hour, but I can't get it to execute.
Could you perhaps add a guide on getting started? Looking at the PRs I'd also need specific Angular versions, probably part of the reason I can't get it to execute.

Thanks @SamKr, this project was abandoned for quite some time, but thanks to your interest I'll update it to newer versions of .NET and Angular and release a new version soon, along with improved documentation.

Ah wow that is awesome! Thanks a bunch :)

Interim update:

Web UI now running in Angular 16.x
ASP.NET Core Server in .NET 6
ASP.NET Core Sample Application in .NET 6

Not tested in latest version of MongoDB yet (only 4.4.x).
Will push probably Wednesday, end of day (GMT-3), with updated docs.

Could not finish it today as expected, but here a small update:

Added initial docker-compose file to run Mongo DB in docker
Moved development connection strings to user secrets

The second bullet is because the docker composer file creates root and app users, so the connection strings need to be updated accordingly, but without storing them in appsettings.json directly.
Additionally, the docker composer uses a .env file to read its variables, so .gitignore was updated to exclude it.
I expect to document these updates tomorrow.

Added docker-compose.yml and added/updated related files.
Not to run it locally in docker is (all going well) as simple as:
docker-compose -p serimongo -f docker-compose.yml up -d

This will download all dependencies in docker, build the applications, setup Mongo DB with change streams and run everything.
Now I'm fine tuning and documenting everything, approaching the state where I'll be able to close this issue.

Oh wow, that's extensive. I'll start working on it tomorrow and let you know how it goes. Thanks for all your effort, really happy with this :)

Sorry for the delay, bit backed up at work; I'll have time in the coming days.

Okay so I've been playing around, and think I'm getting the general idea. One thing you might want to elaborate a bit more on, is what exactly are the Samples\SerilogSample and Samples\SeriMongoDesktopClient projects? What do they do?
The SeriMongoDesktopClient doesn't start with the following error:

Regarding the main project, I get it up and running up to the swagger page:

When I try to go to the localhost:4200 page, I get ERR_CONNECTION_REFUSED.
This error comes up in the output window:
MongoDB.Driver.MongoCommandException: Command aggregate failed: The $changeStream stage is only supported on replica sets.
   at MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1.ProcessResponse(ConnectionId connectionId, CommandMessage responseMessage)
   at MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1.Execute(IConnection connection, CancellationToken cancellationToken)
   at MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1.Execute(IConnection connection, CancellationToken cancellationToken)
   at MongoDB.Driver.Core.Servers.Server.ServerChannel.ExecuteProtocol[TResult](IWireProtocol`1 protocol, ICoreSession session, CancellationToken cancellationToken)
   at MongoDB.Driver.Core.Servers.Server.ServerChannel.Command[TResult](ICoreSession session, ReadPreference readPreference, DatabaseNamespace databaseNamespace, BsonDocument command, IEnumerable`1 commandPayloads, IElementNameValidator commandValidator, BsonDocument additionalOptions, Action`1 postWriteAction, CommandResponseHandling responseHandling, IBsonSerializer`1 resultSerializer, MessageEncoderSettings messageEncoderSettings, CancellationToken cancellationToken)
   at MongoDB.Driver.Core.Operations.CommandOperationBase`1.ExecuteProtocol(IChannelHandle channel, ICoreSessionHandle session, ReadPreference readPreference, CancellationToken cancellationToken)
   at MongoDB.Driver.Core.Operations.ReadCommandOperation`1.ExecuteAttempt(RetryableReadContext context, Int32 attempt, Nullable`1 transactionNumber, CancellationToken cancellationToken)
   at MongoDB.Driver.Core.Operations.RetryableReadOperationExecutor.Execute[TResult](IRetryableReadOperation`1 operation, RetryableReadContext context, CancellationToken cancellationToken)
   at MongoDB.Driver.Core.Operations.ReadCommandOperation`1.Execute(RetryableReadContext context, CancellationToken cancellationToken)
   at MongoDB.Driver.Core.Operations.AggregateOperation`1.Execute(RetryableReadContext context, CancellationToken cancellationToken)
   at MongoDB.Driver.Core.Operations.ChangeStreamOperation`1.ExecuteAggregateOperation(RetryableReadContext context, CancellationToken cancellationToken)
   at MongoDB.Driver.Core.Operations.ChangeStreamOperation`1.Execute(IReadBinding binding, CancellationToken cancellationToken)
   at MongoDB.Driver.OperationExecutor.ExecuteReadOperation[TResult](IReadBinding binding, IReadOperation`1 operation, CancellationToken cancellationToken)
   at MongoDB.Driver.MongoCollectionImpl`1.ExecuteReadOperation[TResult](IClientSessionHandle session, IReadOperation`1 operation, ReadPreference readPreference, CancellationToken cancellationToken)
   at MongoDB.Driver.MongoCollectionImpl`1.ExecuteReadOperation[TResult](IClientSessionHandle session, IReadOperation`1 operation, CancellationToken cancellationToken)
   at MongoDB.Driver.MongoCollectionImpl`1.Watch[TResult](IClientSessionHandle session, PipelineDefinition`2 pipeline, ChangeStreamOptions options, CancellationToken cancellationToken)
   at MongoDB.Driver.MongoCollectionImpl`1.<>c__DisplayClass67_0`1.<Watch>b__0(IClientSessionHandle session)
   at MongoDB.Driver.MongoCollectionImpl`1.UsingImplicitSession[TResult](Func`2 func, CancellationToken cancellationToken)
   at MongoDB.Driver.MongoCollectionImpl`1.Watch[TResult](PipelineDefinition`2 pipeline, ChangeStreamOptions options, CancellationToken cancellationToken)
   at SeriMongo.Services.LogMonitorService.<StartMonitoring>b__5_0() in E:\Desktop\SourceCode\serimongo-master\SeriMongo\Services\LogMonitorService.cs:line 58

Thanks a lot so far! Let me know if you need any more information.

Sorry, I haven't merged it yet.
I'm using this branch: update-dependencies.
Do you want to checkout that branch and try the wiki instructions, or you prefer to wait until I merge this to master?
Those Samples\SerilogSample and Samples\SeriMongoDesktopClient projects are gone in the latest version.
I have left only these projects now:

The available projects in the latest version are:

Project
Description

SeriMongo.Server.csproj
API and SignalR server

SeriMongo.WebUI.Angular.cproj
Angular CLI project creates from VS 2022 template to enable running in VS 2022 more easily

Serilog.Sinks.MongoDB.Sample.csproj
Sample ASP.NET Core API project with Serilog and Serilog.Sinks.MongoDB with dynamic log level support

This week I'll edit the tutorial to clarify these pain points.
I am very grateful that you are trying to use this and helping me figure out where I can improve it.

That's my bad, you mentioned that :x I used the right branch this time.
However, not much luck yet, starting the angular project error's out:

If you want, I have a very lengthy visualstudio-js-debugger.txt file.
I've launched both the API and the Angular project at the same time, same outcome, I've launched the Angular project from VS Code, same outcome. I modified all config files/secrets according to the wiki. Am I correct in thinking there's no way to provide an external db connection in the Angular project, only in the API? I can't set secrets in VS either.
What's the relationship between SeriMongo.Server and SeriMongo.WebUI.Angular? Do they require each other, or are they seperate tools?
Afterwards, I tried using docker-compose, and that worked - as in, I can get to the :4200 interface, which is awesome. But it's not connected to the db I provided in the .env file, it looks like the provided mongodb (I think?). How can I force it to use my external db? And there's no way to set a collection name, right?
Sorry if I'm making obvious mistakes, this is the first time I'm tinkering with an Angular project. Thanks for your help! It's been very educational so far.


Build Template UI - Testing Devices Not Shown Bug

fixed a bug that would cause the testing devices to not show up when Selected Devices and Simulators was selected and an existing build template already had some ids selected - it was caused by an extra call on startup to a method that would clean the selected devices when a scheme was changed. fixed with a hack.

Fixes #123


build: remove travis (we're using GitHub actions).

Also update the README.md badge.
Checklist

[x] The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
[ ] Links to related issues (if applicable)
[ ] Tests for the changes have been added/updated (if applicable)
[x] Docs related to the changes have been added/updated (if applicable)

Also bypass docker images building for doc-only changes?

done


Fido keys are not working (NotAllowedError)

OS/Platform
Debian, Ubuntu, and derivatives
Installed
Flatpak
Version
Version 112.0.5615.165 (Official Build, ungoogled-chromium) (64-Bit)
Have you tested that this is not an upstream issue or an issue with your configuration?

[ ] I have tried reproducing this issue in Chrome and it could not be reproduced there
[X] I have tried reproducing this issue in vanilla Chromium and it could not be reproduced there
[x] I have tried reproducing this issue in ungoogled-chromium with a new and empty profile and it could not be reproduced there

Description
My yubikey is not working with ungoogled chromium
How to Reproduce?
Go to pretty much any site where fido authentication is supported. Register the account and try adding (or login with your existing account) with your key. The authentication fails.
I got a YubiKey 5 and try to login on my gitlab (https://gitlab.bixilon.de). It also fails with other tools like checkmk. This is not a gitlab issue.
Actual behaviour
It fails with:
There was a problem communicating with your device. (NotAllowedError)

Expected behaviour
Get logged in
Relevant log output
No response
Additional context
The key is working in firefox and original chromium. Tried it on different websites (e.g. https://demo.yubico.com/webauthn-technical/registration) with 2 different keys

Try this:
flatpak kill com.github.Eloston.UngoogledChromium
flatpak override --user com.github.Eloston.UngoogledChromium --socket=pcsc

then test if it fixed it for you and get back to us!

Yes, that seems to work!
Can we add that by default?

Of course, I'll approve it as soon as the test build is done.

This issue could be closed now.

Thanks for the help!


2FA (TOTP) support

See #4373
Issue #996
CC: @nlhkabu

@ewdurbin @di @brainwane I think we're ready to do an initial review here!
We should be at 100% coverage, and the basic flow for TOTP-based 2FA is present: users can add and remove a TOTP secret from their account, provision a device, and are prompted to enter a TOTP code upon login. Recovery codes haven't been added yet; my current plan is to add them in a separate PR, but I'm open to changes to that.
Here are some things I'd like to also handle in this PR:

QR code generation. Right now only a provisioning URL is shown; I was going to take a look at @mschwager's work in https://github.com/pypa/warehouse/pull/4618 and adapt it this implementation.
Integrating @nlhkabu's proposed authentication UI in #5587 and additional management UI (no issue yet).

This changeset is getting pretty big, though, so I can look at splitting it apart to make reviewing easier. Let me know what you think.

I am curious if there is a case to be made for separating this from the User model except by relation.

Yeah, I think so. Looks like the current email relation will be a good reference for this 😄

Alright! We've got QR generation:

The provisioning URI is also placed in the <canvas>'s aria-label attribute, for accessibility purposes.

Hi all, after getting CI passing yesterday, I began designing a solution for one of the outstanding features to be implemented: password reverification before TOTP can be disabled. The idea is that when a user disables TOTP, they are decreasing their security, so we want to ensure they are actually the owner of the account before doing this. The initial solution I've come up with involves the following flow:

User clicks the "disable" button, submits the form on the account settings page
That submits to /manage/account/totp-provision, which does the username check (current behavior)
User is redirected to normal login flow. They enter their username and password and reauthenticate.
(Optional/undecided) They are redirected to TOTP reauthentication. They enter a valid TOTP code.*
After valid reauthentication, server generates a signed "reauthentication  token" with the user id and timestamp, sends it to the client. Server stores no state.
User is then redirected to an endpoint that actually handles the TOTP disabling. Endpoint verifies there is a valid reauthentication token, the user id within matches the current session, and the timestamp is not too old. If those pass, it then finally disables TOTP for the user id.
User is redirected to the account management page.

feedback welcome!
*the question of whether to require 2FA during the process of disabling 2FA is an open one, and is in many ways a UX question. If a user is disabling 2FA because they lost their device, we may not want to require a code. Requiring this really only seems necessary if we anticipate a threat model where an adversary has access to an active session and knows the user's password.

Thanks @mossberg! I'm going to start merging your changes in https://github.com/trailofbits/warehouse/tree/tob/otp-model-refactor into this branch 😄

NTS: 3ca936d will probably break a few of the services unit tests due to changes in the way we access the TOTP secret and provisioning status.

Summarizing the discussion @ewdurbin and I had about requiring 2FA to disable 2FA:

We don't want the user to use the second factor that they're trying to remove, since it's common enough for people to lose TOTP applications and hardware tokens. We'd actually be decreasing the security of an account by refusing to let a user remove a second factor that they know is lost/compromised.

If a user has multiple second factors, we could choose one of the ones not selected for removal for confirmation. This has a (slight) security benefit, in that it requires the user to prove that they have the authority to log in fully before they can strictly decrease the security of the account. A quick survey of websites shows that most don't do this, since they treat a fully authenticated user as knowing what's best for their 2FA settings.

Regardless of the above, we should ensure that the user must affirmatively request that a second factor be removed. GitHub's current MFA UI/UX, while otherwise excellent, is a perfect example of how we don't want to do this: they allow the user to click a single red trashcan button to remove a second factor.

Replaced the dual state (totp_secret + totp_provisioned) with a combination of a short-expiry signed cookie and just a totp_secret column. Extant unit tests should be passing (and should be simplified in many places), although I'll need to add a few more to handle new cases.

Ping @ewdurbin @di @dstufft -- I think this is ready for your review!

Thanks @webknjaz!

Alright, issue_name change done. I've also added a <noscript> block to the TOTP provisioning page, which just displays the provisioning URI for users whose clients won't render the QR in Javascript.

This might be a silly question, but is there a reason we're generating the QRCode in Javascript, which requires the user to have JS enabled, versus doing it in Python using something like the qrcode library? Our JS testing story is not great in general, so putting as much work into Python seems like the better overall play to me.

I just want to add that there's even services where you can put data right into the URI and put that into an <img> tag. Like Google Charts. So this can be done even without any backend code if needed.

I just want to add that there's even services where you can put data right into the URI and put that into an <img> tag. Like Google Charts. So this can be done even without any backend code if needed.

I'd prefer if we generated the QR codes ourselves rather than sending TOTP secrets to a third-party service.

This might be a silly question, but is there a reason we're generating the QRCode in Javascript, which requires the user to have JS enabled, versus doing it in Python using something like the qrcode library?

Not a silly question! I cribbed the QR code generation from @mschwager's work in #4618, but two reasons stand out to me:

No need to generate an image file, serve it, and remember to destroy it on the server side. As such, we minimize the chances of accidentally storing/caching the image (which contains the TOTP secret) somewhere unintended.

Maybe Warehouse/Pyramid already has primitives for exactly this purpose? If so, we could use those.
To avoid the generate-save-destroy cycle, we could use an inlined base64-encoded image. I don't know of any particular downsides to this, other than finding it a little clunky compared to a <canvas>. Data URIs are also apparently not a strong-point for consistent behavior across browsers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs

I generally trust client-side Javascript rendering into a <canvas> more than I trust Python + potentially native code (Pillow) rendering into a PNG/SVG. This is a little bit irrational on my part, since the input in question (the provisioning URL) is almost entirely server controlled and Pillow's security record is nowhere near as bad as ImageMagick's.

There's also a (minor) accessibility perk: we currently get ARIA compatibility for free because we need to send the provisioning URI for QR generation on the client side. If we generate the QR on the server side, we'll need to special-case that sending. But that's not hard to do at all.

Sounds like we're waiting on a decision from @ewdurbin and @di on the QR code generation? Is that something we could decide easily to change later, so we can get this merged and start running tests on test.pypi? (Ok if the answer is no!)

Discussed with @di and QR codes should be generated within the Python codebase and returned to the user.
I'd recommend https://pypi.org/project/PyQRCode/ with https://pypi.org/project/pypng/ for generation rather than something based on PIL/Pillow.
As far as the machinery goes, It might make sense to have a single endpoint that generates the image based on the contents of the signed/timestamped cookie if they are valid. This absolves the need for us to store any images, they can just be rendered on the fly.
Thoughts @woodruffw?

As far as accessibility goes, we can still include the aria elements on the rendered image, right?

I'd recommend https://pypi.org/project/PyQRCode/ with https://pypi.org/project/pypng/ for generation rather than something based on PIL/Pillow.

👍

As far as the machinery goes, It might make sense to have a single endpoint that generates the image based on the contents of the signed/timestamped cookie if they are valid. This absolves the need for us to store any images, they can just be rendered on the fly.

Just to make sure I understand here: are you thinking something like a manage/account/totp-provision/image endpoint that, when hit via the <img>, generates and responds with the PNG data? If so, that sounds good to me.

Maybe land the OTP utility module + base tests as a separate PR and rebase this one?

I'm all for this, provided that it helps speed up the review & merge process. Will this help on your side @ewdurbin / @di / @dstufft?

Looks good to me - thank you for your work on this @woodruffw.  There are a couple of UI changes I'd like to propose, but I think it will be much, much easier to make a separate PR for these later :)

Yay!

#5795 is the successor to this PR.


Error installing the plugin - Native linking failed

I have VS 2019 16.3.7
I created a new project Mobile App (Xamarin.Forms) Master/Detail And & iOS
Xamarin.forms <IP_ADDRESS>7036
Run the iOS project and everything working...
I installed Plugin.FirebasePushNotification 2.3.6
And I get these errors:
App9.iOS
Native linking failed. Please review the build log:
1>------ Build started: Project: App9.iOS, Configuration: Debug iPhoneSimulator ------
...
1> Connecting to Mac server 192.168.x.xx...
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2002,5): warning MSB3341: Could not resolve reference "C:\Users\ruben\AppData\Local\XamarinBuildDownloadCache\FInstncID-3.2.1\Frameworks\FirebaseInstanceID.framework". If this reference is required by your code, you may get compilation errors.
1> No way to resolve conflict between "System.Runtime.Serialization, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Runtime.Serialization, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Runtime.Serialization, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "System.Numerics" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
1> App9.iOS ->

If I install version 2.3.5 I don't get the linking error

Please test this beta and let me know if solves your issues: https://www.nuget.org/packages/Plugin.FirebasePushNotification/3.0.1-beta


Deleted homebridge in Home app, some accessories persist and can't be deleted

I deleted homebridge, the hub, from the iOS 10 Home app, some sensors from the homebridge-people plugin are still there and I can't delete them. Also, I don't plan on running Homebridge again in the near future, but trying to run it again gives some errors (see screenshots). Any solutions?
Screenshots:

Looks like there is already a running  homebridge-instance and you tried to start it twice...?

Looks like there is already a running  homebridge-instance and you tried to start it twice...?

Could be. How can I delete the leftover sensors?

Could be. How can I delete the leftover sensors?

On your pie go to home bridge directory and remove the accessories
cd /home/pi/.homebridge
sudo rm -r persist/
sudo rm -r accessories/


Plugin Config Loader

Please answer these questions before submitting your issue.

Why do you submit this issue?

[ ] Feature or performance improvement

Requirement or improvement

Please describe about your requirements or improvement suggestions.

A spi interface to load plugin config
implementation

define a interface called Plugin Config
define a spi interface to load Plugin Config(all config schema is defined by submitter)
define a container to contain the plugin config,for example Map<class extends config loader spi,Plugin Config>
the container is shared with all agent plugins

define a interface called Plugin Config

Why do you need this? I think any class is suitable for Config initialization.

define a container to contain the plugin config,for example Map<class extends config loader spi,Plugin Config>

Read SnifferConfigInitializer#initialize. You just need a little refactor about this, and support to set a new Config Class. Such as providing a new method public static void initialize(String agentOptions, Class<?> config).

ok,i read this code first


Coinbase::Wallet::InvalidRequestError: Invalid currency (BTC-USD)

Hello,
I tried to use the examples in the documentation but I got this error:
Coinbase::Wallet::InvalidRequestError: Invalid currency (BTC-USD)
/Users/etagwerker/.rvm/gems/ruby-2.3.3@coinbase/gems/coinbase-4.1.0/lib/coinbase/wallet/api_errors.rb:29:in `check_response_status'
/Users/etagwerker/.rvm/gems/ruby-2.3.3@coinbase/gems/coinbase-4.1.0/lib/coinbase/wallet/adapters/net_http.rb:36:in `http_verb'
/Users/etagwerker/.rvm/gems/ruby-2.3.3@coinbase/gems/coinbase-4.1.0/lib/coinbase/wallet/api_client.rb:649:in `get'
/Users/etagwerker/.rvm/gems/ruby-2.3.3@coinbase/gems/coinbase-4.1.0/lib/coinbase/wallet/api_client.rb:31:in `buy_price'
/Users/etagwerker/Projects/coinbase-alerter/Rakefile:13:in `block in <top (required)>'

The code that I tried to use:
client.buy_price(currency: 'BTC-USD')
client.sell_price(currency: 'ETH-BTC')
client.spot_price(currency: 'BTC-EUR')

Now it works if I change my code to look like this:
client.buy_price(currency_pair: 'BTC-USD')
client.sell_price(currency_pair: 'ETH-BTC')
client.spot_price(currency_pair: 'BTC-EUR')

Maybe the README is out of date?
Please let me know.
Thanks!

It looks like the docs are correct, but the version available through rubygems is out of date.
So you can do:

client.buy_price which uses BTC-USD
client.buy_price(currency: 'GBP') which uses BTC-GBP (always bitcoin)
client.buy_price(currency_pair: 'ETH-EUR') which gives you full control.

So install with Gemfile, and use gem 'coinbase', github: 'coinbase/coinbase-ruby' and it should work.

I went for

gem 'coinbase', :git => 'https://github.com/coinbase/coinbase-ruby.git', :ref => '51780c7b7e65adc805e061926b1138db83b7bcb1'
in case the gem gets updated and breaks something, I'm frozen on that commit SHA.

@colinbm example is correct, but the docs are not. client.sell_price(currency: 'ETH-BTC') but that'll fail even with the newest version because it tries to create the string 'BTC-ETH-BTC' by appending whatever you pass in to a 'BTC' prefix. It only takes the currency pair as is if you use the currency_pair param. The ruby gem is out of date and doesn't support currency pairs at all, only BTC-USD.

Apologies for the delay. Version 4.2.0 has been released!


unexpected "props" behavior

Given graphable.js:
import stampit from 'stampit';
import {DepGraph} from 'dependency-graph';

const Graphable = stampit.convertConstructor(DepGraph);

export default Graphable;

and:
import stampit from 'stampit';
import Graphable from './graphable';

const Thing = stampit({
  init() {
    this.depGraph = this.depGraph || Graphable();
    this.depGraph.addNode('foo'); // <--
  }
});

const thing = Thing();

The line marked with the arrow will not throw an exception.
However, changing the second snippet to the following will throw an exception at the line marked with the arrow (this.depGraph.addNode is not a function):
import stampit from 'stampit';
import Graphable from './graphable';

const Thing = stampit({
  props: {
    depGraph: Graphable()
  },
  init() {
    this.depGraph.addNode('foo'); // <--
  }
});

const thing = Thing();

this.depGraph.addNode evaluates to undefined.  Properties set by the original DepGraph constructor function are present.
A different "deep cloning" method results in an object with such a function:
typeof require('lodash').cloneDeep(Graphable()).addNode // function

Where'd the prototype go, and why?

stampit is using _.merge not _.clone.
$ node
> function F(){}
undefined
> _.merge({}, {foo: F});
{ foo: { [Function: F] } }
> var f = new F();
undefined
> _.merge({}, {foo: f});
{ foo: {} }

Anything you believe can be improved in this regards?
P.S. Sorry for the late reply. Was on a business trip.

@koresar from the API docs:

@param {Object} [options.props] An object to be deeply cloned into each newly stamped object.

So, yeah, it should do what it says it does. :smile:

Oh, bloody wording! I'll fix that doc. ☺
On Mon, 7 Mar 2016 05:06 Christopher Hiller<EMAIL_ADDRESS>wrote:

@koresar https://github.com/koresar from the API docs:
@param https://github.com/param {Object} [options.props] An object to
be deeply cloned into each newly stamped object.
So, yeah, it should do what it says it does. [image: :smile:]
—
Reply to this email directly or view it on GitHub
https://github.com/stampit-org/stampit/issues/198#issuecomment-192950497
.

My bad.

Lame.  I wanted it to deeply clone.  Maybe move any further chatter to stampit spec org?

@ericelliott while you are online, could you please jump to the Gitter chat or Twitter DM? There is a question for you there. Thanks!

(is it a shallow clone at this point?)

It's a deep merge as in _.merge.

Fixed https://github.com/stampit-org/stampit/blob/master/docs/API.md


IAM role overlay (EOR/AND/OR) for dual landing zone (KCC + TF) single organization configs - super admin and TF/K8S service accounts

shadow: https://github.com/GoogleCloudPlatform/pbmm-on-gcp-onboarding/issues/321
Use Case

deploying both KCC and TF GCP landing zones will intersect along organization level (org policies and IAM roles) - these need to be prioritized around their overlap.

Requirements

enumerate the IAM roles required for both super admins and service accounts that bootstrap and deploy both the KCC and TF versions of GCP landing zones.
describe in both the bootstrap sh scripts - the 3 AND (intersection),  the EOR (the reverse of AND) and the OR (total) IAM coverage

see #534
KCC organization Admin
root_@cloudshell:~ (kcc-kls)$ gcloud organizations get-iam-policy $ORG_ID --filter="bindings.members:ro...ems" --flatten="bindings[].members" --format="table(bindings.role)"
ROLE: roles/accesscontextmanager.policyAdmin
ROLE: roles/billing.admin
ROLE: roles/billing.projectManager
ROLE: roles/iam.securityAdmin
ROLE: roles/iam.serviceAccountTokenCreator
ROLE: roles/logging.admin
ROLE: roles/resourcemanager.folderAdmin
ROLE: roles/resourcemanager.organizationAdmin
ROLE: roles/resourcemanager.tagAdmin
ROLE: roles/securitycenter.admin
ROLE: roles/storage.admin

 gcloud organizations add-iam-policy-binding $ORG_ID  --member=user:$EMAIL --role=roles/iam.serviceAccountTokenCreator
 gcloud organizations add-iam-policy-binding $ORG_ID  --member=user:$EMAIL --role=roles/resourcemanager.folderAdmin
 gcloud organizations add-iam-policy-binding $ORG_ID  --member=user:$EMAIL --role=roles/orgpolicy.policyAdmin
 gcloud organizations add-iam-policy-binding $ORG_ID  --member=user:$EMAIL --role=roles/resourcemanager.projectCreator
 gcloud organizations add-iam-policy-binding $ORG_ID  --member=user:$EMAIL --role=roles/billing.projectManager
 gcloud organizations add-iam-policy-binding $ORG_ID  --member=user:$EMAIL --role=roles/accesscontextmanager.policyAdmin
 gcloud organizations add-iam-policy-binding $ORG_ID  --member=user:$EMAIL --role=roles/billing.admin
 gcloud organizations add-iam-policy-binding $ORG_ID  --member=user:$EMAIL --role=roles/logging.admin
 gcloud organizations add-iam-policy-binding $ORG_ID  --member=user:$EMAIL --role=roles/resourcemanager.tagAdmin
 gcloud organizations add-iam-policy-binding $ORG_ID  --member=user:$EMAIL --role=roles/securitycenter.admin
 gcloud organizations add-iam-policy-binding $ORG_ID  --member=user:$EMAIL --role=roles/storage.admin

KCC Service Account


Support for ios() iosX64() architecture missing all libraries for those are not published

Hello,
I want to use this library in my project which has support for following architectures:
         iosX64()         iosArm64()         iosSimulatorArm64()
    but this library gives error which used in my KMM project. Error stack

     ```

Task :widget:compileKotlinIosSimulatorArm64 FAILED
e: Could not find "org.jetbrains.kotlin.native.platform.CoreFoundationBase" in [/Users/Documents/felix, /Users/.konan/klib, /Users/.konan/kotlin-native-prebuilt-macos-aarch64-1.7.21/klib/common, /Users/.konan/kotlin-native-prebuilt-macos-aarch64-1.7.21/klib/platform/ios_simulator_arm64]

FAILURE: Build failed with an exception.

I found the actual reason for the error.
paging library 3.1.1-0.2.0 is using kotlin version 1.8.10. My app is configured for kotlin version 1.7.21 thus creating this issue. Verified above conclusion by setting kotlin version in toml file as 1.7.21 in repo-search sample.
There are 2 solution / work around for solving this issue:
Solution 1:
Update kotlin version of your project to 1.8.21 or above and you'll not face issue in running on iOS for above architectures as well.
Solution 2:
* use implementation("app.cash.paging:paging-common:3.1.1-0.1.1") in grade file
* also put optIn("androidx.paging.ExperimentalPagingApi") inside grades sourceSet
    Above steps solves issue in iOS but creates problem in android if you are using RemoteMediater by overriding this class.
    Solution to fix this issue:
   * Fork this repo
   * Check a with tag 3.1.1.-0.1.1
   * Create a new branch fro this tag
   * cherry pick commit from https://github.com/cashapp/multiplatform-paging/pull/46/files
   * publish it as 3.1.1-0.1.2
   * use implementation("app.cash.paging:paging-common:3.1.1-0.1.2") in grade file

Thanks for the report. Out of curiosity, is there a practical reason for not just upgrading your project to use Kotlin 1.8.21?

@veyndan there was some syntax related issue and also some 3rd party libraries issue in my project; to be able to update to Kotlin v 1.8.21. Anyways will be solving those issue and working towards updating to latest version.
Meanwhile you can update the readme of this repo:
Minimum kotlin version supported for this library is 1.8.21 to be able to use in iOS

Closing this one out. Hopefully, if anyone is facing a similar issue, they'll come across this issue and see your workarounds listed above 😄


No Documentation?

No Documentation? You have to write it as quick as possible!

I will release a fully documentation in the next update, but probably something before may will kick in, but who knows

I didn't care about the wiki page.
It is written down in the code...
BUT I will write it

Now you can see the most useless documentation ever existed on this planet in the wiki section.


The RDLC reports printout is blank in version Microsoft_Application_13.0.24234.0 and Microsoft_System_13.0.12929.0

Reports in an Extension
All my report s worked fine in version Microsoft_Application_12.2.23097.0 and Microsoft_System_12.0.12928.0
After upgrade to version Microsoft_Application_13.0.24234.0 and Microsoft_System_13.0.12929.0 all my reports is blank nothing is printed (looks the same as you don’t have any RDLC)

The issue has been fixed in starting from the image bcinsider.azurecr.io/bcsandbox-master:13.0.24239.0
Please remember to update the AL extension to version al-2.0.41872.vsix, since the root cause was in the .app packaging code.


Add suport of eruby filetype in basic tag rule

This requests adds support basic rules for eruby filetype which used in Ruby on Rails erb  html template files.

Thank


miss cond when dateRange is null

https://github.com/turms-im/turms/blob/c293fecedf66ffba4758f9de0f90160b3278ca7f/turms-service/src/main/java/im/turms/service/domain/group/repository/GroupRepository.java#L104
miss cond when dateRange is null, will count all groups

Thanks for reporting this bug! The latest docker images and code of turms servers contain the bugfix, and you can pull them currently.


Fix an unsigned int overflow issue

UBsan detected: unsigned integer overflow:<PHONE_NUMBER> * 2 cannot be represented in type 'uint32' (aka 'unsigned int')
adjust compilation options

Shall I upload the wasm binary file as a regression?


Arch PKGBUILD

This software is pretty useful. I've been using it on a few of my Arch systems for a bit and I think it would be pretty convenient if there was a package for it on the AUR.
Would you mind if I created an AUR package for it? I was thinking of something along the lines of xswm-git. I can maintain it of course.

Sure no problem. Go ahead if you are willing to maintain it. I was thinking of creating an AUR-package myself but don't really have time atm. Let me know if you do it. Did you encounter any bugs so far?

I have not encountered any bugs. It's been pretty stable so far. The autostart.sh functionality is very useful.
Here's the package. I only made a -git package since the repository isn't using tags and it's very easy to compile from source. The only additional thing this package does is install xswm.desktop to /usr/share/xsessions for use with login managers.
https://aur.archlinux.org/packages/xswm-git

Cool thanks. I will use it in the future myself. I guess it can be closed now.


lpc55-builder: Use GDB server CLI

Previously, we used the JLinkGDBServer binary that links against the outdated Qt4.  This patch replaces it with JLinkGDBServerCLExe that is included in the same bundle to get rid of the EOL Qt4 dependency and to make sure that we always use CLI mode. (JLinkGDBServer sometimes runs in GUI mode and sometimes in CLI mode depending on the exact version and setup.)

No significant changes.

Insignifcant changes

metric
value

change

binary-size-nk3am
1,366,816
:white_circle:
+0 (+0.00%)

binary-size-nk3am-test
1,877,408
:white_circle:
+0 (+0.00%)

binary-size-nk3xn
491,864
:white_circle:
+0 (+0.00%)

binary-size-nk3xn-test
539,128
:white_circle:
+0 (+0.00%)

binary-size-nkpk
709,650
:white_circle:
+0 (+0.00%)


feat: driver function snippets

Fixes #2176

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

1 of 74 (1.35%)  changed or added relevant lines in 5 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.1%) to 24.583%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

lib/ZwaveClient.ts
0
1
0.0%

src/apis/ConfigApis.js
0
4
0.0%

snippets/clone-config.js
0
12
0.0%

app.ts
0
56
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.1%

Covered Lines:
3689

Relevant Lines:
15853

💛  - Coveralls


[Feature Request] Save back to original file format

Allow the quick saving of the currently selected frame to a PNG/JPG file without having to use  export mechanism. If the frame was imported from a PNG/JPG save back to the original file. This would allow Piskel to be used for Minecraft image work such as blocks, items, wrap textures for armor, mobs, entities, animated textures, etc.
How it would be used with an existing file:

User is opens a PNG/JPG in Piskel
User makes changes to the PNG/JPG file in Piskel
User clicks the "quick save" button to save the changes to the file.

How it would be used with an frame created in Piskel

User selects a frame with an image
User clicks the "quick save" button to save the selected frame to disk
User selects the saved file format (PNG/JPG)
System file browser opens and the user selects the folder and then file name
From that point on the "existing file" logic from above would come into play.

I will need to do something wimilar for https://github.com/piskelapp/piskel/issues/805
:)

How about:
If frame was imported image - have piskel store metadata about its original path in the frame. When quicksaving - write the changes back to the original file.
If frame was created inside piskel, create a new file - trying to guess the path:

If there are other imported frames- use the path of the one found first
if not- save it to the desktop

I like it.

@blurymind So is there any progress on this feature?

This is something that you can kind of get when using it in Gdevelop already :) I have no plans to add it to standalone piskel. Still trying to get my previous prs merged

:'(

maybe somebody else will address this and do a PR :) remember I am not the main dev of this app and can't even get a PR merged yet. I want the feature too

I must also note to any non-developers that this feature requires a kind of a file system access that piskel as a web app cannot have for obvious security reasons. (imagine if any website could overwrite files on your file system)
In order to implement it, one must add nwjs specific code. The way my wrapper does it in Gdevelop relies on the fact the user is running it in electron with nodejs.
You can thumb me down all you want, the feature wont appear on this branch without the official dev's support

So why don't you just not worry about getting things merged? Just make all the new things on your repo. (I am not asking about this because I think I will still get this feature I am just wondering)

Because I want to have one codebase, not spread features across forks. My fork has already deviated a lot from this one

Here is my wrapper code in case somebody is interested to implement this
https://github.com/4ian/GDevelop/blob/master/newIDE/app/public/external/piskel/piskel-main.js
it uses node's fs and path, which are only available when running from electron/nwjs
If you want to import them in piskel's desktop version without crashing the web app, you might need something like
https://github.com/4ian/GDevelop/blob/master/newIDE/app/src/Utils/OptionalRequire.js
and also check if the imported fs/path are truthy before using them

actually piskel already uses fs
https://github.com/piskelapp/piskel/search?q=fs+%3D&unscoped_q=fs+%3D
this might be less work that I thought

@blurymind i am guessing fs is only available in the desktop app? (i.e. when you have access to the fs [file system])

@blurymind i am guessing fs is only available in the desktop app? (i.e. when you have access to the fs [file system])

Yes that will always be the case :) unless web API starts allowing giving access to the user to enable file system file overwrite. Chrome currently has API preview that is just for developers, which may take years to be approved as a web standard

nice, seeing as I only use the desktop app that is perfect for me :D.


Added support for .S files when building firmware

I wanted to use some AVR assembly sources in an Arduino sketch, and was surprised to see Ino doesn't handle .S files by default.
I think it's a low-impact change and it does what it should, so I was hoping you would consider merging this feature upstream.

Because it seems like Github doesn't show this information clearly, I just wanted to let you know that @joshbode contributed a pull request for my fork later on. His patch completes .S file support by including the options to build them into libraries. https://github.com/aczid/ino/pull/1
I hope this could provide some evidence to the fact that there are real use-cases for this feature, specific though they may be.

:+1:


⚠ Bofrost.de has degraded performance

In fe73bbc, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1177 ms

Resolved: Bofrost.de performance has improved in 67dac47 after 1 hour, 19 minutes.


My repository is misclassified as AMPL

My repository could be tagged as OPL or CPLEX as the language but not AMPL. This is a serious error as AMPL is another company. Please remove this tagging.
https://github.com/IBMDecisionOptimization/Decision-Optimization-with-OPL-CPLEX-samples

Looks like you've put an override in place. Closing.


Best pattern for sharing data between components using useMMKVStorage?

What are the pros/cons of fetching same data in different components using multiple calls to useMMKVStorage compared to passing the data/setter function as a prop from a component higher up the component tree?
I haven't tested it but making multiple calls to useMMKVStorage for the same data opens up the potential to call it with different default values. This seems like a minor reason to favor passing down the data/setters.

@siderakis You can pass the default value in one of the components only. The rest will automatically take up that value. This feature is available in the master branch for now.
npm install https://github.com/ammarahm-ed/react-native-mmkv-storage

At initialization you must call new MMKVStorage.Loader().withPersistedDefaultValues().initialize()


Refactor(ES6) WebpackOptionsApply / sizeFormatHelpers / RecordsIdsPlugin

linting

What kind of change does this PR introduce?
refactor, ES5 => ES6

Did you add tests for your changes?
All existing tests pass

If relevant, link to documentation update:
N/A

Summary

Does this PR introduce a breaking change?
No

Other information
NIL

Thanks


Add set text to source to avoid same name errors

Closes: #1075

What changed?
Add auto to flux sourceRef and app to application sourceRef. This forces the user from being able to use the same name for the two sources. Changes the ref name in flux-user-kustomization-resource.yaml, flux-system-kustomization-resource.yaml, nginx-gitops-deploy.yaml and nginx-gitops-source.yaml.
I do want to point out that the get status output has changed a bit with these changes. It uses the source name so it looks like:
NAME                            READY   MESSAGE                                                         REVISION                                        SUSPENDED
gitrepository/wego-app-nginx    True    Fetched revision: main/f69237519da2d3f242f978c424591d2e1810a023 main/f69237519da2d3f242f978c424591d2e1810a023   False

NAME                            READY   MESSAGE                                                         REVISION                                        SUSPENDED
kustomization/wego-app-nginx    True    Applied revision: main/f69237519da2d3f242f978c424591d2e1810a023 main/f69237519da2d3f242f978c424591d2e1810a023   False

How did you test it?
Manually got an app deployed. Also updated the unit tests. The existing acceptance tests will cover these changes.

Release notes

Documentation Changes

Closing this in favor of https://github.com/weaveworks/weave-gitops/pull/1171


Fix video tag

Closes https://github.com/MicrosoftDocs/office-docs-powershell/issues/6814

Docs Build status updates of commit 03ba7e9:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sharepoint/docs-conceptual/sharepoint-online/connect-sharepoint-online.md
:bulb:Suggestion
View (sharepoint-ps)
Details

sharepoint/docs-conceptual/sharepoint-online/connect-sharepoint-online.md

Line 2, Column 1: [Suggestion-description-missing] Missing required attribute: 'description'.

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

@Kateyanne Please merge this PR. Thanks

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

File
Status
Preview URL
Details

sharepoint/docs-conceptual/sharepoint-online/connect-sharepoint-online.md
:bulb:Suggestion
View (sharepoint-ps)
Details

sharepoint/docs-conceptual/sharepoint-online/connect-sharepoint-online.md

Line 2, Column 1: [Suggestion-description-missing] Missing required attribute: 'description'.

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