Block Executor with Strategies

This PR proposes a block executor interface that allows user-defined strategies for testing out different block packings of transactions. You can see example strategy definitions in basic_strategy, guided_strategy, and random_strategy.
The basic premise of this is that it takes in a block and executes that block. From the caller's perspective, this is no different from executing a normal block.
However, it can also segment that block into different sub-blocks based upon the strategy used in order to provide different segmentations of that same block (given by the schedule function).
You can see examples of how to use this in the new test, and examples strategies under execution_strategies.

Sounds like a great idea to me! Had a brief look and I would suggest remodeling the strategies in the following way:
// Note: this is psudocode

// The high level executor trait.
// The protocol is simple: you take a bunch of transactions, execute them in whatever way you like
// as long as the order is preserved and return the result.
trait Executor {
    fn execute_transactions(&mut self, txns: Vec<Transaction>) -> Result<Vec<Result<TransactionOutput>>>;
}

// A strategy to partition transactions into blocks.
trait PartitioningStrategy {
    fn partition(&mut self, txns: Vec<Transaction>) -> Vec<Vec<Transaction>>;
}

// Wrapper struct to avoid generic impl<T> Executor <T> and potential conflicting impls.
struct PartitioningExecutor<S> { s: S }

impl<S: PartitioningStrategy> PartitioningExecutor<S> {
    fn new(s: S) -> Self {
        Self { s }
    }
}

impl<S: PartitioningStrategy> Executor for PartitioningExecutor<S> {
    fn execute_transactions(&mut self, txns: Vec<Transaction>) -> Result<Vec<Result<TransactionOutput>>> {
        let blocks = self.s.partition(txns);
        execute the blocks and return the results
    }
}

// Defining an executor that puts all transactions into a single block
struct SingleBlockStrategy {}

impl PartitioningStrategy for SingleBlockStrategy {
    ...
}

type SingleBlockExecutor = PartitioningExecutor<SingleBlockStrategy>;

// Defining an executor that puts each transaction into a single block
struct OneTransactionPerBlockStrategy {}

impl PartitioningStrategy for OneTransactionPerBlockStrategy {
    ...
}

type OneTransactionPerBlockExecutor
    = PartitioningExecutor<OneTransactionPerBlockStrategy>;

// Defining an executor that randomly partitions transactions into blocks
struct RandomizedStrategy {
    rng: SomeRng,
}

impl PartitioningStrategy for RandomizedStrategy {
    ...
}

type RandomizedExecutor = PartitioningExecutor<RandomizedStrategy>;

// An executor built by combining multiple executors.
// It will run the same transactions through all executors and return the results if they are all consistent, or err otherwise
struct ComposedExecutor {
    execs: Vec<Box<dyn Executor>>,
}

impl Executor for ComposedExecutor {
    fn execute_transactions(&mut self, txns: Vec<Transaction>) -> Result<Vec<Result<TransactionOutput>>> {
        ...
    }
}

I think this will give us more flexibility and make the code cleaner as you do not have to reason about concepts like workers or combining the results from multiple executors when you don't have to.

just out of curiosity why not use proptest for this?
It should be relatively trivial is it?
it should be a couple of numbers to define blocks and transaction within a block. We can then pick randomly for the number of blocks and randomly for each block to define the number of transactions. Finally we fill each block from the set of allowed transactions (which can be anything) with possibly some distribution across them.
Do we need this?

Good question! One primary reason why I don't think proptest is the best suited here is because we don't just want to pick random block packings, or have them "algorithmically" defined, but also allow "caller-guided" strategies. As an example see the guided_strategy which allows the caller to define how the block should be split up. This should be useful for the future work in functional tests where you want to specify precise settings for which transactions are in a block.

don't know, it feels all of that could be accomplished via "normal" proptest and strategies defined there. Maybe at the end, you end up with something similar but I really think we should look into it and see if we get some stuff for free and be in a better place... though you may have looked at that already...

Your comments made me step back and think a bit a more. I think I agree that proptest could be useful here, and I think it can be used for certain, but not all strategies (e.g. guided_strategy), and for some strategies proptest doesn't really make sense (e.g. basic_strategy). But, strategies aren't limited to being proptests, nor are they limited to being non-proptests in this setting.
In particular, since both PartitionStratey and Execution are traits, the underlying implementation can be using proptest or some other mechanism. The strategies that are defined so far are meant as examples of how to implement and use a strategy, and I'll look at implementing a couple with proptest.

@bors-libra r=dariorussi

:pushpin: Commit f695fab has been approved by dariorussi

:hourglass: Testing commit f695fabdaa68d7791bf25d20ec397d552b81bf3d with merge 5af0797b7d995c2b42259de3d4d14d04fb2393c6...

:sunny: Test successful - checks-actions_land_blocking_test, checks-circle_commit_workflow
Approved by: dariorussi
Pushing 5af0797b7d995c2b42259de3d4d14d04fb2393c6 to master...


Merge V0.4-Refactor-And-Cleanup

Refactor and clean code base. Fixes #45

Coverage increased (+6.7%) to 76.61% when pulling b722c1c2ab91b1432c2d10197d73db0fcdcc0f28 on V0.4-Refactor-And-Cleanup into 0bc2ad0073661aa394db793909df086a0395bcac on V0.4.

Fixes #71

Fixes #45


Add forms to my views

Blog app - Add forms 💎
In this PR, I worked on the following:
1⃣ I created a method called current_user in my ApplicationController to make current user data available to all controllers

Which will return the first user from the database.

2⃣ I create forms to perform the following functions:

Creates a Post on behalf of the current_user
Creates a comment on behalf of the current_user

3⃣ I created like buttons for each user's post to add likes to the post.

Status: Invalid 🔴
Hi @altontonn 🙋♀,
While you made a great effort in this project, I can't review your code.
Invalid Code Review Request
You have submitted a project, that is not professional. Here are key points to consider when documenting your README.

The only optional section is the FAQ section. ✔
However, since you deleted the FAQ section, it would be best if you also removed it from the table of contents.

All main headers from the README template should be present. ✖
Please restore the Key Features and Future Features sections and make sure that they have [1-3] features listed.

Future Features section should include 1-3 potential features to be added. ✖

Each section description should be removed and replaced with their custom content. The section descriptions are meant to guide you in documenting your README. They are not meant to be part of the final documentation. ✖
i.e

The template logo should be removed. Optionally, the Microverse logo can be replaced with your own project logo if you have one. ✖

There should not be any blank sections that do not have content. ✖

There should not be any broken links in the README file. ✔

Your Code Review Request will be marked as invalid in your Dashboard, so please submit a new one once you are ready 🙏
Cheers 🥂  and Happy coding!!! 👯
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Remember to tag me @KDlamini  in your question so I can receive the notification.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.

Invalid Code Review Request does not count into the code reviews limit.


Loading in a model with Prioritized Experience Replay causes uninitialized model?

Hello,
I found that when i load in my model as shown in the examples in the documentation that my model starts of uninitilized.
I assume this out of:
Probability [0.34276846 0.31248772 0.34474385]
Probability [0.3427647  0.312495   0.34474024]
Probability [0.3427545  0.31251618 0.3447293 ]
Probability [0.3427277  0.3125703  0.34470204]
Probability [0.34271523 0.31259626 0.34468853]
Example above illustrates the output of a DQN policy, this behaviour occurs throughout the entire run or occurs in small segments of the run.
I was thinking this was due to my custom environment being buggy, however i debugged that everything is working accrodingly as it does when training the model. When training the model, nothing goes wrong and the environment just works, however in testing it goes wrong. I have sessions where the trained model just works when loaded, but i also have results where this comes out, the above. I highly assume the model is loaded in uninitilized as i know from experience that the distribution from the start of a trained model is ca [0.4, 0.2, 0.4], usually. With this in mind i can assume there is something wrong. After debugging and finding that my environment seems to just work fine as it is literally just receiving these distributions from the network and using it, i am assuming something is wrong. The action 3, aka the always chosen action represent the action "Do Nothing" where the agent does nothing, i have a terminal steplimit at a 1000 steps, meaning i get a run where the agent does nothing for episodes long. This occured in both LnMlpPolicy and MlpPolicy
I am not 100% where this issue comes from as it comes in 2 forms, either the entire run like this or small segments like this, but since when i am training the model it all seems to work just fine and debugging, i am not sure what or where this bug is coming from as doing nothing gives a 0 reward input and the distribution of the output also do not look OK, However i do thing that atleast part of it comes from the prioritized experience replay, because when i use this it most of the times causes this issue, however i also had sessions where this was still the issue without prioritized experience replay (segments). I get that this would be difficult especially with my custom environment, but again, the training works exactly as intended.
Is there any known issue or thing i am missing out on? It has been "bugging" me all nigh(s) long.
Settings:
{     "double_q": true,     "param_noise": false,     "learning_starts": 1000,     "train_freq": 1,     "prioritized_replay": true,     "prioritized_replay_eps": 1e-06,     "batch_size": 256,     "target_network_update_freq": 500,     "prioritized_replay_alpha": 0.6,     "prioritized_replay_beta0": 0.4,     "prioritized_replay_beta_iters": null,     "exploration_final_eps": 0.02,     "exploration_fraction": 0.1,     "learning_rate": 0.0005,     "gamma": 0.99,     "verbose": 0,     "observation_space": {         ":type:": "<class 'gym.spaces.box.Box'>",

Please include a minimal example code to replicate the issue.
Loading models with load should not leave the "uninitialized", they should match the behaviour they had when they were saved. Make sure you use deterministic=True in the predict function.

Please include a minimal example code to replicate the issue.
Loading models with load should not leave the "uninitialized", they should match the behaviour they had when they were saved. Make sure you use deterministic=True in the predict function.
Edit: Replay memorys are not included in the saved models to reduce space usage on disk.

I will look into making a minimal code example later, but replay memorys that aren't included in the saved models shouldn't cause this behaviour?

but replay memorys that aren't included in the saved models shouldn't cause this behaviour?

Nope, unless you continue training the model, in which case you have lost the previous data you had.

and why is deterministic=True so important here?

Seems like the issue is on "getting different actions than expected", and deterministic=True makes sure you will get same actions for same states.

Hmm indeed the code should work as expected. I would still check the performance of the agent before saving and after loading it by playing fixed number of episodes and compare those. Another way to check it is to check if model parameters match before saving and after loading with model.get_parameters().

Hmm indeed the code should work as expected. I would still check the performance of the agent before saving and after loading it by playing fixed number of episodes and compare those. Another way to check it is to check if model parameters match before saving and after loading with model.get_parameters().

I have a very trustworthy theory about it. I think it is because of the RAM in Google Colab clogging up. I don't know why i haven't seen this happen earlier, but it makes sense. If there isn't enough RAM he won't be able to load in the model properly, atleast that is what i am thinking...

I do not think that is the cause, as memory issues would usually result in fatal crash, unless Colab does something odd. Again, a performance comparison of policies would be a confirmation that something is off.

Yes i realized this would be a strange case if it were to be so, just after i sent it. I will check model.get_parameters() now. What did u mean with testing diffrent policies? like if the same issue occurs on diffrent polices?

By "testing" I refer to running the agents on the environment and collecting episodic rewards (sum of rewards per episode) and comparing the average result between policies. See evaluate_policy.

Hello,
After several tests i discovered that this issue only occurs when loading in a model which has leaky_relu as activation function, and when i say only, i mean only when loading in this activiation function. I don't know why though.

@jandevries123
Could you provide a code to replicate the issue? Sounds like something is not stored/loaded related to activation functions, but as far as I know leaky ReLUs do not have any trainable parameters (only the "leakyness" parameter, which could be trained).

I am really not using any special code, i think.
for i in range(len(filenames)):   print("Evaluating Model", i, "with name", filenames[i])   if filenames[i].startswith('DQN'):     model = DQN.load(filenames[i])       env = gym.make("MyEnv", use_lstm=False)     obs = env.reset()     for i in range(1049307)::         action, _states = model.predict(obs)         obs, rewards, dones, info = env.step(action)         if not _ % 10000:             print(_)

I mean full code to replicate the issue, i.e. the custom policy, training of the model, saving of the model, loading the model and testing it out. A piece of code that, when ran with correct with dependencies installed, should raise up the issue.

jan from another dimension here.
So i found that the unintialized loading problem comes from when i put deterministric to true, aka default when i do i get probabilities that look very unitialized like ca[0.33, 0.33, 0.33] when if i were to do deterministic to false i get the desired values i was looking for like [0.44, 0.1, 0.46], but deterministic causes random actions of course so it is not functional, how comes it does work normal on deterministic false?

I do not see how the deterministic flag could affect the initial parameters. Again, we need the full code to replicate the issue (i.e. "this code should do X but instead it does Y") to be able to tell what could be wrong.

For training i use:
                model = DQN(policy, Env, verbose=verbose, tensorboard_log=("tensorboard/DQN " + str(runs) + "/"), prioritized_replay=prior, batch_size=batch_size, learning_rate=learning_rate, gamma=gamma, policy_kwargs=policy_kwargs, double_q=double_q, train_freq=train_freq)
                model.learn(total_timesteps=timesteps, tb_log_name=run_name)
                model.save(run_name)

then for loading the model i use:"
    model = DQN.load(filenames[i])
    obs = env.reset()
    for i in range(23000000):
        action, _states = model.predict(obs, deterministic=True)
#        print(model.action_probability(obs, actions=None))
        obs, rewards, dones, info = env.step(action)

For completeness and to avoid any confusion, please include one complete code to replicate the issue, including printing out the probabilities of the actions which you have used to debug the issue.

Hello,
sorry for the late response. Here are images of the probability distributions of the output of "bugged" and "working" trained sessions:

As you can see, weird gaps that causes the agent to do nothing. While the could be a coincidence it is far from expected behavior from the agent since doing nothing the entire episode long gives 0 reward. It appears to probably be a bug, however i debugged the state, reward, terminal and all that stuff and nothing seems to be out of the ordinary except the probabilities themselves. I also found out that it is not settings related, it just happens from time to time almost seemingly randomly. How would i further debug this issue and what is causing it? I think it is loading in the model incorrect perhaps? What are your thoughts?

Without knowing more about the environment and other settings it is hard to say if this is expected behaviour or not, but generally you can see sudden dips in performance during training. Again, if you believe this is a bug or an issue in stable-baselines, please share the exact and full code to replicate the issue. Otherwise you can close this issue. Do note that we do not offer technical support.

@hill-a , as requested by @jandevries123 (by email), could you delete this issue? (only the owner of the repo can apparently...)


Add aria-required to list of valid attributes

Using aria-required currently triggers an “unsupported ARIA attribute” warning (AX_ARIA_10) even though it’s actually a valid attribute.
https://www.w3.org/TR/wai-aria/states_and_properties#aria-required

Hey @tedw,
Thanks for reporting. AX_ARIA_10 is a little more specific than just checking a list of valid attributes - it also considers the role (either implicit or explicit!) on the element that has the aria attribute. For example, an aria-required on an <input> will pass the audit, while an aria-required on a <button> or <a role="button"> will fail the audit (because aria-required is not supported on the "button" role).
The following roles support an aria-required attribute:

combobox
gridcell
listbox
radiogroup
spinbutton
textbox
tree

Could you post some of the markup that seems to be failing the audit? Happy to take a closer look.

@jdan Thanks for the quick reply! You’re right, it was because the aria-required attribute was on a checkbox. @WilcoFiers posted a possible explanation here https://github.com/dequelabs/axe-core/issues/158#issuecomment-169616271

As for checkboxes, in a way these element always provide a value (checked or unchecked). I'm guessing that when you mean to make such an element 'required' you intend for it to be checked. This is a common enough use case. The aria-required attribute does not permit a 'null' result. But a checkbox never gives null, it only gives a true or false value.

Would love suggestions for how to indicate the checkbox must be checked. Thanks!

@tedw you should bring this up in the ARIA working group. In the interim, I would suggest that you place the required text in the label of the checkbox e.g.
I agree to the license (required)

Thanks, @dylanb, I'm doing that now and I guess it will have to suffice. Will reach out to some folks on Twitter to see what they have to say before submitting an issue on https://github.com/w3c/aria/.

Right on. I'm going to close this for now, holler if you need anything else!


Document new Dialog CurrentDialog, ExecutedOption and AreOptionsDisplayed

https://github.com/adventuregamestudio/ags-manual/wiki/Dialog
Added static Dialog.CurrentDialog property and non-static ExecutedOption and AreOptionsDisplayed properties.
  /// Gets the currently running dialog, returns null if no dialog is run
  import static readonly attribute Dialog* CurrentDialog; // $AUTOCOMPLETESTATICONLY$
  /// Gets the currently executed dialog option, or -1 if none is
  import static readonly attribute int ExecutedOption; // $AUTOCOMPLETESTATICONLY$
  /// Gets if the dialog options are currently displayed on screen
  import static readonly attribute bool AreOptionsDisplayed; // $AUTOCOMPLETESTATICONLY$

Originally part of a request here https://www.adventuregamestudio.co.uk/site/projects/open/528/
I think CurrentDialog fills the role of the IsDialogRunning function. Probably could use a see also to Speech.SpeakingCharacter, it's a different thing but fills a similar role.
This was added in the PR: https://github.com/adventuregamestudio/ags/pull/2484/commits/ef1c66a0c29650ebd2ed05ad5a4189664bb701aa

documented Dialog.CurrentDialog below
https://github.com/adventuregamestudio/ags-manual/wiki/Dialog/_compare/35686c20b64e754245109a5993a76f649d40a33a...f9a0c1af56d6e837675bb6c21209e37a4d2c24b9

added Dialog.ExecutedOption below
https://github.com/adventuregamestudio/ags-manual/wiki/_compare/f9a0c1af56d6e837675bb6c21209e37a4d2c24b9...db34ebaaa6bd3341d65bb5a8cc6ab7afcf35617f

added Dialog.AreOptionsDisplayed below
https://github.com/adventuregamestudio/ags-manual/wiki/_compare/db34ebaaa6bd3341d65bb5a8cc6ab7afcf35617f...38b08f7827d5a89f9960a19f27ad104c916c9415


Compilation error/warning on parameter name lenght > 15 chars

Hi,
thanks for good job Volodymyr.
It would be nice, to have compilation error/warning info, when a  parameter name is too long (>15 chars).
Best regards,
Jozef

While this would be nice to have, it's probably hard to implement in a portable way


Snowflake Sink 1.9.4 Upgrade

No conflicts.
Added a Streamkap modification: Maven Toolchains support
This helps with building the Connectors using specific JDK versions, regardless of what the developer's local environment or IDEs might be configured to use. See the README for details.

@acristu can you review this by end of day tomorrow, please?
I found it strange we didn't have any conflicts with the schematization changes you made @acristu.

Focus on 2.0.0 upgrade. A 1.9.4 change was reverted in 2.0.0 that controls channel opening/closing. We've seen warnings or exceptions about this in previous releases.


PDOStatement object has not been successfully released

Hello
PDOStatement object has not been successfully released.
Memory leak occurs in the following code.
<?php

$dns = 'sqlsrv:Server=xxx.xxx.xxx.xxx;Database=ms_dbname';
$db = new PDO($dns_old, 'ms_username', 'ms_password', array());
$tables = array(
	'table_name1',
	'table_name2',
	'table_name3',
	'table_name4',
	//…
);

foreach ($tables as $table_name) {
	$sql = "SELECT * FROM \"{$table_name}\";";
	$stmt = $db->prepare($sql);
	$stmt->execute();
	while (($row = $stmt->fetch(PDO::FETCH_ASSOC)) !== false) {
	}
	$stmt->closeCursor();
	unset($stmt);
}

I tried in the following environment.

PHP v7.0.6(Non Thread Safe)
PDO v4.0.4

Looking forward to the next release.
Daisuke Uno

you should use != instead of !== or simply remove "!== false" from condition

@jomisacu Thanks!
I tyied again in the following code, But Memory leak occurs yet.
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {

@sp-ice This issue should be fixed in our RTW release: https://github.com/Azure/msphpsql/releases/tag/v4.0-RTW.
Can you help us verify that it is fixed?

@meet-bhagdev Thanks!
I tyied again on v4.0.6 and verified that it is fixed.


[v1.4] User Guide update

only 1 commit for this PR: 7c4b7bd
Updated in user guide:

checkin
checkout
add

Pull Request Test Coverage Report for Build 443

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 90.395%

Totals

Change from base Build 436:
0.0%

Covered Lines:
2748

Relevant Lines:
3040

💛  - Coveralls

Your PR is still showing old commits made (e.g. add codacy badge, add checkincommand diagram to developer guide)


Support sharing service instances across osb client platforms/tenants

Expected behavior
As an app developer

in order to use the same service instance (say a kafka cluster topic, or a log collection service) across apps deployment in distinct platforms (say CF1 and K8S 2)
I need to be able to share a service instance across osb clients

Observed behavior

Osb API does not support service instance sharing

Alternatives UXs

Sharing opt-in with osb-cmdb tenants
In this UX, an owner of an existing service instance grants a specific 3rd party osb client permission to access a share of its service instance. When a 3rd party service instance then asks to create the service instance with the specified instance correlation key, then a share is used instead
This is a bit similar to CF service instance sharing UX
Step 1: service owner: specifies accepted sharing requests
save the following json in authZ.jsonspecifying sharing authorization
{
  "x_osb_cmdb": {
    "sharing_to": [
      {
        "tenant": "cf1",
        "profile": "cloudfoundry",
        "org_name": "my_org",
        "space_name": "my_space",
        "org_guid": "my_org_guid",
        "space_guid": "my_space_guid",
        "instance_name": "my_instance"
      },
      {
        "tenant": "ks2",
        "profile": "kubernetes",
        "namespace": "my_namespace",
        "originating_identity_groups": "[\"system:serviceaccounts\",\"system:serviceaccounts:catalog\",\"system:authenticated\"]",
        "originating_identity_username": "system:serviceaccount:catalog:service-catalog-controller-manager",
        "service_instance_guid": "a-service-instance-guid"
      }
    ]
  }
}

cf create-service-instance mysql 10mb mydb -c authZ.json
or
cf update-instance mydb -c authZ.json
Details about the sharing_to structure:

each field defines a sharing constraint
all sharing constraints need to match for a lease request to be accepted
some sharing constraints are mutually exclusive: *-name and *-guid. When both are specified (e.g. space-name and space-guid) then *-name (e.g. space-name) are ignored and are considered as documentation commenting the value of *-guid constraints.

*-name constraints may be used among trusted tenants where there is low risk that an attacker can forge a space/org of the same name to obtain a lease without being granted actual permissions. Names are easier to reason with but grant a lower security.
*-guid constraints are used among less trusted tenants, where a service owner needs to actually control exactly the org/space of the leaser (as guid are immutable and hard to inject into osb client platforms). Guids are harder to reason on

Step 2: service leaser: instanciate service instance lease
A distinct user provisions a service instance with all of the matching criteria (tenant, org/space/instance), plus service offering type
# cf login to cf1
cf t -o my_org -s my_space
cf create-service-instance mysql 10mb mydb-share

The status message indicates this is a shared instance (aka a lease)
cf service mydb-share
Showing info of service gberche-pmysql in org diod-gcp-demo-sosh-care / space front-end as gberche...

name:             mydb-share
service:          p-mysql
tags:
plan:             10mb
description:      MariaDB databases 10.3.22 on demand on shared cluster
documentation:    https://mariadb.com/kb/en/library/
dashboard:        https://[..]
service broker:   p-mysql

Showing status of last operation from service mydb-share...

status:    create succeeded
message:   This is a lease from instance in tenant 1 with guid=1234
started:   2020-12-17T15:53:15Z
updated:   2020-12-17T15:53:15Z

Step 2b: service owner: review list of leases
The service owner can obtain a list of leases from a shared service instance:
$ cf service-instance mydb --params
{
<initial service specific params omited >,
  "x_osb_cmdb": {
    "sharing-to":[ ...],
    "leases": [
      {
        "tenant": "cf1",
        "profile": "cloudfoundry",
        "org_name": "my_org",
        "space_name": "my_space",
        "org_guid": "my_org_guid",
        "space_guid": "my_space_guid",
        "instance_name": "my_instance",
        "instance_guid": "my_instance-guid"
      },
      {
        "tenant": "cf2",
        "profile": "cloudfoundry",
        "org_name": "my_org",
        "space_name": "my_space",
        "org_guid": "my_org_guid",
        "space_guid": "my_space_guid",
        "instance_name": "my_instance",
        "instance_guid": "my_instance-guid"
      }
    ]
  }
}

#### Step 3: service owner: fails to delete a shared service instance

The service owner can not delete a shared service instance when there are remaining leases

$ cf delete-service-instance -f mydb
FAILED
Broker Error: service instance can not deleted as it is still shared

[ ] TODO: consider displaying shares in the error message `Broker Error: service instance can not deleted as it is still shared with [ {  "tenant": "cf1",        "profile": "cloudfoundry",        "org_name": "my_org",        "space_name": "my_space",       "org_guid": "my_org_guid",         "space_guid": "my_space_guid",        "instance_name": "my_instance" }`

#### Step 4a: service owner: revokes service sharing permissions

The service owner revokes the service sharing permissions which prevents new leases from being created.

Note that revoking sharing permissions does not delete leases as there is no notification mechanism available to notify platforms of deletion of a shared service instance in order to delete leases.

Save the following json in `authZ.json` specifying sharing authorization:

```json
{
  "x_osb_cmdb": {
    "sharing_to": [    ]
  }
}

cf update-instance mydb -c authZ.json
Step 4b: service leaser: delete lease
The service leaser can always delete a lease
# cf login to cf1
cf t -o my_org -s my_space
cf delete-service-instance -f mydb-lease

Step 5: service owner: unprovision share without leases
The service owner can delete its shared service instance when there are no associated leases
$ cf delete-service-instance -f mydb
OK

Step 5a: service owner: purge leases
The service owner can purge any leases associated to a shared service instance:
$ cf update-service-instance mydb -c
{
<initial service specific params omited >,
  "x_osb_cmdb": {
    "sharing-to":[ ...],
    "leases": [ // one or all leases removed from here
    ]
  }
}

Step 5b: service owner: unprovision share and purge leases
In case the service owner lost control over the leases, he can delete a shared service instance and purging any associated leases. This creates dangling orphan leases that will need to be purged manually by service leasers
Save the following json in authZ.json specifying sharing authorization:
{
  "x_osb_cmdb": {
    "sharing_to": [    ],
    "purge_leases_on_delete": "true"
  }
}

$ cf update-instance mydb -c authZ.json
OK
$ cf delete-service-instance -f mydb
OK

Explicit lease creation using sharing token exchanged out-of-bands
In this UX, an owner of an existing service instance obtains a sharing secret that it provides out-of-bands to a service leaser. The service leaser uses the sharing token to create a lease before the token expiration date.
Step 1: service owner: obtains sharing token
The service owner looks up a sharing token that it may send to another team or use himself to create a service lease
$ cf service mydb --params
{
  "x_osb_cmdb": {
    "sharing_token":
      {
        "token": "123456...",
        "expiration-date": "Mon, 22 Mar 2021 17:42:55 +0100"
      }
     // other osb-cmdb backend service instance params omited
  },
// other brokered service instance params omited
}

$ cf service mydb --params | jq -r .x_osb_cmdb.sharing_token.token
123456...

Step 2: service owner: obtains sharing token
A distinct user provisions a service instance matching the same service offering type and sharing token
# cf login to any other platform
# cf login to cf1
cf create-service-instance mysql 10mb mydb-share -c '{"sharing_token":"123456..."}

The status message indicates this is a shared instance (aka a lease)
cf service mydb-share
Showing info of service gberche-pmysql in org diod-gcp-demo-sosh-care / space front-end as gberche...

name:             mydb-share
service:          p-mysql
tags:
plan:             10mb
description:      MariaDB databases 10.3.22 on demand on shared cluster
documentation:    https://mariadb.com/kb/en/library/
dashboard:        https://[..]
service broker:   p-mysql

Showing status of last operation from service mydb-share...

status:    create succeeded
message:   This is a lease from instance in tenant 1 with guid=1234
started:   2020-12-17T15:53:15Z
updated:   2020-12-17T15:53:15Z

Step 2b: service owner: review list of leases
The service owner can obtain a list of leases from a shared service instance:
$ cf service-instance mydb --params
{
<initial service specific params omited >,
  "x_osb_cmdb": {
    "sharing_token":[ ...],
    "leases": [
      {
        "tenant": "cf1",
        "profile": "cloudfoundry",
        "org_name": "my_org",
        "space_name": "my_space",
        "org_guid": "my_org_guid",
        "space_guid": "my_space_guid",
        "instance_name": "my_instance",
        "instance_guid": "my_instance-guid"
      },
      {
        "tenant": "cf2",
        "profile": "cloudfoundry",
        "org_name": "my_org",
        "space_name": "my_space",
        "org_guid": "my_org_guid",
        "space_guid": "my_space_guid",
        "instance_name": "my_instance",
        "instance_guid": "my_instance-guid"
      }
    ]
  }
}

#### Step 3: service owner: fails to delete a shared service instance

The service owner can not delete a shared service instance when there are remaining leases

$ cf delete-service-instance -f mydb
FAILED
Broker Error: service instance can not deleted as it is still shared

[ ] TODO: consider displaying shares in the error message `Broker Error: service instance can not deleted as it is still shared with [ {  "tenant": "cf1",        "profile": "cloudfoundry",        "org_name": "my_org",        "space_name": "my_space",       "org_guid": "my_org_guid",         "space_guid": "my_space_guid",        "instance_name": "my_instance" }`

#### Step 5: service owner: unprovision share without leases

The service owner can delete its shared service instance when there are no associated leases

$ cf delete-service-instance -f mydb
OK

#### Step 5a: service owner: purge leases

The service owner can purge any leases associated to a shared service instance:

$ cf update-service-instance mydb -c
{
,
"x_osb_cmdb": {
"sharing-to":[ ...],
"leases": [ // one or all leases removed from here
]
}
}
OK

#### Step 5b: service owner: unprovision share and purge leases

In case the service owner lost control over the leases, he can delete a shared service instance and purging any associated leases. This creates dangling orphan leases that will need to be purged manually by service leasers

Save the following json in `authZ.json` specifying sharing authorization:

```json
{
  "x_osb_cmdb": {
    // other params omitted here
    "purge_leases_on_delete": "true"
  }
}

$ cf update-instance mydb -c authZ.json
OK
$ cf delete-service-instance -f mydb
OK

The following table summarizes key differences/implications among the alternative UXs

Actor
Use case
Sharing opt-in
Sharing token

Owner
Control where leases can be created
Explicit via lease constraints
Out-of-band exchange of sharing token with leaser(s)

Owner
Audit traces of granting leases
Platform audits of assigned lease constraints
Hard to control the dissemination of the sharing token

Leaser
Create lease
Implicit, no additional action
Explicit by specifying sharing token before expiration time

Under the hood, osb-cmdb uses:

metadata assigned to service instance to store sharing permissions
provisions shared-service instance when permissions match

Service broker involvements

catalog opt-out or opt-in: a service broker may indicate support for sharing using metadata.shareable in the catalog endpoint
service instance sharing validation: a service broker may choose to accept or reject the creation of a new lease when responding to the PATCH /v2/service_instances/:instance_id endpoint triggered by osb-cmdb (as an equivalent to cf update-service mydb -c '{"x_osb_cmdb": {"leases": [ ...]} }')

e.g. a data-service deployed only in a eu-1a az may refuse to share a service instance with clients in azs eu-2*

brokered service binding metadata (see #104): a broker may assign distinct binding permissions based on instance sharing see enable-sharing.html#binding-permissions

the service broker may return credentials with different permissions depending on which client platform/space an app is bound from. For example, a messaging service may permit writes from the originating client platform/space and only reads from any client platforms/spaces that the service is shared into.
To determine whether the space of the app is the same as the originating space of the service instance, the service broker can compare the context.space_guid and bind_resource.space_guid fields in the brokered binding request available in the metadata propagated by the osb-cmdb

Affected release
Reproduced on version x.y
-->

Pending improvements/fixes to the proposed UX above:

[ ] clarify optional fields in sharing-to structure
[ ] Prototype UX using underlying CF service instance sharing to confirm feasibility, including async and message UX

Hi Guillaume,
After reading this, here is some feedback.
When specifying a sharing authorisation, specifying both Org name and Org GUID might cause confusion whenever they don't match. The same applies for Space name and GUID.
{
  "x-osb-cmdb": {
    "sharing-to": [
      {
        "tenant": "cf1",
        "profile": "cloudfoundry",
        "org-name": "my-org",
        "space-name": "my-space",
        "org-guid": "my-org2-guid",
        "space-guid": "my-space2-guid",
        "instance-name": "my-instance"
      },
      ...

Whenever an Org (or Space) would be renamed, then the Org names/GUIDs specified in authZ.json specs would not match anymore.
In case inconsistent Org name & GUID is supported in authZ.json, this specification would benefit from detailing the algorithm for resolving the exact target Org. Or, just choose one of the fields to rely on. Names are for humans, whereas GUIDs are for machines. Humans need readable things, and machine needs precise references.
Whenever names would be preferred, then the actual GUIDs should be resolved by the broker in some way so that the system is resistant to Orgs renames. This resolving could be made through a read-only access to the target tenant, or through a unique “meta” resolver API that would have read-only access to all tenants.
Whenever GUIDs would be preferred, then humans would need some easy way to convert them into understandable names, just for the sake of verifying that the parameters are correct (useful for debugging).
Best,
Benjamin

thanks @bgandon for your feedback
I refined the sharing optin ux with the following details. Please let me know if this makes sense to you.

Details about the sharing_to structure:

each field defines a sharing constraint
all sharing constraints need to match for a lease request to be accepted
some sharing constraints are mutually exclusive: *-name and *-guid. When both are specified (e.g. space-name and space-guid) then *-name (e.g. space-name) are ignored and are considered as documentation commenting the value of *-guid constraints.

*-name constraints may be used among trusted tenants where there is low risk that an attacker can forge a space/org of the same name to obtain a lease without being granted actual permissions. Names are easier to reason with but grant a lower security.
*-guid constraints are used among less trusted tenants, where a service owner needs to actually control exactly the org/space of the leaser (as guid are immutable and hard to inject into osb client platforms). Guids are harder to reason on

Suggested refinement by @poblin-orange

surface a distinct service offering "service proxy" for leases with the following benefits

avoids stale cached data by client leasers


A person who declares to add second proposal but has not filled their information yet is not visible on the dashboard

What

A person checks "I have already registered" and therefore does not fill the personal information. The result is that they are not displayed on the dashboard, nor added to the newsletter.

Possible fixes

Find a mechanism for the registration form to avoid such mistakes. This is needed in any case
Change the criteria for detecting new users. Not this field of information.

Manage by hand


Implemented push tags action

Implemented command to push all tags.

Nice! Love when it's that simple. Thanks for the contribution :)


404 page nuxt3 html, error in google page speed

Environment
404 page nuxt3 html, error in google page speed
Reproduction
404 page nuxt3 html, error in google page speed
Describe the bug

Additional context
No response
Logs
No response

How I can solve this?

Hey! Could you kindly provide a reproduction? 🙏

https://codesandbox.io/p/github/nuxt/starter/v3-codesandbox?file=%2FREADME.md&workspace=%257B%2522activeFileId%2522%253A%2522cl7rh39as0001lngta5o46xuw%2522%252C%2522openFiles%2522%253A%255B%2522%252FREADME.md%2522%252C%2522%252Fnuxt.config.ts%2522%252C%2522%252Ferror.vue%2522%252C%2522%252Fpages%252Findex.vue%2522%255D%252C%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522gitSidebarPanel%2522%253A%2522COMMIT%2522%252C%2522spaces%2522%253A%257B%2522clf0xu7l10013356jeb8ntoef%2522%253A%257B%2522key%2522%253A%2522clf0xu7l10013356jeb8ntoef%2522%252C%2522name%2522%253A%2522Default%2522%252C%2522devtools%2522%253A%255B%257B%2522key%2522%253A%2522clfparu9t0014356il5hxycr3%2522%252C%2522type%2522%253A%2522PROJECT_SETUP%2522%252C%2522isMinimized%2522%253Afalse%257D%255D%257D%257D%252C%2522currentSpace%2522%253A%2522clf0xu7l10013356jeb8ntoef%2522%252C%2522spacesOrder%2522%253A%255B%2522clf0xu7l10013356jeb8ntoef%2522%255D%252C%2522hideCodeEditor%2522%253Afalse%257D

this nuxt config

https://codesandbox.io/p/github/nuxt/starter/csb-bsfblc/draft/great-dubinsky?file=%2Fnuxt.config.ts&selection=[{"endColumn"%3A1%2C"endLineNumber"%3A66%2C"startColumn"%3A1%2C"startLineNumber"%3A1}]&workspace=%257B%2522activeFileId%2522%253A%2522cl7rh39as0001lngta5o46xuw%2522%252C%2522openFiles%2522%253A%255B%2522%252FREADME.md%2522%252C%2522%252Fnuxt.config.ts%2522%252C%2522%252Ferror.vue%2522%252C%2522%252Fpages%252Findex.vue%2522%255D%252C%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522gitSidebarPanel%2522%253A%2522COMMIT%2522%252C%2522spaces%2522%253A%257B%2522clf0xu7l10013356jeb8ntoef%2522%253A%257B%2522key%2522%253A%2522clf0xu7l10013356jeb8ntoef%2522%252C%2522name%2522%253A%2522Default%2522%252C%2522devtools%2522%253A%255B%257B%2522key%2522%253A%2522clfpaxc6a0016356i7yqm958t%2522%252C%2522type%2522%253A%2522PROJECT_SETUP%2522%252C%2522isMinimized%2522%253Afalse%257D%255D%257D%257D%252C%2522currentSpace%2522%253A%2522clf0xu7l10013356jeb8ntoef%2522%252C%2522spacesOrder%2522%253A%255B%2522clf0xu7l10013356jeb8ntoef%2522%255D%252C%2522hideCodeEditor%2522%253Afalse%257D

how i can solve this please ?

@danielkellyio

@danielroe

Please stop pinging maintainers and be patient
Elaborate what your issue is. The CodeSandbox does not run for me and you didn't add any description. If HTTPS is missing from one of your nuxt pages, you should get an HTTPS certificate or ask your hoster. Platforms like Netlify or Cloudflare will provision certificates for free.


Research feature request: use multi perspective matching instead of cosine similarity for matching

I would like to investigate the use of multi-perspective matching instead of cosine similarity, as outlined  in https://arxiv.org/pdf/1702.03814.pdf。Bilateral. It gave a nice improvement in performance there..

Yes, I'll look into it.

@franzmpub : Is there any status change for this issue ? If yes, could you please update


Bind to logout button?

I put mine down there, but possibly have it as an option to just put the countdown on the logout icon by deafult?

I do the same and have been considering implementing this option when I get the time, @Im2be would you be open to this being added?

For anyone interested I do have a prototype of this working beautifully - still need to handle disabling the infobox when toggling on the render on logout button config and small things like that

Well done. I pretty much don't play anymore so I'll asume you tested it and everything. Thanks for making the PR @m0bilebtw

Yep, it's all good to go! :) Thanks for the quick merge and update PR!


[C++][Parquet] Python] SegFault in pyarrow.parquet.write_table with specific options

I originally filed an issue in the pandas project but we've tracked it down to arrow itself, when called via pandas in specific circumstances:
https://github.com/pandas-dev/pandas/issues/19493
basically using

 df.to_parquet('filename.parquet', flavor='spark')

gives a seg fault if df contains a datetime column.
Under the covers,  pandas translates this to the following call:

pq.write_table(table, 'output.parquet', flavor='spark', compression='snappy', coerce_timestamps='ms')

which gives me an instant crash.
There is a repro on the github ticket.

Environment: tested on MacOS High Sierra with python 3.6 and Ubuntu Xenial (Python 3.5)
Reporter: Clément Bouscasse
Assignee: Joshua Storck](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=joshuastorck) / @joshuastorck
Related issues:

[Python] Parquet segfaults if coercing ns timestamps and writing 96-bit timestamps (Blocked)

PRs and other links:

GitHub Pull Request #456

Note: This issue was originally created as PARQUET-1274. Please see the migration documentation for further details.

Wes McKinney / @wesm:
Here's the backtrace for this:

#0  0x00007fffece34769 in arrow::PoolBuffer::Reserve (this=0x139c180, capacity=1024) at ../src/arrow/buffer.cc:101
#1  0x00007fffece34b2f in arrow::PoolBuffer::Resize (this=0x139c180, new_size=1024, shrink_to_fit=true) at ../src/arrow/buffer.cc:112
#2  0x00007fffcb5fc506 in parquet::AllocateBuffer (pool=0x7fffed519300 <completed>, size=1024) at ../src/parquet/util/memory.cc:501
#3  0x00007fffcb5fc75e in parquet::InMemoryOutputStream::InMemoryOutputStream (this=0x1487090, pool=0x7fffed519300 <completed>, initial_capacity=1024) at ../src/parquet/util/memory.cc:423
#4  0x00007fffcb5335ca in parquet::PlainEncoder<parquet::DataType<(parquet::Type::type)2> >::PlainEncoder (this=0x7fffffff9170, descr=0x1104060, pool=0x7fffed519300 <completed>)
    at ../src/parquet/encoding-internal.h:188
#5  0x00007fffcb5defa2 in parquet::TypedRowGroupStatistics<parquet::DataType<(parquet::Type::type)2> >::PlainEncode (this=0xbbee60, src=@0xbbeec8: -729020189051312384, dst=0x7fffffff9258)
    at ../src/parquet/statistics.cc:228
#6  0x00007fffcb5def07 in parquet::TypedRowGroupStatistics<parquet::DataType<(parquet::Type::type)2> >::EncodeMin (this=0xbbee60) at ../src/parquet/statistics.cc:204
#7  0x00007fffcb5df1c3 in parquet::TypedRowGroupStatistics<parquet::DataType<(parquet::Type::type)2> >::Encode (this=0xbbee60) at ../src/parquet/statistics.cc:219
#8  0x00007fffcb5348f7 in parquet::TypedColumnWriter<parquet::DataType<(parquet::Type::type)2> >::GetPageStatistics (this=0x81d2b0) at ../src/parquet/column_writer.cc:520
#9  0x00007fffcb52ca76 in parquet::ColumnWriter::AddDataPage (this=0x81d2b0) at ../src/parquet/column_writer.cc:386
#10 0x00007fffcb52c0eb in parquet::ColumnWriter::FlushBufferedDataPages (this=0x81d2b0) at ../src/parquet/column_writer.cc:447
#11 0x00007fffcb52ddb0 in parquet::ColumnWriter::Close (this=0x81d2b0) at ../src/parquet/column_writer.cc:431
#12 0x00007fffcb4d6657 in parquet::arrow::(anonymous namespace)::ArrowColumnWriter::Close (this=0x7fffffff9b48) at ../src/parquet/arrow/writer.cc:347
#13 0x00007fffcb4e758e in parquet::arrow::FileWriter::Impl::WriteColumnChunk (this=0x15adee0, data=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<arrow::ChunkedArray, std::allocator<arrow::ChunkedArray>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<arrow::ChunkedArray, std::allocator<arrow::ChunkedArray>, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr (count 2, weak 0) 0x1717cc0, offset=0, size=5)
    at ../src/parquet/arrow/writer.cc:982
#14 0x00007fffcb4d507b in parquet::arrow::FileWriter::WriteColumnChunk (this=0x125bc30, data=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<arrow::ChunkedArray, std::allocator<arrow::ChunkedArray>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<arrow::ChunkedArray, std::allocator<arrow::ChunkedArray>, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr (count 2, weak 0) 0x1717cc0, offset=0, size=5)
    at ../src/parquet/arrow/writer.cc:1011
#15 0x00007fffcb4d5ba6 in parquet::arrow::FileWriter::WriteTable (this=0x125bc30, table=..., chunk_size=5) at ../src/parquet/arrow/writer.cc:1086

Not sure what's going wrong yet

Uwe Korn / @xhochy:
Issue resolved by pull request 456
https://github.com/apache/parquet-cpp/pull/456

Joshua Storck / @joshuastorck:
I did some debugging and isolated the issue. The column writer that is being created is int64 (https://github.com/apache/parquet-cpp/blob/master-after-apache-parquet-cpp-1.4.0-rc1/src/parquet/column_writer.cc#L559), but the codepath taken for writing is assuming int96 (https://github.com/apache/parquet-cpp/blob/master-after-apache-parquet-cpp-1.4.0-rc1/src/parquet/arrow/writer.cc#L599). Unfortunately, there is a static_cast that is being made here: https://github.com/apache/parquet-cpp/blob/master-after-apache-parquet-cpp-1.4.0-rc1/src/parquet/arrow/writer.cc#L378.
That last section of code does a static cast to the wrong type. That means it's writing 96 at a time when there's only space for 64 at a time. That's probably corrupting memory. I have a feeling the location of the segfault would be dependent on the input data.
I need to take a closer look and figure out what the best course of action is here. I'm not fond of the static_cast. If we were using dynamic_cast here, at least we could put an assertion in a debug build and/or check to make sure the C types match between the writer_ and the value returned from the static_cast.
I suspect there is some mismatch between how the column metadata is initialized and how it is used ArrayColumnWriter::WriteTimestamps.

Wes McKinney / @wesm:
Moved to 0.10.0. My best guess is that this bug lies in parquet-cpp. Let's try to fix this soon

Wes McKinney / @wesm:
I haven't found the bad memory access yet – a pointer has gotten corrupted and the segfault is happening there:

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007ffff268f769 in arrow::PoolBuffer::Reserve (this=0xdfad80, capacity=1024) at ../src/arrow/buffer.cc:101
101	      RETURN_NOT_OK(pool_->Allocate(new_capacity, &new_data));
(gdb) p pool_
$1 = (arrow::MemoryPool *) 0x7ffff2d74300 <completed>
(gdb) p ::arrow::default_memory_pool()
$2 = (arrow::MemoryPool *) 0x7ffff2d74310 <arrow::default_memory_pool()::default_memory_pool_>

Those memory addresses should be the same. Here is a minimal script repro'ing the error:

import pandas as pd
import pyarrow as pa
import pyarrow.parquet as pq
from io import StringIO

content = StringIO(
"""report_time_of_generation
2018-02-01 03:44:29
2018-02-01 03:44:29
2018-02-01 03:44:29
2018-02-01 03:44:29
2018-02-01 03:44:29
""")

dfs = pd.read_csv(content, parse_dates=['report_time_of_generation'])

table = pa.Table.from_pandas(dfs)

pq.write_table(table, 'output.parquet', flavor='spark', compression='snappy',
               coerce_timestamps='ms')


Doesn’t work!

Minecraft bedrock IOS(1.18.2)

That is Minecraft IOS issue, not the pack issue. It has been reported on the Minecraft Bug page: MCPE-47250. Try downloading the .zip version and unzip it into the folder.


Display Progress of Benchmark Levels in Product Overview

Is your feature request related to a problem? Please describe
Would be nice to view the current progress of the Benchmarks (OWASP ASVS) on the Overview
Describe the solution you'd like
Another box on the Overview of a product. It should display a progressbar for each Level of a Benchmark.

@aaronweaver thoughts? I like this one.

I'm going to go ahead and give this one to @devEricA

Enhancement has been pushed and is ready for review @devGregA. Let me know what you think.


Add ignoreGetterSetter option for UndocumentedFunction

Detekt's rule UndocumentedPublicFunction  does not report the following code snippet for me.
var str: String
  get() = this.toString()
  set(value) { println(value) }

Ah your right, I was thinking about documentation to source code ratios and Java's getter setters ... Closing!


fix(remote-exec): update the format of jinad-init.sh's args

https://github.com/jina-ai/jina/issues/2082


2.2.8 Version

kubectl -n cattle-system  logs -f cattle-node-agent-8lg8z
time="2019-08-31T03:55:00Z" level=info msg="Connecting to proxy" url="wss://hyrancher.hytera.com/v3/connect"
time="2019-08-31T03:55:00Z" level=error msg="Failed to connect to proxy" error="x509: certificate signed by unknown authority"
time="2019-08-31T03:55:00Z" level=error msg="Failed to connect to proxy" error="x509: certificate signed by unknown authority"

Merging into https://github.com/rancher/rancher/issues/22581


Avoid sending empty Content-Type header when proxying to S3

Prior to this commit, Asset#content_type would return an empty string
if the file extension wasn't found by Mime::Type.lookup. This meant
that the Content-Type response header was also being set to an empty
string. Something else in the Rails stack (presumably some middleware)
was then replacing this empty string with "*/*; charset=utf-8". The
effect of this was that the Content-Type response header for files
with unrecognised mime types would be 'application/octet-stream' when
serving the file from the disk and '*/*; charset=utf-8' when serving the
file from S3.
This commit ensures we send the default content type
('application/octet-stream') for files with unrecognised mime types when
proxying requests to S3.
Note that Mime::Type.lookup_by_extension(nil) returns the same as
Mime::Type.lookup_by_extension('unrecognised-extension') which allows
me to get rid of the if extension.present? condition.
Fixes issue #175.

Thanks @floehopper! Merging.


Remove access token from freedom-social-xmpp logs

The access token is appearing again in freedom-social-xmpp logs.  This is useful for debugging but needs to be removed before we publicly launch uProxy.

Done in https://github.com/freedomjs/freedom-social-xmpp/issues/100


[test] Tweak Driver/subcommands.swift not to actually run anything

Whoever touched this test last didn't know the rule for arguments passed to the interpreter: if they're after the file to interpret, they're treated as arguments to the script rather than the compiler.

@swift-ci Please smoke test and merge


Refactor DI Registration

Okay, I think this is as many fairly major changes as I want to stack up all at once.
The major highlights of what I aimed to do here are:

Allow components such as controller and finalizer to support handling events for multiple entity types (#202)
Remove the ServiceLocator class (it's an anti-pattern)
Allow explicit or automatic registration of operator components
Remove as many references to Reflection from business logic classes as possible
Remove as many direct references to the ASP.NET core DI contrainer from business logic classes as possible
Make resolving components more developer-friendly (see IControllerInstanceBuilder, IFinalizerInstanceBuilder and IComponentRegistrar)

As of a1edf2a, I can successfully run all tests on my machine and can run a test operator referencing the library to verify controllers and finalizers work.
Webhooks should work still, though the last test I completed was a handful of commits ago; these will need manual verification and/or more tests to be written to automatically verify functionality.

Awesome!
For the testing of webhooks "matter": I'm not sure on how this can be tested. I'm currently starting up a Kubernetes instance during testing and run some integration tests against it, but I'm not sure on how I'm able to test webhooks. Maybe there exists some kind of pattern to do that. I'll have a look in the future.
But for now, I'm reviewing your changes. Thanks for the help!

It looks like we should be able to set this up using the TestServer and TestClient from Microsoft.AspNetCore.TestHost
https://docs.microsoft.com/en-us/dotnet/architecture/microservices/multi-container-microservice-net-applications/test-aspnet-core-services-web-apps#implementing-integration-and-functional-tests-for-each-microservice

@erin-allison yikes :-D
Just found an error. The RBAC breaking change is screwing the generation now, because the class "LeaderElector" (internal class for the election of a leader in case of multiple running instances of the operator is now not able to create leader elements (V1Lease)

Hm, that is problematic. I'll have a look.


webhooks/github: Support various new events.

@timabbott: FYI :)

So, looking at the actual events, I think check_suite at least should definitely be ignored, since it's actually a notification to third-party apps that they should run CI, not a notification that e.g. CI finished.  Totally useless to Zulip.
The same is probably true of check_run as well; it's how they notify that a user requested rerunning a check.

I merged the other two commits.

@timabbott: I just updated this. :)

Merged after making the two changes I suggested above, thanks @eeshangarg!


application get error  Illegal instruction (core dumped)?

Hello Bro,
When I implement project with your instruction, i build get_prediction file like below:

I debug and I see tensorflow meet error (sample #include "tensorflow/cc/saved_model/loader.h"). However, when i import tensorflow on python, It work well.
Could you give me any ways to resolve it.

You need to provide additional parameters. The template is here: https://github.com/borarak/tensorflow2_cpp#predict
Hope that fixes it

You need to provide additional parameters. The template is here: https://github.com/borarak/tensorflow2_cpp#predict
Hope that fixes it

Thank you for reply, However I edited the file for only #include tensorflow like saved_model_loader.h. I debug and I see the error cause by Include Tensorflow

@bluesky1308 Could you show me the edited script you are trying?

in https://github.com/borarak/tensorflow2_cpp/blob/c7ae6b5c7c38432d43523b362f696ad48bcaf39d/saved_model_loader.h#L113
change vector = {{ ....  }}   to vector = { .... }


Unable to specify any base route other than '/'

Prerequisites

[X] I have written a descriptive issue title
[X] I have searched existing issues to ensure the bug has not already been reported

Fastify version
4.26.2
Plugin version
6.0.6
Node.js version
20.13.1
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
14.4.1
Description
Trying to build a boilerplate with this project using TypeScript. Ran into quite a few issues, but worked through most of them. Now am stuck on this strange issue.
To see the issue, please clone the github repo. Once cloned, simply execute:
npm run build
npm run start:prod

Note that the server starts, but as soon as you open a browser targeting localhost:3000/your-base/, there is a 404 trying to load the "/your-base/assets/index-DSIhbpTP.js" file.
Link to code that reproduces the bug
https://github.com/onlywei/fastify-vite-typescript-boilerplate
Expected Behavior
There should be no 404 error.

This issue is not present if / is used as the vite base config.


⚠ Bofrost.fr has degraded performance

In 923ee2f, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1122 ms

Resolved: Bofrost.fr performance has improved in 0494f23 after 6 minutes.


Code Issue

Code under the section Authenticate with DefaultAzureCredential has an error.
Last line should be retrieved_secret = secret_client.get_secret("secret-name-01")
Instead it is presented as retrieved_secret = client.get_secret("secret-name-01")

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

ID: 036cc96e-fbb8-bced-0a5b-ef6e332264b8
Version Independent ID: 7b70016c-feb0-7da1-5995-2d1fa8bce9a9
Content: How to authenticate Python applications with Azure services
Content Source: articles/python/azure-sdk-authenticate.md
Product: azure-python
GitHub Login: @kraigb
Microsoft Alias: kraigb

Right you are! I'll get that bit corrected.


Variable length structure members in zipcontainer

Some of the members of the zipcontainer data structures have variable length, and this is solved by keeping a pointer to this data, and allocating memory on the heap. This is a potential memory leak code. It is really simple to forget freeing this, and the coder even need to know the structure. So, form a coders point of view, this is more or less madness.
The alternative would be to have a fixed size array fr these elements. They are not used in any way. For example the "filename" attribute is assign the variable name from Python when numpy generates the file, is totally discarded in the C interface.

I think this is fixed with commit 443de6e. It is not much tested, so be aware of bugs.


feat: API for uploading a sway project

Closes https://github.com/FuelLabs/forc.pub/issues/18
This PR adds a new API, upload_project, that accepts a .tgz file containing a sway project and does the following:

Strips out irrelevant files
Attempts to build the project
Uploads the ABI file IPFS and stores the hashes
Generates a bytecode ID from the compiled binary and stores it in a new postgres table
Creates a new .tgz from the cleaned up source code and uploads it to IPFS
Returns an upload ID, which can be used to publish metadata about the uploaded project (coming in a future PR)

Notes:

Because of the limitations of pinata and the pinata/IPFS rust SDKs, the source code is stored in IPFS as a .tgz file rather than as a uncompressed directory.
In order to build the sway project with the correct version of forc, we pre-install the latest 20 versions of forc on the docker image. As a fallback, the service uses cargo binstall to fetch the version of forc if it isn't pre-installed. This means the API can take a while to run if the version requested is not already installed.
I added one integration test for the happy path, but I didn't want to add more with different versions because the test takes a while to run. Happy to add more tests as needed.

Nice! Happy to approve once updated and you're happy for another review.


fix classname, warning in customization paths

fixes #2297 and #2298

@sneridagh @tiberiuichim What do you think, we merge it?

@nileshgulia1 The BlockToolbar change is fine.
For the other changes, it needs to be removed. As far as I recall, Victor thought the logging should stay.

Fixed in #2361


Don't post a reminder more than once

This commit adds a sentinel string to the reminder comment posted
by the bot. Before posting, we first search the comments on an issue
and if we don't find the sentinel, we can post the comment.
If we do find the sentinel, we exit without posting an additional comment.
Closes #2

Example of this with an earlier message working:
https://github.com/ponylang/action-testing/pull/107


Add LoadCommandsFromFS

This adds a LoadCommandsFromFS loader that makes it possible to
load commands from more than just YAML files

Clsoes #116


[BUG] Infinity token-authenticated request when connected to remote jupyter server

Applies To

[X] Notebooks (.ipynb files)
[ ] Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?
When open .ipynb project in VSCode with connected to exist remote jupyter server like jupyter/scipy-notebook,
the VSCode Jupyter extension will cause infinity "token-authenticated request" to jupyter, and can see huge amount of the same messages in logs, even if the .ipynb file or project has been closed, only can be stop by quit or restart VSCode:
...
[I 2023-03-24 05:12:15.820 ServerApp] Generating new user for token-authenticated request: 9da819445a07428ba5b07d4361b37592
[I 2023-03-24 05:12:21.037 ServerApp] Generating new user for token-authenticated request: 331a45f6cce5460687f11897db9e9769
[I 2023-03-24 05:12:26.257 ServerApp] Generating new user for token-authenticated request: fee1b282a03d4b2692cf84019e720206
[I 2023-03-24 05:12:31.461 ServerApp] Generating new user for token-authenticated request: e9f3d5afb7414411bb89f3bdf33db921
[I 2023-03-24 05:12:36.696 ServerApp] Generating new user for token-authenticated request: e37235f5281345478aba2f54432de69a
[I 2023-03-24 05:12:41.896 ServerApp] Generating new user for token-authenticated request: 1d9fdf97ba47469bbdac043b061d76cd
[I 2023-03-24 05:12:47.096 ServerApp] Generating new user for token-authenticated request: 2775f602543e4e91a7b166a48841e8c5
...

After debug by many people work with Jupyter itself, it's seems an issue with VSCode, not with Jupiter Server.
link issues:

https://github.com/jupyter-server/jupyter_server/issues/1245
https://stackoverflow.com/questions/75830256/jupyter-spam-with-generating-new-user-for-token-authenticated-request-in-logs
https://github.com/jupyter/docker-stacks/issues/1892

VS Code Version
Version: 1.77.3
Jupyter Extension Version
v2023.3.1201040234
Jupyter logs
...
[I 2023-03-24 05:12:15.820 ServerApp] Generating new user for token-authenticated request: 9da819445a07428ba5b07d4361b37592
[I 2023-03-24 05:12:21.037 ServerApp] Generating new user for token-authenticated request: 331a45f6cce5460687f11897db9e9769
[I 2023-03-24 05:12:26.257 ServerApp] Generating new user for token-authenticated request: fee1b282a03d4b2692cf84019e720206
[I 2023-03-24 05:12:31.461 ServerApp] Generating new user for token-authenticated request: e9f3d5afb7414411bb89f3bdf33db921
[I 2023-03-24 05:12:36.696 ServerApp] Generating new user for token-authenticated request: e37235f5281345478aba2f54432de69a
[I 2023-03-24 05:12:41.896 ServerApp] Generating new user for token-authenticated request: 1d9fdf97ba47469bbdac043b061d76cd
[I 2023-03-24 05:12:47.096 ServerApp] Generating new user for token-authenticated request: 2775f602543e4e91a7b166a48841e8c5
[I 2023-03-24 05:12:52.348 ServerApp] Generating new user for token-authenticated request: c4b3a0eab9e34ef0b2e09de1c38db603
[I 2023-03-24 05:12:57.545 ServerApp] Generating new user for token-authenticated request: 6d1cdbaac5c247719aa2ea5c2cac4ca9
[I 2023-03-24 05:13:02.759 ServerApp] Generating new user for token-authenticated request: c84253281c3147c2990d7ba7359b93bb
[I 2023-03-24 05:13:07.959 ServerApp] Generating new user for token-authenticated request: f186b1d4966d4bf886dec3d9f5844ffa
[I 2023-03-24 05:13:13.188 ServerApp] Generating new user for token-authenticated request: 64fcc05713fa441eb9b3bcad5281433c
[I 2023-03-24 05:13:18.384 ServerApp] Generating new user for token-authenticated request: 224e24f08a654dc390ffa2696861caa1
[I 2023-03-24 05:13:23.601 ServerApp] Generating new user for token-authenticated request: aa3bef1b7b004e83889741a0ac3c7158
[I 2023-03-24 05:13:28.808 ServerApp] Generating new user for token-authenticated request: f255c769aa304de2b1a41b9aabbdbd44
[I 2023-03-24 05:13:34.014 ServerApp] Generating new user for token-authenticated request: fa7abb6e35eb42cba3c6e642d18cea6f
[I 2023-03-24 05:13:39.215 ServerApp] Generating new user for token-authenticated request: 46d7ac3d6fff4880a26d0873587dd155
[I 2023-03-24 05:13:44.419 ServerApp] Generating new user for token-authenticated request: 6d23b2e4c9524ea78d7821b3a47f8db2
[I 2023-03-24 05:13:49.624 ServerApp] Generating new user for token-authenticated request: 5405124b3b3244c3bcb0aed218d3277b
...

Coding Language and Runtime Version
Python 3.10.10
Language Extension Version (if applicable)
No response
Anaconda Version (if applicable)
No response
Running Jupyter locally or remotely?
Remote

Thanks for filing this issue, and sorry you are running into this, I will look into this shortly

Temporary work around
From here https://github.com/jupyter-server/jupyter_server/issues/1245#issuecomment-1508128514
In case somebody from the VSCode looks at this, one theory about what's happening is that when the user is presented with the challenge/response for authentication, the extension holds on to the cookies generated by the server, but when the extension receives a valid response by passing in the token, the extension might not be respecting the sessions cookies set by the server.
So for end users who experience this behavior, the current workaround is to not pass the URL containing the token to VSCode and instead allow the extension to ask them for it – until this issue is resolved upstream.

@zthxxx please could you provide the steps to repro this issue,

Is this in a docker container,
are you running jupyter or jupyter lab,
What version of Jupyter/jupyter lab are you using
It would be great if you could provide all the instructions so we have the same setup (making it easier to repro this issue)
Optionally can you provide a docker file

@DonJayamanne

Is this in a docker container? yes
are you running jupyter or jupyter lab? jupyter-lab
What version of Jupyter/jupyter lab are you using jupyter/scipy-notebook:latest b1d74c390631
Optionally can you provide a docker file? yes

I use docker-compose, it's all my configuration to reproduce
# docker-compose.yml

version: '3.8'

services:
  jupyter-lab:
    # https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#jupyter-scipy-notebook
    # https://hub.docker.com/r/jupyter/scipy-notebook
    image: jupyter/scipy-notebook
    container_name: jupyter-lab
    restart: unless-stopped
    environment:
      - GRANT_SUDO=true
      - JUPYTER_TOKEN=${JUPYTER_TOKEN}
    user: root
    ports:
      - 8888:8888
    volumes:
      - ./notebooks:/home/jovyan/notebooks

@zthxxx are you still running into this issue
I believe we have addressed this issue
Please ensure you have the latest version of VS Code and latest version of Jupyter extension

I use docker-compose, that's all my configuration to reproduce

thanks for the docker file, I have tested this at my end and am unable to repro this issue
Please feel free to re-open this issue or create a new one if this issue persists.

Thanks! I'll give it a spin on my local machine.

@DonJayamanne   Hi, seems like I'm still encountering the same problem. I'm using the pre-release version of the Jupyter VSCode Extension (v2023.7.1001901100).
I'm only open on a project that doesn't involve Notebooks, just Python files.
Same environment I use as below, with jupyter-lab token url (https://my-domain-of-jupyter/?token=xxxxx) as Jupyter Server for Jupyter VSCode Extension

Please could you enable logging as follows:

Open settings & go into Jupyter->Logging
Change the value to verbose
Reload VS Code,
Attempt to repro the issue & then copy the output from the Jupyter output panel.

I'd like to see what is happening in Jupyter Extension that could be causing these requests

@DonJayamanne  Thank you, here is the logging after I repro the issue.
vscode-jupyter-13345-230724.log
and my steps here:

Open the project that doesn't involve Notebooks, then open a python file
Open a notebook project, then open the .ipynb file
Run a cell in .ipynb, follow the toast guide of Jupyter Extension to connect the Existing Jupyter Server
Reproduced,  then do nothing in this project

@zthxxx a few fixes have gone into the extension in this space.
Please can you install the latest version of VS Code and Jupyter extension and let me know if this still exists.

Closing this issue as its been over 4 weeks, since the information was requested.
We'll be happy to reopen the issue when the requested information has been provided.


A Yew Realworld live demo

Hi,
I'm working on a Yew version of Realworld frontend app, utilizing Rust and WebAssembly. It's full-functional right now. Can we add this as a relatively larger live demo, besides the todomvc demo?
It also includes yew-router usage, and yewtil usage of NeqAssign/Mrc/Irc will be added to improve performance soon. I'm also following recent refactorings on master branch of yew/yew-router and updating this repo accordingly.
Source: https://github.com/jetli/rust-yew-realworld-example-app
Live demo: https://jetli.github.io/rust-yew-realworld-example-app/
Possible further improvements:

[ ] Yewtil integration
[ ] CI/CD integration
[x] Reduce .wasm size
[ ] Model/form client-side validations
[ ] Unit tests/benchmarks

@jstarry @hgzimmerman  Welcome to review and help

I just noticed see-rs has a similar repo from a contributor:  https://github.com/seed-rs/seed-rs-realworld , and mentions it on README

I'm all for including it within the README, with the caveat that if it eventually becomes unmaintained we would remove it (as long as you are willing to merge PRs from us that update the yew dependency, you shouldn't have to worry much about that, especially post 1.0.0).
Also don't worry too much about the Mrc/Irc pointers - I think of those as being really useful for when you copy large sets of data within Props - and only after you have done most other optimizations. NeqAssign should improve performance (a small amount) in places like: https://github.com/jetli/rust-yew-realworld-example-app/blob/969357c5544918b2ea9ce275c1201dfc8d589215/crates/conduit-wasm/src/components/list_pagination.rs#L44

I think that at the very least that while Yew is still young, that there should be a separate Projects.md for projects that aren't explicitly owned by the Yew project, but are publicly viewable and can serve as full-blown examples for people to take inspiration from. This page would be linked from the Readme.md.

Sounds cool to me,  I'm willing to maintain it in long-term, and we can collect more examples/projects. I might try to use Mrc/Irc for article list pages which may contains large list or text.

can create a awesome-yew
something like awesome-react
https://github.com/enaqx/awesome-react

@thienpow  haha, I just started to do this: https://github.com/jetli/awesome-yew

An initial awesome yew is almost done: https://github.com/jetli/awesome-yew
I also created a logo for it. Welcome to contribute 😎

Looks great! I'll give it a few more days and then I'll open a PR to add a link to it on Yew's Readme.md.
Feel free to open a PR if you think its ready before then. I'd stick it at the bottom of the Overview section.

Cool, I will open a PR to upstream https://github.com/sindresorhus/awesome next month, it requires that a repo must have been around for at least 30 days.

CI by Github actions is added here: https://github.com/jetli/rust-yew-realworld-example-app/blob/master/.github/workflows/rust.yml and a build is passed here: https://github.com/jetli/rust-yew-realworld-example-app/runs/354610615
CD by GitHub actions is also added here: https://github.com/jetli/rust-yew-realworld-example-app/blob/master/.github/workflows/cd.yml and a build is passed here: https://github.com/jetli/rust-yew-realworld-example-app/runs/354611788
Then live demo site is deployed to GitHub pages here: https://jetli.github.io/rust-yew-realworld-example-app/ and a new release with static files and source files is available: https://github.com/jetli/rust-yew-realworld-example-app/releases

Standalone desktop app support is added by this new crate: https://github.com/jetli/rust-yew-realworld-example-app/tree/master/crates/conduit-webview, now yew app can be run as a desktop app 🎉 , it looks like a slim Electron app in just ~3MB size.

Since awesome-yew is available now, I'm closing this issue

The project is added to Realworld repo officially, in Frontends section with title Rust + Yew + WebAssembly. 🎉

Amazing! You rock 😎


Add docs for the exported types in eip7594

This would mainly consist of linking their counterparts in the spec

Closed by #221


Multiple Styles in a single content image?

Hi,
I am not very experienced in this, but I thought this was incorporating multiple styles in a single image? In your eval command, we are only providing one id for style - can we provide multiple ids there, for multiple styles?
Thanks!

By "multiple style transfer", I mean to train a single model for multiple styles. During eval, it now only supports one style at a time. While I think it is possible to put two or more styles into one image, I'm sorry this repo currently does not support that.


test: [M3-6855, M3-6876] - Add script to generate JUnit test summaries

Description 📝
This is an experimental PR that adds a yarn junit:summary package script. The purpose of this script is to read some JUnit test result XML files and output a summary of the results in different formats. My goal is to integrate this with the Jenkins pipeline to facilitate Slack notifications and GitHub Comments.
Usage
Install dev dependencies and run yarn junit:summary <path to JUnit files> --format <format>
Example:
yarn junit:summary ./packages/manager/cypress/results --format slack

Changes  🔄

Add yarn junit:summary package script to output test result summary in various formats

Preview 📷
Copy/pasted the output of the script to give an idea of what the output will look like. These are slightly out of date at this point but still give a pretty good idea of what the output looks like:
Slack notification preview:

Passing
Failing

GitHub comment preview:

Passing
Failing

How to test 🧪

Install new dependencies with yarn
Generate some JUnit XML files by running the Cypress tests using the following command:CY_TEST_JUNIT_REPORT=1 yarn cy:run

(A JUnit file gets created for each .spec.ts file, so you don't have to run the entire suite to test this)
Run yarn junit:summary ./packages/manager/cypress/results --format slack to output a summary of the test result files formatted for Slack
Run yarn junit:summary ./packages/manager/cypress/results --format github to output a summary of the test result files formatted for GitHub

As an Author I have considered 🤔
Check all that apply

[ ] 👀 Doing a self review
[ ] ❔ Our contribution guidelines
[ ] 🤏 Splitting feature into small PRs
[ ] ➕ Adding a changeset
[ ] 🧪 Providing/Improving test coverage
[ ] 🔐 Removing all sensitive information from the code and PR description
[ ] 🚩 Using a feature flag to protect the release
[ ] 👣 Providing comprehensive reproduction steps
[ ] 📑 Providing or updating our documentation
[ ] 🕛 Scheduling a pair reviewing session
[ ] 📱 Providing mobile support
[ ] ♿  Providing accessibility support

Looks good, that's pretty intense! - worked locally great
have you thought of sanitization so we don't end up with new codeQL errors? At first sight it looks fine but worth asking now

Good thought, thanks @abailly-akamai! I'll think on this a bit and plan to push some additions tomorrow

@abailly-akamai Added some string escaping for the GitHub formatter to avoid the risk of users injecting HTML into GitHub comments (I don't think this would be possible anyway since the info being escaped comes from Jenkins and isn't derived from any user-created string that I'm aware of, like a branch name or git commit message, etc., and it's behind our whitelist)

Before
After

I'm not sure it'll make any difference as far as CodeQL is concerned, but I'll check out the alerts on our next release and if there are any I'll write some tickets to address!


Cache enable routine seems to be incomplete

Hello,
Some days ago me and some peers noticed that disabling lto makes irom a non-usable section for ROTEXT
We tracked this behavior and found that it was caused by a change in the commit right after version 4.0:

One quick solution (for those who must avoid lto for x or y reason) is to fork the repo and add back the PROVIDE ( Cache_Read_Enable = 0x40004678 ); to memory.x , plus modifying lib.rs so it calls the sdk function instead of the hal one
pub unsafe extern "C" fn ESP8266Reset() -> ! {
    // These symbols come from `memory.x`
    extern "C" {
        static mut _rtc_bss_start: u32;
        static mut _rtc_bss_end: u32;
        pub fn Cache_Read_Enable(odd_even:u8, mb_count:u8, no_idea:u8);
    }
    // configure the pll for the most common crystal frequency
    ...

    //use just one
    Cache_Read_Enable(0, 0, 0); //sdk version works regardless of lto config
    flash::cache_enable(&mut dp.SPI0, 0); //does the same as Cache_Read_Enable but not quite
    ...
}

the hal implementation of cache_enable seems to follow the behavior found here, and it does work, but not quite. I am still unable to find what lto changes that makes this implementation work with lto enabled, but not with lto disabled. Disabling lto causes undefined behavior, script wont run and if you open a serial monitor all you'll see is noise.
Idk if the sdk method should be added back  into the main repo while this is troubleshooted, but I did want to leave this documented in case it is helpful for someone in a similar situation (similar situation being: lto MUST be disabled for your stuff to work)

should be fixed now.
The issue was not in the cache_enable implementation but svd2rust not adding #[inline] is all the required places, meaning that without lto it was trying to jump into flash memory while it was trying to setup the mapping.


[FLINK-15153]Service selector needs to contain jobmanager component label(Backport to 1.10)

What is the purpose of the change
Backport #10496  to release-1.10.
Brief change log
none
Verifying this change
none
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
The S3 file system connector: (no)

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (not applicable)

@flinkbot run travis

@zhijiangW Travis has passed. Please help to merge.


Fixed issue #63

Fixed as in https://github.com/vuejs/vue-syntax-highlight/issues/63

Any chance of getting this merged?

Guys any news on this?

AFAIK it is working as intended in ST3 and this fix in for ST2 - would this break ST3?

I jus tested on ST3 and <style lang="scss"> breaks the highlighting. But instead of replacing, I think both SASS and SCSS sohule be supported, won't this PR fix SCSS but break SASS?

Thanks for the PR - looks like it's the same from #73, but we'd prefer changing the yaml (which is the source) and auto-generate the XML.


Don't require root for installation

Please refrain from using $ curl -sSL instl.sh/raitonoberu/sptlrx/macos | sudo bash.
This is considered bad practice and deemed unsafe.
Why does your script require root in the first place?

I use instl to provide an automatic installation. This requires root because it puts the executable file in /usr/local/bin.
I am aware of the fact that this is a bad practice, so the user has the option to download it and install it manually. This will be removed from the README as soon as the package is available in the main repositories (already in AUR).

Placing the file in ~/.local/bin is probably a better idea and then recommending users add that to their $PATH. Your README.md doesn't have any build instructions so most people will default to just using curl to pull the prebuilt binary, better safe than sorry.


Refactor value2tag to start simplifying it.

Added missing tests for existing behavior.
This one is for @Fryguy :cake:

cc @gtanzillo

LGTM.  @gtanzillo Please review.

Looks good to me too :+1: Much easier to read/understand! 👏

:bow:  Thanks!


Requesting Const Reference Of 'this_state' Causes Invalid Bindings

sol version: f275ad2fc468365e691e05a944e92310e548dbff
Lua version: MoonJIT (https://github.com/AshitaXI/moonjit)
Godbolt link to an example of the issue:
https://godbolt.org/z/h6raGE
When requesting a const reference of sol::this_state in a binding, sol will compile the binding fine but attempting to call it results in a mismatched signature error.
const sol::this_view& s errors.
const sol::this_view s works fine.
Unsure if this is the expected behavior of sol or if this would be considered a bug.

These are supposed to be used as values. const sol::this_view& should, nevertheless, still work, so just another thing to pile on the list.

These are supposed to be used as values. const sol::this_view& should, nevertheless, still work, so just another thing to pile on the list.

Unsure if this is related, but this is another similar issue I noticed:
Requesting a const& string_view works fine, but not if it's requested as an optional.
const std::string_view str                 // ok
const std::string_view& str                // ok
sol::optional<const std::string_view> str  // ok
sol::optional<const std::string_view&> str // error

Unsure if this is related, but this is another similar issue I noticed:
Requesting a const& string_view works fine, but not if it's requested as an optional.
const std::string_view str                 // ok
const std::string_view& str                // ok
sol::optional<const std::string_view> str  // ok
sol::optional<const std::string_view&> str // error

Yes, the last one is bad because of the way optional stores references. You'd be asking for a reference to a non-existent, non-lifetime-extended entity. Don't do that.

Yes, the last one is bad because of the way optional stores references. You'd be asking for a reference to a non-existent, non-lifetime-extended entity. Don't do that.

Fixed in latest.

Fixed in latest.


Space between backticks of fenced code block and language for highlighting

What article on docs.github.com is affected?
There are 149 occurrences in .md files where there is a single space after the start of a fenced code block and before the indicated code language, e.g. ``` shell  (regex: ``` \w), whereas there is no space in 1660 other cases, e.g. ```shell.
What part(s) of the article would you like to see updated?
I suggest unifying this to no space and to add a remark to the Content Style Guide.
Additional information
I also noticed that in 11 cases the indicated language is yml and in 487 cases it is yaml. I suggest unifying it to yaml.
I'm happy to open a PR that implements the suggested changes.

Since there's no difference in the way a user interacts with  ```shell and  ``` shell let's not worry about that one. I do think (if someone's looking at the source) that there could be confusion over yml and yaml especially for super new folks. A PR changing those 11 instances would be great!

The parser luckily accepts a space in that place. I know that some others do not, although IIRC then there was also a particular one that required a space... Anyway, here's a PR: #6109


Date formatting using moment.js

Could I make a PR using moment.js to format dates, since many projects using this library have to do the same thing.
This is what we have so far: https://github.com/ogroppo/entitree/blob/master/src/lib/formatDateClaim.js

I would prefer to maximize compatibility in a standard way, rather than forcing moment.js on all lib users, especially as most people don't need moment.js anymore, and momentjs.com itself recommends to not start using it now:

Considering using Moment in your project?
There may be better modern alternatives.
For more details and recommendations,
please see Project Status in the docs.

The more pressing issue in my opinion would rather be to address the issue #54 which could be related with what is identified as a moment.js bug in entitree's code

JavaScript supports formatting dates using Date.toLocaleString
var date = new Date(Date.UTC(2012, 11, 20, 3, 0, 0));
var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
console.log(date.toLocaleDateString('de-DE', options));
// → "Donnerstag, 20. Dezember 2012"


Enable parametric w3c/b3/datadog/b3 single trace context tests for Go

Description
Updating golang code in parametric tests to be able to run b3multi/datadog/w3c propagator tests. Most of the changes remove skipping of the tests or change it to a 'bug' format
Check list
Your PR is not ready to be reviewed? Please save it as a draft :pray:

[ ] Follows the style guidelines of this project (See how to easily lint the code)
[ ] CI is passing
[ ] There is at least one approval from code owners

Yes to all? Feel free to merge it whenever you want :heart:

@dianashevchenko parametric test is failing on golang ?


R.7.1. - User's can select a profile avatar

Users can select an avatar image for their profile. This image can be a pre-selected image or a custom uploaded image.

Closed by #96


Sometimes .m files have some missing fields. Make it compitable.

In my case, our .m data file does not have Pc1	Pc2	Qc1min	Qc1max	Qc2min	Qc2max	ramp_agc	ramp_10	ramp_30	ramp_q	apf for generator data and this makes it not working. This commit will regard all the missing fields as 0.

Thank you for adding the handling for missing fields.


Fixed noise adaptive layout choosing 0 reliability cx

Changed swap_reliab of swap graph edges with 0 reliability from -math.inf to math.inf

Summary
Fixed issue   #3517
Details and comments
Fixed the issue where a cx with 0 reliability would be always choosed by the NoiseAdaptiveLayout trasnpiler pass.

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

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

Thanks for your contribution.
It seems like the bug was introduced in https://github.com/Qiskit/qiskit-terra/pull/2656, and actually I just saw a comment there that pointed it out. So it's good that it's finally getting fixed.
I believe the source of confusion is the name of variables used in this file. swap_reliab and best_reliab should actually be swap_cost and best_cost, because lower is better for them. And the algorithm tries to minimize cost using Floyd-Warshall for shortest weighted path.
Can you take this opportunity to fix the variable names as well?

@ajavadia I believe something like this would much clearer to understand for everyone:
swap_reliab = pow(g_reliab, 3)
# convert swap reliability to edge weight for Floyd-Warshall shortest weighted paths algorithm
swap_cost = -math.log(swap_reliab) if swap_reliab != 0 else math.inf
self.swap_graph.add_edge(ginfo.qubits[0], ginfo.qubits[1], weight=swap_cost)
self.swap_graph.add_edge(ginfo.qubits[1], ginfo.qubits[0], weight=swap_cost)

Also I think that swap_costs_temp and self.swap_costs should become swap_reliabs_temp and self.swap_reliabs. This is my humble opinion, the final decision is up to you.

I inadvertently clicked on close

Sounds good thanks

On Nov 27, 2019, at 2:53 AM, DavideFrr<EMAIL_ADDRESS>wrote:
Reopened #3518.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Ok, now it should be all right


Better image API

Currently there is no easy way to work with multiple images. For instance, sprites in a game.
I think we need a separate Image type and support API, perhaps something like:
type Image

val dimensions : Image -> {width : int; height : int}
val loadImage : string -> Image
val saveImage : Image -> string -> unit
val drawImage : canvas -> Image -> (int*int) -> unit
val toImage : canvas -> Image

Adding this here since it is a relevant conversation to this


Input selection shows unknown

Describe The Bug:

Sometimes when I restart homebridge the plugin shows the input selection as "unknown" (see screenshot) and shows the input as devices with which the home app cannot do anything (see other screenshot).
To Reproduce:

This sometimes happens when I restart homebridge and can be "fixed" by restarting homebridge several times. Sometimes it resolves it, sometimes it does not.
Expected behavior:

I should be able to always select the inputs I want and it should be displayed in the home app:

Logs:
Show the Homebridge logs here, remove any sensitive information.

Plugin Config:
...
        {
            "ifname": "eth0",
            "devices": [
                {
                    "id": "<tvserial>",
                    "name": "Fernseher",
                    "ipaddress": "<IP_ADDRESS>",
                    "macaddress": "aa:bb:cc:dd:ee:ff",
                    "sslmode": "default"
                }
            ],
            "platform": "HiSenseTV"
        },
...

Screenshots:

Environment:

Plugin Version: 1.1.0
Homebridge Version: 1.3.4
Node.js Version: 14.17.0
NPM Version: 6.14.13
Operating System: DietPi 7.1.2 (Raspbian Buster)

Hi @marchein , thanks for reporting this. Unfortunately, this is a known issue and I haven't been able to fix it yet. Basically what seems to be happening is this:

When turning on the TV, HomeKit makes a call to the plugin to get the list of inputs. When this happens, we don't have the list of inputs yet, because the TV is still turning on.
As soon as we receive the inputs list, the plugin emits an update with the inputs list, but HomeKit ignores that and just stays on the original input list (it updates some parts of the UI, but not all).

When this happens, just killing and reopening the Home app fixes the problem.
I am already looking into a solution, but haven't found any so far.

When turning on the TV, HomeKit makes a call to the plugin to get the list of inputs. When this happens, we don't have the list of inputs yet, because the TV is still turning on.

my tv is already on, paired and added to homekit; i can neither turn it off or on and input is always unknown

Issue is now stale for about 2 years will be closed.
@marchein If there are any new updates I can reopen it for you.


Side effect entry can be overtaken if not awaited

The SideEffect entry writing can be overtaken if the user doesn't await on the returned promise.
To fix that, we need to internally correctly serialize the operations on the SDK state machine.

Reproducer:
var p1 = ctx.sideEffect();
var p2 = ctx.sideEffect();

await p1;
await p2;

Another potential fix is to "reserve/claim journal index", then re-order them in the sdk connection layer before sending them to the runtime.

Unassigned to myself for the time being. I opened two PRs with the relative approaches.

In both the aforementioned approaches we need to change the signature of ctx.awakeable() to Promise<{id, awakeable_promise}>, because of the side effect retry system. Take the following code as example:
var p1 = ctx.sideEffect(closure, nonZeroRetryPolicy);

var {awakeableId, awakeablePromise} = ctx.awakeable();

var p2 = ctx.sideEffect(closureThatUsesAwakeableId);

await p1;

// what happens next doesn't matter

When invoking ctx.awakeable(), you get back an id that is based on the journal entry index. But because the previous side effect has a non zero retry policy, we can't say for certain what the awakeable entry index is without awaiting p1, hence the given awakeableId used in the second side effect is gonna be wrong.

The third approach we also discussed, that would not require changing the signature of ctx.awakeable(), is to do a runtime check of whether the user have awaited the completion of the side effect or not:
var p1 = ctx.sideEffect();
var p2 = ctx.anyMethod(); // throws an error "you must await the side effect"

This is not a great solution though, as it's not type checked and you'll figure out this mistake only at runtime in specific cases...

After careful consideration, I start leaning toward the third approach of simply forcing the user to await the side effect before invoking another ctx method. Some thoughts:
Removing side effect retries won't solve the issue
By removing the side effect retries, we could go around the limitation of changing the signature of ctx.awakeable. This is fine, but it still doesn't prevent a user from creating a function like:
async function doSideEffectAndRetry(ctx: RestateContext) {
  while() {
    await ctx.sideEffect()...
    // if fails
    await ctx.sleep()
  }
}

Then invoking and awaiting it later:
const p1 = doSideEffectAndRetry(ctx);

ctx.awakeable();

await p1; // the awakeable id can be wrong because some side effect/sleep entries might have interleaved it!

So we're back at the same problem.
Concurrency in general is not supported
In principle you can change in the above example ctx.sideEffect() with any other context method, and you still get the same problem, as that concurrently writes the journal. This form of "generic concurrency" is not supported and I don't think it will ever be in the current model. To propose an analogy, this is very similar to spawning another thread in java and invoking the RestateContext both from there and from the service thread.
But some primitive concurrency is supported
What's special about side effects is that in the simpler case of concurrency that we claim to support it's easier to fall in trap, which is how I ended up opening this issue in the first place. The following code is safe:
const p1 = ctx.call(...)

// Do other context stuff

await p1;

While this code is not:
const p1 = ctx.sideEffect(...)

// Do other context stuff

await p1;

The difference lies in the fact that ctx.sideEffect creates 1(+) entries potentially after you await it, because the side effect closure is asynchronous, while every other ctx method creates the entry immediately when you invoke it, even if you don't await it.
The alternatives

If we want to support the aforementioned primitive concurrency for side effects, either #217 or #218 are fine. But we MUST sacrifice something:

Change the signature of ctx.awakeable as described in https://github.com/restatedev/sdk-typescript/issues/197#issuecomment-1883270607
Remove side effects retries. If a user wants to retry side effects, it can do so but it must be aware that it cannot await "later" as shown in the first code snippet above.

If we don't want to support the aforementioned primitive concurrency for side effects, then let's just shield the users from mistakenly executing something else before the side effect is awaited. This is hopefully easy to do, as it's just a flag to switch at the beginning and end of the side effect method.