Does orthogonal initialization have GPU implementation (fails when explicitly assigned on a gpu)?

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):  Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 14.04
TensorFlow installed from (source or binary): source
TensorFlow version (use command below):  1.2.1
Python version:  3.4.3
Bazel version (if compiling from source): 0.5.2
CUDA/cuDNN version:  8.0/6.0
GPU model and memory: Tesla P100 (16 gb)

Describe the problem
I get an error when trying to use orthogonal initialization which is explicitly assigned to be run on GPU. Looking at the log it looks like some parts of it (e.g. QR decomposition) are available on CPU only. Is this the case or is there some bug that is blocking it from being run on GPU only?
Source code / logs
The following code could be used to reproduce the issue:
import tensorflow as tf
with tf.device('/gpu:0'):
    a = tf.get_variable('a', (10, 3, 3, 20), tf.float32, tf.orthogonal_initializer())
sess = tf.Session()
sess.run(tf.global_variables_initializer())

The error log:
---------------------------------------------------------------------------
InvalidArgumentError                      Traceback (most recent call last)
~/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/client/session.py in _do_call(self, fn, *args)
   1284     try:
-> 1285       return fn(*args)
   1286     except errors.OpError as e:

~/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/client/session.py in _run_fn(session, feed_dict, fetch_list, target_list, options, run_metadata)
   1254       # Ensure any changes to the graph are reflected in the runtime.
-> 1255       self._extend_graph()
   1256       with errors.raise_exception_on_not_ok_status() as status:

~/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/client/session.py in _extend_graph(self)
   1315           tf_session.TF_ExtendGraph(
-> 1316               self._session, graph_def.SerializeToString(), status)
   1317         self._opened = True

/usr/lib/python3.4/contextlib.py in __exit__(self, type, value, traceback)
     65             try:
---> 66                 next(self.gen)
     67             except StopIteration:

~/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/framework/errors_impl.py in raise_exception_on_not_ok_status()
    465           compat.as_text(pywrap_tensorflow.TF_Message(status)),
--> 466           pywrap_tensorflow.TF_GetCode(status))
    467   finally:

InvalidArgumentError: Cannot assign a device for operation 'a': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available.
Colocation Debug Info:
Colocation group had the following types and devices:
Assign: GPU CPU
Reshape: GPU CPU
RealDiv: GPU CPU
Abs: GPU CPU
DiagPart: CPU
StridedSlice: GPU CPU
Qr: CPU
Add: GPU CPU
Mul: GPU CPU
Identity: CPU
VariableV2: GPU CPU
RandomStandardNormal: GPU CPU
Minimum: GPU CPU
Const: GPU CPU
Pack: GPU CPU
	 [[Node: a = VariableV2[_class=["loc:@a"], container="", dtype=DT_FLOAT, shape=[10,3,3,20], shared_name="", _device="/device:GPU:0"]()]]

During handling of the above exception, another exception occurred:

InvalidArgumentError                      Traceback (most recent call last)
<ipython-input-1-f5bccc7031ec> in <module>()
      5
      6 sess = tf.Session()
----> 7 sess.run(tf.global_variables_initializer())

~/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/client/session.py in run(self, fetches, feed_dict, options, run_metadata)
    894     try:
    895       result = self._run(None, fetches, feed_dict, options_ptr,
--> 896                          run_metadata_ptr)
    897       if run_metadata:
    898         proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)

~/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/client/session.py in _run(self, handle, fetches, feed_dict, options, run_metadata)
   1122     if final_fetches or final_targets or (handle and feed_dict_tensor):
   1123       results = self._do_run(handle, final_targets, final_fetches,
-> 1124                              feed_dict_tensor, options, run_metadata)
   1125     else:
   1126       results = []

~/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/client/session.py in _do_run(self, handle, target_list, fetch_list, feed_dict, options, run_metadata)
   1277     if handle is None:
   1278       return self._do_call(_run_fn, self._session, feeds, fetches, targets,
-> 1279                            options, run_metadata)
   1280     else:
   1281       return self._do_call(_prun_fn, self._session, handle, feeds, fetches)

~/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/client/session.py in _do_call(self, fn, *args)
   1296         except KeyError:
   1297           pass
-> 1298       raise type(e)(node_def, op, message)
   1299
   1300   def _extend_graph(self):

InvalidArgumentError: Cannot assign a device for operation 'a': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available.
Colocation Debug Info:
Colocation group had the following types and devices:
Assign: GPU CPU
Reshape: GPU CPU
RealDiv: GPU CPU
Abs: GPU CPU
DiagPart: CPU
StridedSlice: GPU CPU
Qr: CPU
Add: GPU CPU
Mul: GPU CPU
Identity: CPU
VariableV2: GPU CPU
RandomStandardNormal: GPU CPU
Minimum: GPU CPU
Const: GPU CPU
Pack: GPU CPU
	 [[Node: a = VariableV2[_class=["loc:@a"], container="", dtype=DT_FLOAT, shape=[10,3,3,20], shared_name="", _device="/device:GPU:0"]()]]

Caused by op 'a', defined at:
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/ipykernel_launcher.py", line 16, in <module>
    app.launch_new_instance()
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/ipykernel/kernelapp.py", line 477, in start
    ioloop.IOLoop.instance().start()
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/zmq/eventloop/ioloop.py", line 177, in start
    super(ZMQIOLoop, self).start()
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tornado/ioloop.py", line 888, in start
    handler_func(fd_obj, events)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tornado/stack_context.py", line 277, in null_wrapper
    return fn(*args, **kwargs)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/zmq/eventloop/zmqstream.py", line 440, in _handle_events
    self._handle_recv()
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/zmq/eventloop/zmqstream.py", line 472, in _handle_recv
    self._run_callback(callback, msg)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/zmq/eventloop/zmqstream.py", line 414, in _run_callback
    callback(*args, **kwargs)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tornado/stack_context.py", line 277, in null_wrapper
    return fn(*args, **kwargs)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/ipykernel/kernelbase.py", line 283, in dispatcher
    return self.dispatch_shell(stream, msg)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/ipykernel/kernelbase.py", line 235, in dispatch_shell
    handler(stream, idents, msg)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/ipykernel/kernelbase.py", line 399, in execute_request
    user_expressions, allow_stdin)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/ipykernel/ipkernel.py", line 196, in do_execute
    res = shell.run_cell(code, store_history=store_history, silent=silent)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/ipykernel/zmqshell.py", line 533, in run_cell
    return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/IPython/core/interactiveshell.py", line 2698, in run_cell
    interactivity=interactivity, compiler=compiler, result=result)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/IPython/core/interactiveshell.py", line 2802, in run_ast_nodes
    if self.run_code(code, result):
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/IPython/core/interactiveshell.py", line 2862, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-1-f5bccc7031ec>", line 4, in <module>
    a = tf.get_variable('a', (10, 3, 3, 20), tf.float32, tf.orthogonal_initializer())
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/ops/variable_scope.py", line 1065, in get_variable
    use_resource=use_resource, custom_getter=custom_getter)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/ops/variable_scope.py", line 962, in get_variable
    use_resource=use_resource, custom_getter=custom_getter)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/ops/variable_scope.py", line 367, in get_variable
    validate_shape=validate_shape, use_resource=use_resource)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/ops/variable_scope.py", line 352, in _true_getter
    use_resource=use_resource)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/ops/variable_scope.py", line 725, in _get_single_variable
    validate_shape=validate_shape)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/ops/variables.py", line 199, in __init__
    expected_shape=expected_shape)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/ops/variables.py", line 283, in _init_from_args
    name=name)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/ops/state_ops.py", line 131, in variable_op_v2
    shared_name=shared_name)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/ops/gen_state_ops.py", line 684, in _variable_v2
    name=name)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
    op_def=op_def)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/framework/ops.py", line 2576, in create_op
    original_op=self._default_original_op, op_def=op_def)
  File "/home/igitman/Documents/weight-normalization-exps/venv/lib/python3.4/site-packages/tensorflow/python/framework/ops.py", line 1204, in __init__
    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): Cannot assign a device for operation 'a': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available.
Colocation Debug Info:
Colocation group had the following types and devices:
Assign: GPU CPU
Reshape: GPU CPU
RealDiv: GPU CPU
Abs: GPU CPU
DiagPart: CPU
StridedSlice: GPU CPU
Qr: CPU
Add: GPU CPU
Mul: GPU CPU
Identity: CPU
VariableV2: GPU CPU
RandomStandardNormal: GPU CPU
Minimum: GPU CPU
Const: GPU CPU
Pack: GPU CPU
	 [[Node: a = VariableV2[_class=["loc:@a"], container="", dtype=DT_FLOAT, shape=[10,3,3,20], shared_name="", _device="/device:GPU:0"]()]]

Please try adding allow_soft_placement=True as follows:
config = tf.ConfigProto(allow_soft_placement = True)
sess = tf.Session(config = config)

I encourage you to follow a guide here here

Closing as allow_soft_placement=True is the solution here.


Update to latest scala versions

Pull Request Checklist

[x] I agree to licence my contributions under the MIT licence
[x] I have added copyright headers to new files
[x] I have added tests for any changed functionality

Purpose
Update to latest scala versions (2.12.8 and 2.13.0-RC3)

thanks. i'll squash this into one commit


Merge test product order files

Description
This commit clear two product order files and merge both into a single file.
Related Jira(s)

[Jira ID]

Checklist

[x ] I have read and followed the PR naming convention
[x ] My code follows the code style of this project.
[x ] I have added tests to cover my changes.
[x ] All new and existing tests passed.

Tests
Include how to test this code change

Cái này t đóng để xử lý

Cái này đóng để xem sao không merge được


"form" attribute for "input" elements (HTML5)

"form" attribute for "input" elements (HTML5)

This issue was imported from Google Moderator
Moderator votes: +5
Issue added by Béru on 2014-03-12
To vote this issue up or down, simply include +1 or -1 in your comment.

Added at http://caniuse.com/#feat=form-attribute


Recorded energy values are wrong

Describe the bug
Hi,
I have an issue with energy configuration and recorded energy values since 2.4.X
My inverters and battery configuration:

1 EV inverter (leader) of 5kW
1 StorEdge inverter (follower) 5kW
1 LG RESU battery 10kW

Everything worked after updating to 2.4. and then, (I think that it happened when a command of Storage Default Mode is changed) the recorded value of solar production spikes (even if at the time there is no solar production). After the spike in solar production, the sensor for AC energy kwh in energy configuration changes to unavailable and no more values are recorded in energy tab; but then (day after) in my energy tab appears another spike even if the sensor is unavailable and no data is recorded.
Notes:

To fix the mentioned issue, the only solution I found was to configure again the integration but I found out that it happened again.
The energy value that spikes is only for EV inverter (leader)
The energy values of Storedge inverter (follower) are always fine, no spikes and always available
In 2.3.X this didnt happen
I noted that since 2.4 when changing value of Storage Default Mode all sensors of the integration change to unavailable (sometime 2 seconds and other times almost 10 seconds). Lets remember that Storage Default Mode is changed in leader inverter even if the follower inverter is the Storage inverter with the attached battery.

I hope that my analyis and pictures can help find the issue
Expected behavior

Real energy records witout spikes as in 2.3 version
Shorter times of unavailability (or none) of sensors within the intergration when Storage Default Mode

Screenshots
No response
Diagnostic File

Debug logs
No response
Home Assistant Version
2023.8.4
solaredge-modbus-multi Version
2.4.2
Installation Type
HAOS
Read the Instructions

[X] I have read https://github.com/WillCodeForCats/solaredge-modbus-multi/wiki
[X] My configuration follows https://github.com/WillCodeForCats/solaredge-modbus-multi/wiki/Configuration

Additional Context
No response

Nothing has changed in the integration with regard to how data is returned. The integration passes the data across the inverter gives it. That will always be the case.
In v2.4.0 the inverter command delay was removed because I thought it might be unnecessary after rewriting the update process to be more pure async, but it also might be the case that some inverters return bad data after sending them commands. So the inverter command delay feature was restored in v2.4.2 but the default is now 0 instead of 3, so f you were just using the default before you could try changing it to a value between 3-10 seconds (or more) and see if that helps. You didn't attach a diagnostic file so I don't know what your settings are.

Hi,
Something must have changed or some change that affected somehow this; I cant say because you did the changes and were many buy I am sure this issue never happened in 2.3.X

I attach diagnostic file.
I tried configuration of the integration with Command delay of 6 seconds (what I had used before), 3 seconds and 0 seconds. I have to say that still, when I change Storage default mode, in all cases all sensors from the integration change unavailable and are restored. Maybe 0 seconds got them available faster than the others.
I will see what happens with energy records tomorrow and the day after.
When I add the inverter again to the energy configuration for the records of solar production, I still have the wrong records from that inverter but I cant find the record itself to delete or change to 0. Do you have a suggestion for this? The wrong records completely mess up my historic records and statistics.

Thanks
config_entry-solaredge_modbus_multi-aa74d1e75f85eaa741ca4b8728e80c78.json (1).txt

Every change is here:
https://github.com/WillCodeForCats/solaredge-modbus-multi/compare/v2.3.4...v2.4.2
There are no changes to the sensor entity platform, except for fixing a bug in the battery energy cycle count feature. A new button was added and a new switch was added.
I don't have batteries and my inverters don't support commands, so my ability to help specifically with those things is very limited. I can't actually experience how sending commands affects a real inverter, and my simulator is always well-behaved when handling commands. My simulator lets me prove the right things are being sent and received, but it doesn't have all the "problems" like a real inverter or battery can.
The integration is designed to go unavailable if the inverter stops responding. The only suggestion I have after sending a command is to increase the inverter command delay higher. SolarEdge's own documents say the inverter may take 3-6 seconds to process a command so try 10 seconds, or 30. But again I can't offer any practical advice with this since I can't try it on my system.
You can also try manually installing the pymodbus 3.4.1 pinned branch:
https://github.com/WillCodeForCats/solaredge-modbus-multi/archive/refs/heads/pymodbus_3_4_1.zip
Home Assistant 2023.8 uses pymodbus 3.3.1 but I would I expect to see pymodbus 3.4.1 in HA core soon since there was a recent PR (https://github.com/home-assistant/core/pull/97612) for that. If you don't want to try installing that branch manually you then can just wait until the next Home Assistant release that includes pymodbus 3.4.1 which will probably be in 2023.9 soon. I can't pin my integration to pymodbus 3.4.1 until after HA updates because pydmobus 3.3.1->3.4.1 contains a change that will break the built-in modbus integration.

I have made many tests with the inverter command delay:

If 0, when changing storage default mode, all sensors go unavailable instantly but also go available instantly (1 second or less)
If I start increasing the delay, the sensors go unavailable around the same time of the delay but sometimes go available instantly and others not. The delay basically, postpones the time the sensors go unavailable but the always go unavailable.

Even if I think there is some kind of relationship between the wrong energy data and the unavailability of the sensors but it doesnt explain by itself why the bad records of energy measures. What do you think? I checked your changes and I couldnt read anything that would explain this error.
I dont feel confindent enough to install that manually... I am sorry

Turn on debug logging to catch it happening and upload the full log.

The only other idea I have at the moment is to go back to using the pymodbus sync client with workers instead of the pure async client that was implemented for release v2.4.0. There has been another random error that happens (PR #424) that could be related.
I can prepare a pre-release that does that and see if it helps.

Great. Quote me when you do so and I will test itThanksFrancisco F. MayoralasOn 28 Aug 2023, at 18:15, Seth @.***> wrote:
The only other idea I have at the moment is to go back to using the pymodbus sync client with workers instead of the pure async client that was implemented for release v2.4.0. There has been another random error that happens (PR #424) that could be related.
I can prepare a pre-release that does that and see if it helps.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

@FranciscoBigWings
Try Release v2.4.4-pre.1
I'm trying a different arrangement with the locking and write timing, plus adding a check not to start reading if there is a write in progress.

I installed it yesterday night with a delay of 3 seconds. So far so good.
I tried to change manually the state of Storage default mode and it sends it well and the sensor of the integration are always available. Not even 1 time went unavailable. I am still observing if for any reason a wrong value of energy data is recorded, because for the moment everthing is ok. I will update in some days or if it fails.
I am trying to delete an old record from the integration related to energy data. I see the point of data (marked in red) but if I try to find that data I cant find it to delete it or change it to 0kWh. Any suggestion?

Under Developer Tools -> Statistics you can adjust the incorrect statistic.

I don't see the struct errors at all in use, so it's probably related to commands only (since my inverters don't support commands).
I happened to see it once in my dev environment when I was spamming my simulator with commands to see if it would process them in order from the UI.

Yes, that’s how I was used to do it. The problem is that the data doesn’t appear in Statistics to adjust the value to 0Francisco F. MayoralasOn 30 Aug 2023, at 20:45, Seth @.***> wrote:
Under Developer Tools -> Statistics you can adjust the incorrect statistic.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Hi,
2.4.4-pre1 was working pretty well. Yesterday I installed 2.4.4-pre2
Related to the spikes in energy dashboard, they didnt happen again since 2.4.4-pre2 but searching for a solution about my misterious spikes I found this conversation. Maybe it is useful for @WillCodeForCats
https://community.home-assistant.io/t/data-spikes-in-the-energy-dashboard/469843

I can confirm that in pre2 I have sometimes some issues that sensors go unavailable when trying to change the Storage Default mode or Storage charge limit
Log that I hope it helps you:
Logger: homeassistant.helpers.template_entity
Source: helpers/template_entity.py:362
First occurred: 07:43:18 (2 occurrences)
Last logged: 16:30:11
TemplateError('ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{ (states('sensor.solaredge_i1_ac_power') | float) + (states('sensor.solaredge_i2_ac_power') | float) }}' but no default was specified') while processing template 'Template<template=({{ (states('sensor.solaredge_i1_ac_power') | float) + (states('sensor.solaredge_i2_ac_power') | float) }}) renders=414>' for attribute '_attr_native_value' in entity 'sensor.solar_production'
TemplateError('ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{ (states('sensor.solaredge_i1_ac_power') | float) + (states('sensor.solaredge_i2_ac_power') | float) }}' but no default was specified') while processing template 'Template<template=({{ (states('sensor.solaredge_i1_ac_power') | float) + (states('sensor.solaredge_i2_ac_power') | float) }}) renders=16906>' for attribute '_attr_native_value' in entity 'sensor.solar_production'
Logger: custom_components.solaredge_modbus_multi
Source: helpers/update_coordinator.py:262
Integration: SolarEdge Modbus Multi (documentation, issues)
First occurred: 16:30:11 (1 occurrences)
Last logged: 16:30:11
Timeout fetching SolarEdge Coordinator data

Timeout is inverter timeout, not an integration issue.

For the template issues, I made some suggestions on #396 how to fix them.

Marking as resolved for Release v2.4.4
Template related stuff will be added to the wiki since those errors are due to templates not considering non-numeric states, but is not an integration issue.


Monitor MetricAlerts incorrect casing of webhook properties results in downstream bugs

https://github.com/Azure/azure-rest-api-specs/blob/master/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json#L323
See: https://github.com/Azure/azure-cli/issues/8223
I believe the correct casing should be webHookProperties not webhookProperties. When I use the CLI to create an alert with this field, it populates the webHookProperties field on the server. However, because webhookProperties gets propagated to the Python SDK, when I try and then update this alert, the data is lost (because it sends it as webhookProperties that the service ignores).

targetResourceType property is missing or invalid.. [Code: "BadRequest"]

@tjprescott this issue has been closed (Azure/azure-cli#8223)
can we close the current as well?

@yashmuel, based on the discussion in the CLI issue, it seems this has been fixed, perhaps on the service end. You should be good to close this.

Thanks, closing.


php 7.1 support

any plan to support php 7.1?

Yes, of course. As soon as possible updates will be done. But at this moment I have no any normal device to update PhpCodeFixer. (I write this comment on very old Nokia 6303).

Partially implemented in 16cfd2482c0a66d0872557a3d39b5d7841e8fd46


Use new asm! syntax

Though llvm_asm! is still supported, it won't be stable. asm! is better.

Thank you!


site mobile view broken

desktop chromium in mobile mode, same with Firefox/Android

Tried to make it a bit better.
Sorry, apparently I'm pretty bad at CSS.

google ok, firefox still looks bad but usable now

If it bugs you, try installing Firefox


runserver_plus does not restart on python changes when using jython

To replicate:

jython manage.py runserver_plus
edit any .py file / server will not restart
touch same file's $py.class counterpart / server will restart

What should happen?
runserver_plus should monitor .py files instead of $py.class files.

If this is still a problem please submit a PR.
Thanks


Support for [Remnant: From the Ashes]

Game name: "Remnant: From the Ashes"

Game package name: "PerfectWorldEntertainment.RemnantFromtheAshes_jrajkyc4tsa6w"

Hi,
Thanks for providing such awesome tool. If I may ask, how long it takes to get my game supported?

Hey, sorry for the delay!
I've added support for Remnant: From the Ashes, but as I don't have it, I can't confirm if it works correctly.
What I've seen from a random downloaded Steam save and your wgs, it should work.
If you have Python installed, you can try to download the repo and run the main.py script, but if you don't have the know-how, you can wait a bit so that I can create an exe release later today.

This is now supported in the latest release https://github.com/Z1ni/XGP-save-extractor/releases


[Google Drive] Infinite inital loading

Extension – Google Drive
Author: @vishaltelangre

Description

Steps To Reproduce

Set up the Google Drive path (/Volumes/GoogleDrive)
Run "Search Files" command

The current behavior
List doesn't load
The expected behavior
List should load
Raycast version
Version: 1.33.2

@aesign Thanks for reporting it.
Did it crash or did the files eventually start showing up (and after how much time)?
Also, how many files do you have in your Google Drive folder (try running the following commands)?
cd /Volumes/GoogleDrive
find . -type f | wc -l

BTW, it takes about 20 seconds for me to build an initial files cache index of about 6840 files. Once the cache index is built, it won't reindex again (until after 7 days or a manual reindexing).
If there are some folders with a lot of files in them (that are of not much use to you) then you can exclude them using the comma-separated Exclude Paths preference (see screenshot) and rebuild the files cache index (using the actions menu).

Besides, I have added a helpful toast message in https://github.com/raycast/extensions/pull/1560 to reduce confusion around this.


Enzyme 3.2.0 not properly detecting length returned by cheerio.

Using<EMAIL_ADDRESS>and<EMAIL_ADDRESS>and given a very simple React component named Blurb with a render() method of...
  render() {
    const Tag = 'div';

    return (
        <Tag
          className={this.props.classes}
          dangerouslySetInnerHTML={{ __html: this.props.html }}
          ref={(el) => { this.el = el; }}
        />
    );

the following test fails...
    it('should render a
 with Hello World! as html', () => {
      const string = 'Hello World!';
      const wrapper = render(
        <Blurb html={string} />
      );

      // these assertions fail
      expect(wrapper.find('div').length).toBe(1);
      expect(wrapper.find('span').length).toBe(1);
      expect(wrapper.find('span').text()).toBe('Hello World!');
    });

The first assertion, wrapper.find('div') has a length of zero.  However, adding
console.log(wrapper.find('div')) above // these assertions fail shows that the div tag does exist.  Here is the output from that debug statement.
initialize {
  options: {
    withDomLvl1: true,
    normalizeWhitespace: false,
    xml: false,
    decodeEntities: true
  },
  _root: initialize {
    '0' : {
      type: 'tag',
      name: 'div',
      namespace: 'http://www.w3.org/1999/xhtml',
      attribs: [Object],
      'x-attribsNamespace': [Object],
      'x-attribsPrefix': [Object],
      children: [Object],
      parent: null,
      prev: null,
      next: null,
      root: [Object]
    },
    options: {
      withDomLvl1: true,
      normalizeWhitespace: false,
      xml: false,
      decodeEntities: true
    },
    length: 1,
    _root: [Circular]
  },
  length: 0,
  prevObject: initialize {
    '0' : {
      type: 'tag',
      name: 'div',
      namespace: 'http://www.w3.org/1999/xhtml',
      attribs: [Object],
      'x-attribsNamespace': [Object],
      'x-attribsPrefix': [Object],
      children: [Object],
      parent: null,
      prev: null,
      next: null,
      root: [Object]
    },
    options: {
      withDomLvl1: true,
      normalizeWhitespace: false,
      xml: false,
      decodeEntities: true
    },
    length: 1,
    _root: [Circular]
  }
}

It seems that, perhaps, Cheerio has updated the shape of the object returned by the cheerio find() method and Enzyme is perhaps looking in the wrong place to retrieve the length: 1 shown in the debug output.

wrapper.find('div') is empty because wrapper is the div. Try wrapper.is('div').

enzyme delegates entirely to cheerio - once you have the result of render(), it's out of enzyme's hands.


Unable to modify identifier in preprocessor

It’s not possible to change the identifier of an item or layout in the preprocessor, because #identifier= does not exist.

This probably is related to #571: being able to modify the identifier in the preprocessor will mean having functionality that is only available in the preprocessor; similar to how there needs to be functionality that is only available outside of the preprocessor.

On second thought, not related to #571: adding #identifier= to the mutable document views is enough.

Fixed in #750.


QUE: Random Forest vs Gradient Boosting

Adding a new medium difficulty question on the difference between random forest and gradient boosting methods. Also, adding new tags for the question in ./tags.md.

@Garg-Doppler let's stick to squash and merge per question to keep the history linear. Merge commit should be rarely used unless the PR is huge and then it is useful and we may want to merge commit to keep the commit history of the changes.


Keep track of incoming invites you accepted/rejected?

Although cs3apis offers a 'GenerateInvite' method, there is currently nothing in cs3apis that tracks sent or received invites.
Reva does track sent invites and in #128 we are exploring how we can add a "backdoor" so the user can also view the generated invites
But neither cs3apis nor Reva offer anything for tracking incoming invites. We could track incoming invites at the efss app level though.

I think it is impossible to track invites that are incoming. The reason is that the user receives the invitation link either via e-mail, chat or printed out and send using pidgeon service :), and we have no knowledge to where it is incoming, its completely up to him, on which system does he choose to accept the invite, and once done, it is an invite no more. It pops up in accepted users, for which there is an API call FindAcceptedUsers.

When Einstein generates an invite and shares it to Marie, it contains Einstein's providerDomain, which is probably equal to Einstein's IDP, but it doesn't contain Einstein's opaqueId.
Marie puts it into her EFSS GUI;
From there it goes to her Reva with her opaqueID and IDP added, then to Einstein's Reva.
So Einstein's EFSS/Reva knows Marie's opaqueID and IDP, and
Marie's EFSS/Reva knows Einstein's providerDomain, and a unique identifier for the invite (the token).
Marie's EFSS/Reva could keep track of the invites that passed through it.

It pops up in accepted users, for which there is an API call FindAcceptedUsers (but this will probably happen on the invitation sender's side only?).

Correct, Marie becomes an accepted user ("ScienceMesh Contact") of Einstein, but Einstein becomes nothing of Marie. See #130 about that too.


Create matching tutorial - System.NullReferenceException

In the Create matching tutorial there is an exception error.
When i running the code, at the firstClicked.ForeColor = firstClicked.BackColor; line :  System.NullReferenceException
I dont know why.
private void timer1_Tick(object sender, EventArgs e)
{
// Stop the timer
timer1.Stop();
        // Hide both icons
        firstClicked.ForeColor = firstClicked.BackColor;
        secondClicked.ForeColor = secondClicked.BackColor;

        // Reset firstClicked and secondClicked
        // so the next time a label is
        // clicked, the program knows it's the first click
        firstClicked = null;
        secondClicked = null;
    }

@victoryus -- thank you for your feedback regarding this article.

Tutorial: Add reference variables and a timer control to your matching game WinForms app

Please consider these resources:

Visual Studio on Microsoft Q&A
Visual Studio MSDN Forum
Stack Overflow
Reddit

@anandmeg -- please look into this potential documentation issue.

@victoryus, thanks for your feedback!
I'm unable to repro the NullReferenceException error after I follow through all the steps in the tutorials.
Could you please confirm that your code for the label1_Click method after step(5) in the Add a timer section looks like the sample code for private void label1_Click(object sender, EventArgs e).
I've updated the following two tutorials in this series to improve the flow a bit - the changes should be live later today.
2. Add icons to your match game
3. Add labels and a timer


Can't install fibers

I recently moved to Win10, so I thought I should do some retesting of JSFBP.  I have been struggling with this nonsense for over a week, and do not seem to be any closer.
I believe that I need Python 2.7, and Visual Studio Tools 17.0.  I have (probably) reinstalled gyp hundred times.  I usually get a message about Retargetting to Tools V141, but this seems to have gone away with Visual Studio Tools 17.0, but that's about it!
Could someone try installing fibers, and let me know how you did it...?!
TIA,
Paul
PS @comfreek , npm used to be a stable ecosystem, but I can't say that is true any more!  It shouldn't be this difficult!

Moved up to node 10.16.0 and npm install fibers worked like a charm!  Will remove extra VS stuff for now!


chore: nix flake update

Updating dependencies so CI passes again.

I think it just needs to build a lot of stuff and times out because of it. After a retry or two it should have everything in the cache.

Ugh, its a real problem, investigating

Seems to be pretty consistently failing with
fedimint-test-all-wasm32-unknown-unknown-ci> 00:04:06 2024-08-19T20:13:02.830128Z  WARN fm::devimint: failed to terminate lightningd plugins: command: lightning-cli --network regtest --lightning-dir=/build/lnv2_module-3fpP/devimint-16383-993/cln plugin stop gateway-cln-extension
fedimint-test-all-wasm32-unknown-unknown-ci> 00:04:06
fedimint-test-all-wasm32-unknown-unknown-ci> 00:04:06 Caused by:
fedimint-test-all-wasm32-unknown-unknown-ci> 00:04:06     exit status: 2
fedimint-test-all-wasm32-unknown-unknown-ci> 00:04:06     stdout:
fedimint-test-all-wasm32-unknown-unknown-ci> 00:04:06
fedimint-test-all-wasm32-unknown-unknown-ci> 00:04:06     stderr:
fedimint-test-all-wasm32-unknown-unknown-ci> 00:04:06     lightning-cli: Connecting to 'lightning-rpc': Connection refused
fedimint-test-all-wasm32-unknown-unknown-ci> 00:04:06
fedimint-test-all-wasm32-unknown-unknown-ci> 00:04:06

These changes have nothing to do with lightning though

Might be easier just to merge https://github.com/fedimint/fedimint/pull/5871, since it changes how the gateway-cln-extension is used in the devimint tests, and that seems to be what is failing consistently here.


python38Packages.jupytext: 1.13.3 -> 1.13.4

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python38Packages.jupytext is: "Jupyter notebooks as Markdown documents, Julia, Python or R scripts"
meta.homepage for python38Packages.jupytext is: "https://github.com/mwouts/jupytext"
meta.changelog for python38Packages.jupytext is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
/nix/store/x9fijzj9rs29q1nydjcirb07jpzjk3yz-python3.8-jupytext-1.13.4/bin/.jupytext-wrapped passed the binary check.
/nix/store/x9fijzj9rs29q1nydjcirb07jpzjk3yz-python3.8-jupytext-1.13.4/bin/jupytext passed the binary check.
2 of 2 passed binary check by having a zero exit code.
2 of 2 passed binary check by having the new version present in output.
found 1.13.4 with grep in /nix/store/x9fijzj9rs29q1nydjcirb07jpzjk3yz-python3.8-jupytext-1.13.4
found 1.13.4 in filename of file in /nix/store/x9fijzj9rs29q1nydjcirb07jpzjk3yz-python3.8-jupytext-1.13.4

Rebuild report (if merged into master) (click to expand)

6 total rebuild path(s)

3 package rebuild(s)

3 x86_64-linux rebuild(s)
3 x86_64-darwin rebuild(s)

First fifty rebuilds by attrpath
docbookrx
python38Packages.jupytext
python39Packages.jupytext

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/x9fijzj9rs29q1nydjcirb07jpzjk3yz-python3.8-jupytext-1.13.4 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python38Packages.jupytext https://github.com/r-ryantm/nixpkgs/archive/ce2477ac2983cb02aa037a84800bc08e64c2d193.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/x9fijzj9rs29q1nydjcirb07jpzjk3yz-python3.8-jupytext-1.13.4
ls -la /nix/store/x9fijzj9rs29q1nydjcirb07jpzjk3yz-python3.8-jupytext-1.13.4/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages built:

python38Packages.jupytext
python39Packages.jupytext

Maintainer pings
cc @timokau for testing.

Jupytext was already updated to a newer version (#152695).


feat:  Show a box outline for IOS QR Code Scan

Plugin(s)

[X] Barcode Scanning
[ ] Face Detection
[ ] Face Mesh Detection
[ ] Selfie Segmentation
[ ] Translation

Current problem
Android has a nice box outline for scanning the QR Code. I.e - where to position the qr code for it to scan.
A feature like this on ios would improve user experience.
Preferred solution
show box outline on ios camera when scanning qr code
Alternative options
No response
Additional context
No response

Hey, thanks for your request. Which plugin method are you referring to?

Hey, thanks for your request. Which plugin method are you referring to?
MLKit barcode scanner

MLKit barcode scanner

This is just the plugin name. Which method (see API) are you referring to?

MLKit barcode scanner

This is just the plugin name. Which method (see API) are you referring to?

I am using BarcodeScanner.startScan()

You need to manage the whole user interface yourself when using the "startScan(...)" method.
I recommend testing the "scan(...)" method.
Please take a look at this guide: https://capawesome.io/blog/announcing-the-capacitor-mlkit-barcode-scanner-plugin/#scan-barcode-with-ready-to-use-interface

You need to manage the whole user interface yourself when using the "startScan(...)" method. I recommend testing the "scan(...)" method. Please take a look at this guide: https://capawesome.io/blog/announcing-the-capacitor-mlkit-barcode-scanner-plugin/#scan-barcode-with-ready-to-use-interface

I thought scan() was only for android using the google scanner?

It's also available on iOS as described in the documentation:

Only available on Android and iOS.


Add Mongo CommandListener rule

Adds Byteman rules and tests for https://github.com/opentracing-contrib/java-mongo-driver auto-instrumentation.

@objectiser thanks for the review.  I believe I've addressed everything, but it looks like I should also add the introduced dependencies to the root pom w/ compile scope as the others have done?

@objectiser, appreciate the help.  Updated.

@rmfitzpatrick Thanks!

Released in 0.5.0.


Improve main page load time

The main page (/) in production seems to have slow load times, with a median around 1.2 to 1.3 seconds.

Tried a couple of different page speed analyzers, and our biggest issue is images.  Image load times seem to range from 1 to 4 seconds.

Also, Google recommends sending js in smaller payloads.


feat: docs feedback form created

Description
This PR is related to issue #453 where I have added a Docs Feedback Form at the end of each doc to take feedback from the users and store it in a Google spreadsheet connected through Google OAuth and Google Sheets API. So far discussed in the issue, I have implemented the design in the PR and it is working fine. Also, the backend facility of taking the data to the spreadsheet has been made and it is in my local dev environment. It is because some Google environment variables are not set in the netlify deployment, so the facility will fail on the deployment as soon as it is pushed. I request the maintainers and community founders to kindly add more environment variables in the production to make this feature fully responsive on the website.
Here's the list of env variables to be added:

CLIENT_EMAIL - Google Service Account that will be added as an Editor role in the spreadsheet to add the data
CLIENT_ID - Provided by the Google Developer console for the access of APIs.
PRIVATE_KEY - Provided by Google for OAuth purpose
SPREADSHEET_ID - Provided by Google Sheets on which spreadsheet we will be storing the data.

Apart from the above variables, we need to create Google Service Account (if hasn't been created yet) and enable the Editor role to that account in the spreadsheet. I will highly recommend if @magicmatatjahu or @fmvilas could connect to me in a call for further explanations of what exactly will be needed to set up the variables. This PR will be as a draft PR till the environment variables and the backend will be pushed in the repository. Any suggestions are warmly welcomed on this PR :smile:.
Preview of the backend facility from my local dev environment
https://user-images.githubusercontent.com/76521428/155939352-9dc50660-3b4b-4cbd-adaf-ace8850e8d4d.mp4
Related issue(s)
Resolves #453

As discussed in the issue, we can have netlify functions to implement the functionality for implementing the process. Right now, data is going through a POST request and it is handled inside a api folder in pages. If you think that it should be separately done in netlify, then I will look in something more on how to implement it in that way.

@akshatnema Thanks for that PR. I don't have permissions to create/setup such a envs and then connect them in the Netlify (we need your help @fmvilas @derberg).
As I understand you have backend but you didn't push it. Of course you can, it's not a problem. We don't need to wait for envs. However I'm not a fan of having access to that envs in the PRs. Why? People can make simple console log and then log all envs that we have. It's not a good idea. As I know Netlify has possibility to setup envs only for master branch and currently we use that for Zenhub and Github tokens (for fetching the roadmap data).
About Netlify function or API on the NextJS side: we use the static site generation, but if that API works with static site (please build site and then host it in your local machine and try run that API) we can go with that solution, it will be perfect :)
So please push changes for API and I can make review.

@magicmatatjahu Yepp, I pushed the backend in the PR. And as expected, the form will not work as there will be an internal server error (shown in the Browser console window). This happens because there is no OAuth and spreadsheet connected to it using envs. API is working perfectly fine in my local environment as you can see in the preview above, but I can't able to deploy it on my Netlify account. Errors are already sent to you on Slack. I also want to raise certain issues on design perspective and want to discuss with you:

While submitting the form, right now we can't able to categorize feedback in the sheets. We do have to pass a name parameter in the sheets to perfectly identify on which doc, feedback has been sent by the user. It is not a big task and can be done very easily.

Right now, Feedback form is right at the end of the doc. But, what I prefer is to have this component before Up Next and Go Back Buttons. It is ideal place to render this component there. What we have to is to add the Feedback component at the end of each doc (on each md file), before the buttons. Will this be a good idea to do?

Preview of the Server error on the preview:

@akshatnema

Yepp, I pushed the backend in the PR. And as expected, the form will not work as there will be an internal server error (shown in the Browser console window). This happens because there is no OAuth and spreadsheet connected to it using envs. API is working perfectly fine in my local environment as you can see in the preview above, but I can't able to deploy it on my Netlify account. Errors are already sent to you on Slack. I also want to raise certain issues on design perspective and want to discuss with you:

Please don't worry, as I wrote, we should not add access to these envs on the PRs, because people will be able to log them. They should be only available on master build.
Also I see that your PR was properly built, so is there a problem yet?

While submitting the form, right now we can't able to categorize feedback in the sheets. We do have to pass a name parameter in the sheets to perfectly identify on which doc, feedback has been sent by the user. It is not a big task and can be done very easily.

You should retrieve name of doc from NextJS Router Context (I guess, you should test it) :)

Right now, Feedback form is right at the end of the doc. But, what I prefer is to have this component before Up Next and Go Back Buttons. It is ideal place to render this component there. What we have to is to add the Feedback component at the end of each doc (on each md file), before the buttons. Will this be a good idea to do?

I checked some sites (including NextJS documentation) and I see that feedback form is always after the next/prev buttons so I think the current location is good :) In addition, we could display only the "add feedback" button at the beginning and when someone clicks it, the whole form will appear. Currently it is very "explicit" (I don't know how to describe it 😅 ) in the documentation and people can focus on it and not on the documentation.

You should retrieve name of doc from NextJS Router Context (I guess, you should test it) :)

Ok 👍, will definitely look into this and will update the backend accordingly.

In addition, we could display only the "add feedback" button at the beginning and when someone clicks it, the whole form will appear

Ok, will look into this and I will try to implement it in a better way. As it was not mentioned before in the issue, I haven't thought of it yet.

@akshatnema token on Netlify that has rights to create discussions is there, env name -> GITHUB_TOKEN_CREATE_DISCUSSION

@derberg Thanks Lukasz for creating it 😊. It will be needed when this is pushed in production. But, I need some more details regarding createDiscussion functionality. Here are they:

Will the functionality be creating a discussion on this website repository or some other repository will be specified for creating Discussions?
Please create a category in the Discussions of the repository because it will be needed in the mutation of the graphql query.
As you can see through the design, we are only taking feedback and it will be taken as our body of the discussion, but how we will be providing a unique title to each Discussion created. Can you specify any criteria to name them?
For each Discussion created, we have to distinguish from which doc page, the feedback has been submitted. For this, my approach is to push the title of doc OR slug of the doc to the title of the Discussion created. But, if 2 or more feedbacks are generated from the same doc, then we need to append some numbers at the end of each Discussion title to uniquely identify them.

I will also like a review of @magicmatatjahu on the above questions mentioned.

@akshatnema

it will go to website repo
Docs Feedback category created https://github.com/asyncapi/website/discussions/categories/docs-feedback. @alequetzalli we can rename if you want.
IMHO we can copy approach that I know from giscus that I use for my personal blog to have comments functionality. So there is always one discussion per path. Then each new feedback is another comment. Example https://github.com/derberg/derberg.github.io/discussions/60. What are the advantages:

you can quickly see which documentation pages get most feedback
feedback = comment is ok as you can still have thread discussion under a comment.
single comment can be used to create a followup issue
@alequetzalli can for example use emojis to mark comments that are already actionable for example, and she can process feedback for one document in one view

But I have to say I do not really have a strong opinion on above 🤷🏼 except for that I think it must be website repo

But I have to say I do not really have a strong opinion on above 🤷🏼 except for that I think it must be website repo

@derberg the approach you mentioned is even more hard to implement because if you see the implementation and rendering of the component, you will find that on each doc, the same component is rendered without any specific components for each doc.  This means that the feedback submitted on a doc, the response we get back can be seen from every doc 🙂. So, that's what I am planning to have either NextJS Context or some variable to uniquely identify the feedback for each doc. We can surely can't make comments approach (as mentioned by you) because there are no different routes defined for the POST request made in the component. Hence, I will suggest to have createDiscussion functionality for the feedback.

it will go to website repo
Docs Feedback category created https://github.com/asyncapi/website/discussions/categories/docs-feedback. @alequetzalli we can rename if you want.

Feedback on discussion category URL
Hey, @derberg and @akshatnema! 😄  Just a comment on the created Docs Feedback discussion category suggested above.
I already have a Docs discussion category going here and I think it makes more sense to use that one:
https://github.com/asyncapi/community/discussions/categories/docs

Question on SUBMIT button in feedback card
I used the Netlify preview link to test how the feedback card is working so far. I see that the SUBMIT FEEDBACK button still doesn't do anything. This is expected, right? Just wanted to make sure.. I assume it's because we still are figuring out how that button will work 😄

I already have a Docs discussion category going here and I think it makes more sense to use that one:

Fine, I will add the category and repository ID to that one in mutation. It will then create the discussion on that particular category :slightly_smiling_face:.

Just wanted to make sure.. I assume it's because we still are figuring out how that button will work :smile:

@alequetzalli Regarding the working of this button, yes it is not working right now because I pushed the backend of the form, using Google Sheets API, but due to the unavailability of environment variables, it will not work right now. I recommend you to read the description of this message https://github.com/asyncapi/website/pull/609#issue-1153748991. See the preview of the button (as shown in the video) and you will get what it does.

Hey @magicmatatjahu @derberg @alequetzalli, I have made the backend functionality of creating a GitHub discussion on Docs category of community repository. Although, the preview shown in the video contains the Discussion of my own project (for my testing), but I have updated the IDs to make a Discussion on Docs category. I want a review from all of you regarding the changes made and your suggestions are welcomed :slightly_smiling_face:.
Preview of the Functionality:
https://user-images.githubusercontent.com/76521428/157867993-e28ec24b-df34-4221-8b6b-154e1ad8bbd1.mp4
Keypoints to notice

The title of the Discussion -  I'm not quite sure whether the title of the discussion made, is correct or not. So, I want your suggestions on how to modify and make it meaningful.
The creator of Discussion - Although in the preview, it is shown that the Discussion has been made using my ID, but it is not that one. It depends on the bearer token used for making the backend. So, it depends on Lukasz from which account he has made the Personal Access Token.

The title of the Discussion -  I'm not quite sure whether the title of the discussion made, is correct or not. So, I want your suggestions on how to modify and make it meaningful.
The creator of Discussion - Although in the preview, it is shown that the Discussion has been made using my ID, but it is not that one. It depends on the bearer token used for making the backend. So, it depends on Lukasz from which account he has made the Personal Access Token.

@akshatnema THIS IS PERFECT 🤩 !!!! Thank you so much for contributing to this new feature! This will greatly help improve both the Docs and the user experience of our readers ❤🎉🎉
To address your point on Discussion title from my perspective: I like this one because I can tell right away from what doc page/section the feedback came from. This is very helpful and organized. I like keeping it simple I think 🤔

I already have a Docs discussion category going here and I think it makes more sense to use that one:
https://github.com/asyncapi/community/discussions/categories/docs

@alequetzalli just to make sure. I created Docs Feedback in website repo. You point to Docs category in community repo. Does that mean you want this feedback to be sent to discussions under community repo? or rename Docs Feedback from website to Docs?

The title of the Discussion

@akshatnema there is no Id in the title. How do you handle 2 feedbacks from the same page.
Also about having feedback for one document under one discussion. Can't you in the underlying function just first make a GraphQL query to check if discussion for a given page already exists, and if yes, make an update mutation, and not create?

@akshatnema there is no Id in the title. How do you handle 2 feedbacks from the same page.

@derberg That's exactly what I mentioned in my comment https://github.com/asyncapi/website/pull/609#issuecomment-1063019031. We have to bring up some scenario to handle the uniqueness. What I thought is to make the title like Feedback submitted on (slug) - (number) where the number will be (no. of Discussions in the category + 1). For the number of Discussion we can have a previous GraphQL query to find TotalCount. This is my idea to implement it, if anyone has other ideas/implementation, do tell me.

Can't you in the underlying function just first make a GraphQL query to check if discussion for a given page already exists, and if yes, make an update mutation, and not create?

I will suggest not to implement this approach because if a certain discussion is going on for feedback, it will be quite awkward if another feedback comes on the same page, but on a different topic. It is better if we isolate each feedback from others and whichever gets resolved or discussed properly, that discussion will be closed manually. But if you think, we should go with your approach, then I will change it accordingly.

I will suggest not to implement this approach because if a certain discussion is going on for feedback, it will be quite awkward if another feedback comes on the same page, but on a different topic.

you are right on this

that discussion will be closed manually

but the thing about discussions is that they are not "closable". They are open forever, only q&a category can be answered, but not closed
anyway, might be better to actually split it as you suggest I guess.
In regards to Id in the title, it can be as you suggested, but it can also be a timestamp or anything that would be less complicated than querying for total number of discussions. Unless you mean count discussions from the same slug, then it makes sense I guess

I already have a Docs discussion category going here and I think it makes more sense to use that one:
https://github.com/asyncapi/community/discussions/categories/docs

@alequetzalli just to make sure. I created Docs Feedback in website repo. You point to Docs category in community repo. Does that mean you want this feedback to be sent to discussions under community repo? or rename Docs Feedback from website to Docs?

The title of the Discussion

@akshatnema there is no Id in the title. How do you handle 2 feedbacks from the same page. Also about having feedback for one document under one discussion. Can't you in the underlying function just first make a GraphQL query to check if discussion for a given page already exists, and if yes, make an update mutation, and not create?

@derberg Correct, I wrote exactly that :) ...@akshatnema understood accordingly.

@alequetzalli but I asked a "chose answer" question and not "yes/no" question 😄 thus I do not know what is "correct"

Does that mean you want this feedback to be sent to discussions under community repo? or rename Docs Feedback from website to Docs?

@alequetzalli but I asked a "chose answer" question and not "yes/no" question 😄 thus I do not know what is "correct"

Does that mean you want this feedback to be sent to discussions under community repo? or rename Docs Feedback from website to Docs?

Basically your original comment assumes that I didn't know what I was writing in my comment and that I made a mistake. If you do not assume I made a mistake and reread my comment I think you will find the answer 😄🤘🏽

Basically your original comment assumes that I didn't know what I was writing in my comment and that I made a mistake. If you do not assume I made a mistake and reread my comment I think you will find the answer 😄🤘🏽

omg 😆 let me try 👴🏼 👁

they can't be closed but they can be either deleted or locked so that it signifies that the feedback is properly discussed among the community members and no longer comments are required

@akshatnema yeah deleted is not really an option in this community 😄 . I know about locking but the discussion is still visible. like you know, all the time on the list with others, not like with issues and prs, that by default closed ones are not shown.

Hmm, this can't be possible because we are providing a unique id at the end of each title and there is nothing we can count the number of discussions for a particular slug. But it can happen that we can acquire total number of discussions on that particular category like this

@akshatnema but you can grab a list of all discussions, and their titles, and them map through them to see if there is any consisting the related slug. I think this feedback form will be the only one using such format, so there will be no risk that we will also count manual feedback of some folks. You can do "startsWith" Feedback and "contains" given slug? What do you think?

Basically your original comment assumes that I didn't know what I was writing in my comment and that I made a mistake

@alequetzalli yes, I admit that was my assumption, well spotted 😄 . I reread your: Correct, I wrote exactly that :) but I have to be honest I have to give up 😛 I really do not know what you mean 😅

Sorry for the delay in reply. I was busy with my college and hostel 🤒.

yeah deleted is not really an option in this community 😄

@derberg Yepp, I agree that deleted is not a good option and closed is not an option here. Then, do you have any idea on how to make it closed from the community if resolved. Because even though we will make functionality of adding a comment on the discussion that is not resolved, it will be still visible to everyone.

but you can grab a list of all discussions and their titles, and them map through them to see if there is any consisting the related slug

@derberg if you see my preview video in the message https://github.com/asyncapi/website/pull/609#issuecomment-1065079944, we are already getting a delay of around 5 seconds for a single query/mutation made. If we add more queries using GraphQL, it will certainly add more time to it. So, in my point of view, so much delay in the functionality may appear to be a broken end in the website and it will not be a good presentation to our users. Hence, I am bit reluctant in adding that. What's your view here?

Because even though we will make functionality of adding a comment on the discussion that is not resolved, it will be still visible to everyone.

yes, but then it makes sense that it is never closed, as it is just a living feedback discussion that can be updated anytime

So, in my point of view, so much delay in the functionality may appear to be a broken end in the website and it will not be a good presentation to our users. Hence, I am bit reluctant in adding that. What's your view here?

but you anyway need to get a list of all discussions to do the count, so I'm just suggesting to grab titles with the same query. But I'm guessing in your presentation, query to get all discussions is not yet used.

I would say it all depends on @alequetzalli and where does she want the feedback land, because:

if community repo, then I'm super strongly opinionanted to have feedback as comment to single doc-related discussion, to not generate to much noise in community repo
if website then I don't care much really, we can have discussion per feedback, and in the title we can just add Id that is a timestamp and that is it - fastest operation we can get

yes, but then it makes sense that it is never closed, as it is just a living feedback discussion that can be updated anytime

@derberg So, what we can do is to make the discussions for each page before in the community repo and then, we can add comments to it as feedback submitted to it. Will it be fine? We then don't have to query whether the particular slug discussion happens or not.

but you anyway need to get a list of all discussions to do the count, so I'm just suggesting to grab titles with the same query. But I'm guessing in your presentation, query to get all discussions is not yet used.

I think you misinterpreted the meaning of "presentation" here, which I mean to convey. What I want to say is that, while a user will submit feedback, it will take a huge delay (of around 6-8 seconds) to pop up on the screen that the feedback is submitted. Because the function made in sheet.js is asynchronous and till the whole process is completed, it won't show anything. Right now, the feedback is taking around 5 seconds to get submitted and then show the results on the screen. Adding more queries will increase the delay more and we should avoid it to have a good user experience.

@derberg @akshatnema Hello again 😄!  Yes, again, I still think it should go in the community repo. And I to have the title clearly show which Doc page it is about.

I still think it should go in the community repo. And to have the title clearly show which individual Doc page it is about.

Thanks, @alequetzalli for clarifying it :smile:. So, @derberg, as suggested by you in the comment https://github.com/asyncapi/website/pull/609#issuecomment-1070836802, in the community repo, we should add comments to respective doc-discussions instead of making Discussion for each feedback. If you say 'Yes' to this approach, in that way you have to first make the discussions for each doc first, in the name of their slug, example - /docs/getting-started, so that I can easily get an ID of the discussion through GraphQL query. When you get done with this, it will be then very easy to implement the functionality. I prefer not to check for the particular Discussion through GraphQL query because it will be checked only once for the first time.

I still think it should go in the community repo. And to have the title clearly show which individual Doc page it is about.

Thanks, @alequetzalli for clarifying it :smile:. So, @derberg, as suggested by you in the comment https://github.com/asyncapi/website/pull/609#issuecomment-1070836802, in the community repo, we should add comments to respective doc-discussions instead of making Discussion for each feedback. If you say 'Yes' to this approach, in that way you have to first make the discussions for each doc first, in the name of their slug, example - /docs/getting-started, so that I can easily get an ID of the discussion through GraphQL query. When you get done with this, it will be then very easy to implement the functionality. I prefer not to check for the particular Discussion exist or not through GraphQL query because it will be checked only once for the first time.

If it isn't possible totally get it, for sure just tell me what you all think too 😄👋🏽

@akshatnema let's just make it simple first in favor of better performance. So discussion per feedback with id in the title from a timestamp. We will see know much feedback comes in from the community and then we will see if we need more improvements

@derberg Will this work instead of just an ID timestamp? because only adding an ID number to the title looks quite odd. But I'm not sure which timezone it will take to add the timestamp. Most probably it will take the user's present time and will make a Discussion title according to it.

lgtm, definitely better than a random number

@derberg Will this work instead of just an ID timestamp? because only adding an ID number to the title looks quite odd. But I'm not sure which timezone it will take to add the timestamp. Most probably it will take the user's present time and will make a Discussion title according to it.

This is looking great for sure!! Really love the way the page title shows right away ✨✨✨

@derberg @alequetzalli PR is ready for the review now :sparkles:. Do ask or suggest the changes you think are valid to add to this PR.

Hey @akshatnema😄👋🏽
Question... The submit feedback button doesn't seem to be working for me. When I clicked on it after writing a sample test comment, nothing happened. Are you sure it's working OK?

Are you sure it's working OK?

@alequetzalli Yepp, it's working but not in preview URL because in the preview given by the Netlify, the environment variables are not used. To test the actual functionality of this PR, you need to follow the steps below:

Clone this PR using the following commands:git remote add akshatnema https://github.com/akshatnema/website.git
git fetch akshatnema docs-feedback
git switch --track akshatnema/docs-feedback

Make a .env.local file and a environment variable named GITHUB_TOKEN_CREATE_DISCUSSION. Add your personal access token there and make sure that token has access enabled for making Discussions on repo. Guide to Personal Access Token.
And then, npm run dev to run the repo in local PC :slightly_smiling_face:. You can then test the feature there and it will make a Disucssion on the Docs category of community repo for each feedback, with your name as the creator of Discussion.

You can even read the description of this PR for more information regarding that Button and I even answered you in this https://github.com/asyncapi/website/pull/609#issuecomment-1064780052.

I request maintainers to pin or highlight this comment in PR so as any other reviewer don't face any difficulty regarding this.

@akshatnema yo, I looked at the code and I need to clarify with you few things. AsyncAPI website is not running on a server but it is fully client side. This means that to have a logic that calls any API with token, such logic must be written as Netlify Function. You cannot have any logic running on a client as client has no access to GH token to create discussions. In other words, GH Discussion logic cannot be in pages/api but in netlify/functions. It must be in a function that you can invoke from a client-side. I hope it makes sense. So basically your code to call GH GraphQL API is good, but just not used properly in the project
Have a look at these simple instructions on how to kick off with functions

Thank you for explaining why I couldn't test the functionality in the preview link! @akshatnema I was so sorry I had you repeat yourself, I think that this ticket is more technical than I anticipated and the thread is getting really long so I accidentally keep getting lost. 🤭😬😬
OK I will wait to see what changes you make based on the latest comment from Lucasz and then I will be excited to test it out again ♥

@derberg While pushing the netlify functions in this PR is not creating the functions on the actual deploy because Netlify doesn't allow to create functions using Pull Request. Hence, I can't able to test it on the endpoint as well as locally. Any solution to resolve it?

@magicmatatjahu you are the only person I know that actually wrote Netlify Function for production. Do you remember how we did it in Kyma. Did we just test it on production? 😄

@derberg Yes, we tested them on the PRs. You can also check logs from latest build on this PR that Netlify bundled functions, but I don't know if Netlify serves it, because there is an info that no new function isn't deployed.

You can test it on https://deploy-preview-609--asyncapi-website.netlify.app/.netlify/functions/handler but there is an error related to the wrong response shape (status and body) - I tested it with GET but function only works with POST so it should be tested by some curl/postman.

@akshatnema for testing function locally you can use this tool https://github.com/netlify/netlify-lambda. Here is an example of usage https://github.com/kyma-project/website/blob/main/package.json#L39-L40

@magicmatatjahu Thanks for providing resources for testing. I already corrected the issues I faced and the latest changes aren't yet pushed by me. I will push it soon. Just a matter of concern is I am changing the dev port of the website from 8080 to 3000. Will that be fine?
Reason: Netlify CLI connects the port 3000 to its own server and runs the website on port 8888 to have a complete backend and frontend connected together. If we don't do this, afterward, no one will able to figure out why Netlify is not connecting with its functions. It is difficult to figure out that they only work at port 3000.

Just a matter of concern is I am changing the dev port of the website from 8080 to 3000. Will that be fine?
Reason: Netlify CLI connects the port 3000 to its own server and runs the website on port 8888 to have a complete backend and frontend connected together. If we don't do this, afterward, no one will able to figure out why Netlify is not connecting with its functions. It is difficult to figure out that they only work at port 3000.

Is there any option to change port which Netlify connects? If not, you can change to the 3000.

Is there any option to change port which Netlify connects? If not, you can change to the 3000.

It is prebuilt in Netlify CLI. I tried a lot to make it on 8080 port, but spent around 6 hours and nothing worked there at all. So, I am pushing the latest changes now.

Function works https://deploy-preview-609--asyncapi-website.netlify.app/.netlify/functions/handler but as I see Łukasz and Alejandra are heavily involved in this PR then I don't interfere.

Function works deploy-preview-609--asyncapi-website.netlify.app/.netlify/functions/handler but as I see Łukasz and Alejandra are heavily involved in this PR then I don't interfere.

@magicmatatjahu I think you should also involve in this PR :sweat_smile:. Because you can understand those Neltify functions quite brilliantly. If anything goes wrong, you are best to help us here :smile:.

If everything looks fine, I request @derberg @alequetzalli @magicmatatjahu for the review of this PR. If certain more changes are needed, do ping me. I will take it for sure.
Secondly, as soon as you merge this PR, kindly check if everything goes fine in this regarding UI, Design, Resposniveness, creation of Discussions from Feedback, etc. If anything goes wrong after merging, do let me know in slack or via issues instantly so that we can fix it quickly.

I made review. We have to remember that our function is not secured and anyone will be able to send POST and there is a situation that someone malicious will create unwanted feedback for us.

@magicmatatjahu I agree that if someone knows the endpoint on which POST request is made, any bot or attackers can make numerous unwanted POST requests on it. I searched on Google to reduce but found that certain restrictions can be made on Apache servers in order to prevent unauthorized requests. We right now don't have one such facility with us. Anything you can suggest to implement to make it secure? Something like we only have POST requests approved from the website only and not anywhere else.

@akshatnema I'm not very good at security myself, but looking for info on the net I didn't find anything interesting that would help us. However to reduce the number of unwanted requests we should check in the function itself where the request is from, from which domain, and allow only our asyncapi.com domain. @smoya could you help here with security? You worked at Netlify so maybe you know how to secure it better?

@akshatnema @magicmatatjahu I would not overcomplicate. The only potential security issue is some "troll" spamming our GitHub Community Discussions and draining our token limits.
Just use CORS to make sure the function can be called only from asyncapi.com https://dev.to/weaponxii/handling-cors-with-netlify-post-requests-39ld and that is all

@derberg @magicmatatjahu I will like to raise my issues here what I got as an output on the implementation suggested by you.

Just use CORS to make sure the function can be called only from asyncapi.com dev.to/weaponxii/handling-cors-with-netlify-post-requests-39ld and that is all

I used this in the handler.js to restrict the access from other origins by changing the header "Access-Control-Allow-Origin" to some other address, but it is working on all. Seems like it isn't able to detect the headers applied in Netlify functions.

You should render that URL in the submitted form in UI as link :

I am not able to render the URL in the frontend because the Netlify function is not allowing to pass the body from the server-side to the client-side. You can read the whole details in this forum. I have used the callback function from the handler as suggested by some developers but nothing is working.

Sorry if I joined late into the party!
First, I would like to congrats @akshatnema, @alequetzalli, and the rest of the folks who are involved for the super great work you are doing here. Really neat 💯 .
In order to help other readers; the decision of moving from Google Spreadsheet to GH Discussions happened in https://github.com/asyncapi/website/issues/453#issuecomment-1056869912 and below.
Also, clarifying the reason behind needing a server to create the GH Discussion, which is nothing else than the need of anonymizing the content. Otherwise, GH Discussions could be created via query parameters such as https://github.com/asyncapi/website/discussions/new?category=docs-feedback&title=TEST_TITLE&body=TEST_BODY
Having said that, I proceed answering the question which made me passing by here 😄 :

However to reduce the number of unwanted requests we should check in the function itself where the request is from, from which domain, and allow only our asyncapi.com domain. @smoya could you help here with security? You worked at Netlify so maybe you know how to secure it better?

The reality is that even if we implement a captcha or similar, the server will continue being exposed.
And I can't come up with a final solution at this moment that allows the serverless function to only be executed it comes called from the website form. More details below. However, I will list some of the options it won't work (at least is what I think), and I will try to give another try on this later.
The following are discarded solutions (to me):
1. SetAccess-Control-Allow-Origin on the server side.
We might think that by CORS, setting the Access-Control-Allow-Origin to the website domain in the serverless function could solve the issue, but this is just applying to browsers, meaning anyone could copy the request made by the browser and execute it as cURL.
2.  Check origin or referrer headers
Do an extra check and only accept the request if the origin or referrer headers are the expected ones. As in the previous point, anyone could copy the request made by the browser and execute it as cURL.
3. Using JWT Token generating
JWT can be used to authenticate and authorize requests. They are tokens signed with a shared key.
Those tokens are sent to the backend in the Authorization header, meaning, as above, that anyone could copy the request made by the browser and execute it as cURL.
4. Using Netlify signed proxy redirects
Signed proxy redirects are a especial type of rewrites (not a redirect, means the content is rendered but the URL doesn't change for the client)  that proxies the request and injects a JWT token based on an environment variable.
We could use that and make the form point to to a path with that redirect to the serverless function and it will inject that JWT token, meaning we could verify it on it thanks to the env var used for that JWT.
This seems like the silver bullet right? Well, it's not. The point is that since our website source code is completely public, people will still have access to the URL of the function, since the redirects are configured at repository level by the _redirects or the netlify.toml file.

@akshatnema

I am not able to render the URL in the frontend because the Netlify function is not allowing to pass the body from the server-side to the client-side. You can read the whole details in this forum. I have used the callback function from the handler as suggested by some developers but nothing is working.

Ok so don't focus on it, we can skip that functionality.
@derberg we won't show the discussion url. Please see above.

@magicmatatjahu @derberg @smoya Thanks for reviewing the PR and offering good suggestions so that we can make the codebase more clear and optimal to everyone. I will answer to all the review comments on this weekend because I have exams in this week days 🙂. I will discuss and update this PR accordingly on the weekend.

@magicmatatjahu @derberg @smoya Thanks for reviewing the PR and offering good suggestions so that we can make the codebase more clear and optimal to everyone. I will answer to all the review comments on this weekend because I have exams in this week days 🙂. I will discuss and update this PR accordingly on the weekend.

@akshatnema I just wanted to say THANK YOU AGAIN for all of your work and help to the OSS Docs by doing this PR. Thank you for your contribution !! 🌟 🌟

@akshatnema all good from my side, I just need to ask you for one more thing. We agreed to change local dev port from 8080 to 3000 but you need to make a change in a few other places, like readme, or .env file and gitpod config

@derberg Kindly review the changes I made and do specify if I missed somewhere to change the details.
And looks like you have inbuilt an AI inside the GitHub actions, which has asked for a review from the most accurate person at the correct time :smile: (i.e. @alequetzalli).

@derberg any updates for this PR?

As everyone who was supposed to give approve gave approve, I merge. Let's hope there are no bugs in production 😄

/rtm

Something ain't working 😅

in the console I get 401 error but I checked and token is there in Netlify, with the name as you have it in code 🤔

@derberg Could you check logs of the Netlify Function? I don't have permission, but you should. We print error to the console, so there should be more info.

@derberg @magicmatatjahu So sorry, I found the error immediately. I forgot to change the category and repo ID after testing. I checked it right now and will soon correct it with the actual ones. Secondly, I got that in error view, Create Issue Button is not aligned correctly. I will make it correct and make a PR in a few minutes.

@akshatnema It is still failing after redeploy of the fix 😅
INFO   RequestError [HttpError]: Bad credentials
    at /var/task/node_modules/@octokit/request/dist-node/index.js:86:21
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Runtime.exports.handler (/var/task/netlify/functions/github_discussions.js:16:32) {
  status: 401,
  response: {
    url: 'https://api.github.com/graphql',
    status: 401,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      connection: 'close',
      'content-length': '83',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Mon, 25 Apr 2022 11:49:42 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'GitHub.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-media-type': 'github.v3; format=json',
      'x-github-request-id': 'E36C:2B43:297E7C7:505CBB2:62668AD6',
      'x-ratelimit-limit': '0',
      'x-ratelimit-remaining': '0',
      'x-ratelimit-reset': '1650890982',
      'x-ratelimit-resource': 'graphql',
      'x-ratelimit-used': '0',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Bad credentials',
      documentation_url: 'https://docs.github.com/graphql'
    }
  },
  request: {
    method: 'POST',
    url: 'https://api.github.com/graphql',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'octokit-graphql.js/4.8.0 Node.js/14.19.1 (linux; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: '{"query":"\\n        mutation { \\n            createDiscussion(input:{repositoryId:\\"MDEwOlJlcG9zaXRvcnkzNDc2MjE1NTk=\\", categoryId:\\"DIC_kwDOFLhIt84B_T4d\\", title:\\"Feedback on /docs/specifications/v2.3.1-2022-04-release.1 - Mon, 25 Apr 2022 11:49:40 GMT\\", body:\\"This release candidate was released by mistake and should be actually removed from the website with all related redirects. Only 2.4 RC is valid\\"}){\\n             discussion{\\n               url\\n             }\\n           }\\n        }","variables":{"owner":"asyncapi","repo":"community"}}'
  }
}

@akshatnema we only need a token of write:discussion scope, right?

@derberg Nope, it requires more than that. More specifically, it is kind of GitHub OAuth added to the backend which approves that the user is verified and then allows creating a Discussion. Hence, you need to give more permissions to the token. Following image will describe which permissions you need to give.

You can probably not give delete_repo and admin:repo_hook permissions but have to give the rest of the permissions to the token.

ok, not a token problem, I recreated it, with all possible scopes, like a god mode, and still Bad Credentials

GITHUB_TOKEN_CREATE_DISCUSSION is the name of env variable in Netlify, so correct one

I checked token with my postman client to call GraphQL API in the way you do it in your code and it worked fine. This is not needed but still, it should not cause 401

It hasn't created any error in the local environment yet. I'm not sure if this can create 401 error at production.

oh, I was actually now aware redeployment is needed after variable value change....Martin Fowler would not be happy about it 😆
Lemme try

yay https://github.com/asyncapi/community/discussions/340
congrats @akshatnema on amazing implementation 👏🏼

Thanks @derberg. I think you should now create an issue in the website repo on how to improve the title of the Discussion created by feedback. It is really looking very awkward right now for me.

yeah, let's see how people use it first, how often, etc


The option to limit maximum concurrency in AwaitOperation.*Parallel method

I think AwaitOperation methods are a very powerful!
Now, any plans to add an option like maxConcurrency (or maxDegreeOfParallelism) to AwaitOperation.*Parallel?
It's common to want to control the maximum concurrent executions.

Thank you for considering!

Ver.0.1.14 added it.


Enable paging for core infinite scrolling

This PR will enable SQL pagination which is used by StratisCore 2.0 for the new infinite scroll functionality for transaction history

just a note: making changes breaking lines should be avoided
I'm ok for long signatures but here I see breaks for short signatures too, did we have a rule that enforce line breaks at specific length?


Fix missing await in test

Adds a missing await for the expect call which returns a promise.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
6 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.09%) to 90.337%

Files with Coverage Reduction
New Missed Lines
%

src/domain/backbone/entities/tests/backbone.builder.ts
1
83.33%

src/routes/transactions/mappers/common/transaction-info.mapper.ts
1
78.17%

src/routes/transactions/entities/tests/human-description.builder.ts
4
60.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.09%

Covered Lines:
5384

Relevant Lines:
5834

💛  - Coveralls


How to combine five TaskEither?

Say you have five TaskEither's. Four share the same Left error, one has its own. All five results need to go into a single response so you'd like to bind / map them into the same context.
I tried Do but it only allows binding three. How would you get five TaskEither results into the same function?

Probably sequenceTuple or sequenceStruct would be my method. However, it looks like I didn't implement those helpers for TaskEither. Here is how you can do that yourself until I get them merged:
import * as TE from "../task_either.ts";
import * as S from "../sequence.ts";

const sequenceStruct = S.createSequenceStruct(TE.Apply);

const one = TE.right<number, number>(1);
const two = TE.right<number, number>(2);
const three = TE.right<number, number>(3);
const four = TE.right<number, number>(4);
const five = TE.right<string, number>(5);

// TaskEither<string | number, { one: number, two: number, three: number, four: number, five: number }>
const combined = sequenceStruct({
  one,
  two,
  three,
  four,
  five,
});

I won't have much time this month to work on functional but starting in July my schedule opens up and I'll be able to come back and get a lot of these tickets done.

Awesome, thanks @baetheus . No worries about the unavailability, fine by me to slowly polish the gem you've made. I'll open PRs if I get impatient 😉 .

Keep in mind that there are two implementations of the Apply type class for TaskEither. The default export (just Apply) is parallel, while the ApplySeq export is sequential.

Since the issue here has been answered I'm going to close this issue. If you still have questions feel free to reopen it!


Failed to execute goal (analyze-dependencies) Dependency problem found

No idea how to resolve this.
I installed the archetype in vscode using the maven tools.
Just running mvn clean install results in this error
[WARNING] Unused declared dependencies found:
[WARNING]    org.slf4j:slf4j-simple:jar:1.7.26:runtime
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  7.621 s
[INFO] Finished at: 2020-04-11T11:44:43-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.1:analyze-only (analyze-dependencies) on project my-lib: Dependency problems found -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

This is from the maven-dependency-plugin analyze-only goal.
Its purpose is to ensure good dependency hygiene by detecting dependencies in the wrong scope or dependencies that aren't used or are used but not declared.
The following guide should help you resolve the issue: https://maven.apache.org/plugins/maven-dependency-plugin/examples/exclude-dependencies-from-dependency-analysis.html.
If you just want to disable this check add <mdep.analyze.skip>true</mdep.analyze.skip> to your Maven properties.


Fix up 2023 SIG Instrumentation spotlight blog article

2 fixups for https://github.com/kubernetes/contributor-site/pull/370
I can mirror these onto the main Kubernetes blog (the first one is actually already covered): https://github.com/kubernetes/website/pull/39206

Thanks a lot again @sftim for finding this issue. Learned a lot from writing this blog.
/lgtm


Build assets-registry for general consumption, build changes

Draft PR where I'm testing https://github.com/facebook/react-native/pull/39440.
Changelog: [Internal]

@huntie: Any chance we can revive this? The original PR got closed.

@tido64 Yup! I might be able to put this on my Friday plate. This was really close to working but didn't quite line up.


Design the structure of req.sway

With Sway, the structure of req.sway will likely be much simpler than in swagger-tools.  As of right now, this is what I've implemented:

api: This is the SwaggerApi object created via Sway#create
path: This is the corresponding Path object from Sway
operation: This is the corresponding Operation object from Sway (when available)

This means that if you want to get a parameter value, you'd do something like this: req.sway.operation.getParameter(name).value.  I bring this up because @miduga suggested in swagger-tools to provide simpler ways to get parameters but I'm not sure this is necessary anymore since Sway~Operation is an object with its own API.
What changes would you make?

Well, it's still a lot to type.  I could potentially add req.sway.getParam(name, [location]) that would basically be a shortcut for req.sway.operation.getParameter(name, [location]).  Maybe shortcuts for all of the Operation methods make sense as well.

What about making req.sway the Operation object?

The main issue I have with swagger-tools right now which I personally like to see changed in sway, is that with the following req.swagger.params.myParam.value, it's not immediately clear (when looking at the controller logic) to me which one I can trust 100% to be there (to avoid something like checking ìf( req.swagger.params && req.swagger.params.myParam )).

What about making req.sway the Operation object?

Oh yes, I like the idea of doing req.sway.getParameter('myParam');

If I make req.sway the corresponding operation, that will work just fine.  Now, just so you know, Operation#getParameter returns a ParameterValue and that itself has the following getters:

error: Returns the validation error if there is one
raw: The raw value for the parameter
value: The validated, coerced value

So your req.sway.getParameter('myParam') would really look like req.sway.getParameter('myParam').value.  From an API perspective, this makes sense.  From a middleware consumption perspective, I wonder if we can do better.  Maybe we could provide access to the Sway Operation and some simpler structure for the parameters.  Just know it can't be a name-based object because you can have multiple parameters with the same name but in different locations.
With that being said, I welcome any feedback.

I would say, the shorter the better. I'd rather prefer req.sway.getParam('myParam') to get directly the validated value as it's the most common thing that I'm going to do. Also a req.sway.getParams in order to get all of them in an object and be able to deconstruct them in a single line.
let { foo, bar } = req.sway.getParams()

I think that's what I'm learning toward.  Giving access to the Sway Operation, and by extension the rest of the Sway API, would let someone do more but making the simpler stuff quick/simple makes sense.
Thanks for the feedback.

Thanks to you for the great work. :+1:

Thanks for the feedback.  I'll do my best to run with the feedback I have and get something solid out soon.