a bug in the  HLO->LLVM IR lowering

I tried to reproduce your training code using the JAX framework, and I changed the dataset to the lm1b dataset (so I modified the data processing function to _tfds_data_processing.py, which is already present in your folder). Without modifying any data types, I encountered thousands of "Floating-point arithmetic operators only work with floating-point types!" errors during the run. Additionally, it prompted "This probably indicates a bug in the HLO -> LLVM IR lowering. Rerun with --xla_dump_to to get the IR." Could you please help me understand the cause of this issue?

I've omitted thousands of lines of errors between the two images I've uploaded to you. The original training log file might be unable to upload due to formatting issues. I would be extremely grateful if you could help me resolve this issue!

I noticed there was also a stack trace error mixed in.
*** Begin stack trace ***
_PyObject_MakeTpCall

_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall

_PyObject_MakeTpCall

_PyObject_MakeTpCall
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
PyObject_Call
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
PyObject_Call
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall

_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
PyObject_Call
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyEval_EvalFrameDefault

PyObject_Call
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall

_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyEval_EvalFrameDefault

PyEval_EvalCode

_PyRun_SimpleFileObject
_PyRun_AnyFileObject
Py_RunMain
Py_BytesMain
__libc_start_main

*** End stack trace ***
Per train step, total TFLOPs will be 207.49, split as 90.45% learnable weight flops and 9.55% attention flops
jax.errors.SimplifiedTraceback: For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/u2022212091/u2022212091/DCFormer/jax/MaxText/train.py", line 551, in
app.run(main)
File "/home/u2022212091/.conda/envs/20240816/lib/python3.10/site-packages/absl/app.py", line 308, in run
_run_main(main, args)
File "/home/u2022212091/.conda/envs/20240816/lib/python3.10/site-packages/absl/app.py", line 254, in _run_main
sys.exit(main(argv))
File "/home/u2022212091/u2022212091/DCFormer/jax/MaxText/train.py", line 547, in main
train_loop(config)
File "/home/u2022212091/u2022212091/DCFormer/jax/MaxText/train.py", line 471, in train_loop
state, metrics = p_train_step(
jaxlib.xla_extension.XlaRuntimeError: INTERNAL: RET_CHECK failure (external/xla/xla/service/cpu/cpu_compiler.cc:1048) !llvm::verifyModule(llvm_module, &err_stream) Invalid LLVM IR before optimizations:

Your problem seems to be a data type problem. You can check whether the type of the data you entered is correct. The correct one should be:

Secondly, check whether the jax you installed is compatible with your cuda version. We tested the version:

and jax and jaxlib version is：

If the above methods still cannot solve your problem, you can try to use our dataset (https://huggingface.co/datasets/Caiyun-AI/Pile_tfrecord/tree/main) to see if it can run. Since the entire dataset is relatively large, you can use only one file for the experiment.
The following is a log of an experiment I just ran according to the readme：

I hope the above can help you.

Thank you! I checked, and first of all, the type of the data I entered is correct. I didn’t modify anything related to data types.
Secondly, all the package versions I installed are correct, exactly as specified in the requirements_gpu. However, I found that my CUDA version might not be right because I’m using the school's supercomputing platform. I noticed that the current CUDA version on the platform is pointing to 11.8, but I don’t have the permission to change it, so I might need to contact the administrator later.
Without changing the CUDA version, I tried switching the dataset to Pile, but I still encountered the same issue. This makes it almost certain that the problem is related to the CUDA version.
I’d like to ask, since the current CUDA versions available on the supercomputing platform are 12.2 and 12.4, can I ask the administrator to change the current version to point to 12.2 instead of having them install version 12.1? Does the CUDA compiler version have to be exactly 12.1, or is any version above 12.1 acceptable?

When I switched the jax version to jax[cuda12_pip]==0.4.25, I have reproduced your problem. After this problem occurred, I upgraded the jax version to jax[cuda12_pip]==0.4.30, and it can run successfully again. Therefore, as long as the jax and cuda versions are compatible, it is not only suitable for cuda12.1. Therefore, you can adapt to your cuda version by changing the jax version.

Okay, thank you, I understand. So, you're saying I can keep my CUDA version at 11.8 and just adjust my JAX version, right?

Yes, besides that, you can also try jax[cuda12_pip]==0.4.30 on cuda 12.2 and 12.4.

Thank you very much! I tried upgrading JAX to 0.4.30 while keeping CUDA at 11.8 (since contacting the administrator is a bit inconvenient), and that solved the problem!

I'm sorry, I've encountered a new problem. What could be the cause of this? Is it possible that it's due to insufficient memory? Currently, I have 120GB of memory allocated on the cluster. If I'm training on a chunk of the Pile dataset, which is approximately 2GB, should this memory be sufficient?

I encountered this issue when I was running the training for the second time, trying to resume from a checkpoint.

Hello, your error does not seem to be out of video memory, and your 120G video memory is enough to train a 6B model with length = 2048. I suspect that the jax version you installed is still wrong, and it seems that the gpu cannot be obtained. You can try running python -c 'import jax; print(len(jax.devices()))' in the command line to see if jax can obtain the target tpu devices. If the output tpu number is 0, it means that it cannot be obtained.

Hello, your error does not seem to be out of HBM, and your 120G HBM is enough to train a 6B model with length = 2048. I suspect that the jax version you installed is still wrong, and it seems that the gpu cannot be obtained. You can try running python -c 'import jax; print(len(jax.devices()))' in the command line to see if jax can obtain the tpu devices. If the output tpu number is 0, it means that it cannot be obtained.

If it is due to the cuda and jax version, you can try to install jax[cuda12_pip]==0.4.30. And set your cuda version to cuda12.2 or 12.4. You do not need to reinstall cuda. If you do not know how to set it, you can refer to: https://www.cnblogs.com/huadongw/p/15193247.html

Thank you for your help! I successfully set up CUDA 12.2 following the link you provided. However, when I tried to install jax[cuda12_pip]==0.4.30, I found that it said it couldn't find pip. Is this because I modified the PATH? How can I resolve this issue?

I think this problem has already been solved by me. I added my PIP_OR_PYTHON_PATH to the PATH, and now my pip can be found! Is this the correct solution? Additionally, if I have already set this in the .bashrc file, do I still need to specify the PIP_OR_PYTHON_PATH again in the train.sh script? Is it okay to do this, or could it cause any conflicts?

Yes, you have overwritten the path of your python or pip. You can add your python and pip paths in .bashrc
Assume that the python or pip dir is：/usr/local/bin/
example:
# add Python path
export PATH=/usr/local/bin/python3.10:$PATH
# add pip path
export PATH=/usr/local/bin:$PATH

I think this problem has already been solved by me. I added my PIP_OR_PYTHON_PATH to the PATH, and now my pip can be found! Is this the correct solution?

Yes, you are right!

Hello, I think I’m ready now! I have set the CUDA environment variables in the ~/.bashrc file, and it’s for CUDA 12.2（asP1）. Additionally, I’ve successfully installed jax[cuda12_pip]==0.4.30（asP2）. I should be all set now, right? I have one last question: yesterday, when I hadn’t figured out how to set up CUDA 12.2, I used the conda install nvidia/label/cuda-12.1.1::cuda-tools command in my virtual environment, which installed a bunch of packages that start with cuda_. （asP3）Is this a problem? Should I remove them, or can I just leave them as they are?

All are fine. The extra ones just take up more memory. If you don't need them, you can selectively uninstall them.

Finally, it's all working!! Everything went smoothly. Thank you so, so much!

And I think I finally understand the specific reason behind my previous errors and why it seemed to work yesterday but didn’t use the GPU. Earlier, when I encountered data type errors, I hadn’t set the CUDA environment variables in my bashrc file, but my JAX and JAXlib versions were based on CUDA 11, which caused the errors. Last night, I upgraded my JAX and JAXlib to JAX[cuda11_pip]==0.4.30, but during installation, it warned me that there was no CUDA version, so I ended up installing the non-CUDA versions of JAX and JAXlib. Since I didn’t have a CUDA compiler configured, the code ran but couldn’t utilize the GPU. Now that I’ve correctly configured everything, it’s all working fine!
Thank you so much again! Without your help, I would have struggled for much longer! Best wishes~

However, I noticed that on the current supercomputing platform at my school, I used 16 CPU cores and 2 GPUs, but the steps/s is only 0.361. I calculated that if I were to train for the 10,000,000 steps specified in the configuration file, it would still take a very long time. Can this 10,000,000 steps be shortened appropriately, or will my code automatically stop training once the metrics stabilize?
And one more question: If my training is interrupted due to a timeout, the code will automatically load the checkpoint files the next time I resume training, correct? I don’t need to manually configure anything, right? Thank you very much~

The 10 milions step is not the total number of steps you are training, just to keep it going, so you need to stop the program manually, for example when loss drops to a certain value. In addition, if the program is unexpectedly interrupted, the latest model will automatically load after you restart, and the data will be read from the last interrupt.


Fix false positive in RedundantParentheses cop with multiple expression

Style/RedundantParentheses cop has a false positive.
For example.
 # test.rb
x ||= (
  foo
  bar
)

$ rubocop --only Style/RedundantParentheses test.rb
Inspecting 1 file
C

Offenses:

test.rb:2:7: C: Don't use parentheses around a method call.
x ||= ( ...
      ^

1 file inspected, 1 offense detected

However, the parentheses can't be omitted.

Before submitting the PR make sure the following are checked:

[x] Wrote good commit messages.
[ ] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Used the same coding conventions as the rest of the project.
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[x] All tests are passing.
[x] The new code doesn't generate RuboCop offenses.
[x] The PR relates to only one subject with a clear title
and description in grammatically correct, complete sentences.
[x] Updated cop documentation with rake generate_cops_documentation (required only when you've added a new cop or changed the configuration/documentation of an existing cop).

I fixed the behavior.
When parens's evaluated value is used, parens can not be omitted. As an exception, when the value is used as method/block's last value,
The implementation is referred to Lint/Void cop.
For example
# can't omit
x = (
  foo
  bar
)

# can omit
def x
  (
    foo
    bar
  )
end

# can omit
x do
  (
    foo
    bar
  )
end


Custom SSL verification on Android does not work

Creating a new HTTP client with native handler:
new HttpClient(new NativeMessageHandler(false, true));

Setting the SSL callback:
        System.Net.ServicePointManager.ServerCertificateValidationCallback +=
            (sender, cert, chain, sslPolicyErrors) =>
            {
                if (cert != null) System.Diagnostics.Debug.WriteLine(cert);
                return true;
            };

This works fine on iOS but Android does not call the callback and instead throws the SSLHandshakeException:
Exception of type 'Javax.Net.Ssl.SSLHandshakeException' was thrown.

Hi all - I've decided to make self-signed certificates a paid feature, please see http://log.paulbetts.org/modernhttpclient-pro-edition/ for more info

+1
Nick Berardi
(484) 302-0125

On Jan 12, 2015, at 9:18 PM, Paul Betts<EMAIL_ADDRESS>wrote:
Hi all - I've decided to make self-signed certificates a paid feature, please see http://log.paulbetts.org/modernhttpclient-pro-edition/ for more info
—
Reply to this email directly or view it on GitHub.


Code Samples

Added code snippet samples for the Breadboard Walkthrough on wiring parameters naming, arrow directions, and creating custom kits.

Just a thought @TinaNikou, what would you think to a structure like below?
- arrow-directions/
    - README.md
    - index.ts
- arrow-directions/
    - README.md
    - index.ts
 etc...

Just a thought @TinaNikou, what would you think to a structure like below?
- arrow-directions/
    - README.md
    - index.ts
- arrow-directions/
    - README.md
    - index.ts
 etc...

This has been completed now, thanks Joe!


outdated Socket2 version

The function
 socket.set_reuse_port(true)

does not exists on the socket version 0.4.4. Thus to make it work the version should be updated to version socket2 = { version = "0.5.3" }

Fixed with the latest push


Client: none auth failed

I have a windows server with openssh server and ssh clients generally download the ssh key themself, as I'm using password authentication.

This is the server log:
debug1: sshd version OpenSSH_for_Windows_8.0, LibreSSL 2.6.5 debug1: private host key #0: ssh-rsa SHA256:123456789123456789123456789 debug1: private host key #1: ecdsa-sha2-nistp256 SHA256:123456789123456789123456789 debug1: private host key #2: ssh-ed25519 SHA256:123456789123456789123456789 debug1: rexec_argv[0]='sshd.exe' debug1: rexec_argv[1]='-d' debug1: Bind to port 22 on ::. Server listening on :: port 22. debug1: Bind to port 22 on <IP_ADDRESS>. Server listening on <IP_ADDRESS> port 22. debug1: Server will not fork when running in debugging mode. Connection from 111.222.333.444 port 1716 on 444.444.444.444 port 22 debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.0 debug1: Remote protocol version 2.0, remote software version ssh2js0.4.2 debug1: no match: ssh2js0.4.2 debug1: sshd version OpenSSH_for_Windows_8.0, LibreSSL 2.6.5 debug1: list_hostkey_types: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 [preauth] debug1: SSH2_MSG_KEXINIT sent [preauth] debug1: SSH2_MSG_KEXINIT received [preauth] debug1: kex: algorithm: ecdh-sha2-nistp256 [preauth] debug1: kex: host key algorithm: ssh-rsa [preauth] debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none [preauth] debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none [preauth] debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth] debug1: rekey out after<PHONE_NUMBER> blocks [preauth] debug1: SSH2_MSG_NEWKEYS sent [preauth] debug1: expecting SSH2_MSG_NEWKEYS [preauth] debug1: SSH2_MSG_NEWKEYS received [preauth] debug1: rekey in after<PHONE_NUMBER> blocks [preauth] debug1: KEX done [preauth] debug1: userauth-request for user entretoize service ssh-connection method none [preauth] debug1: attempt 0 failures 0 [preauth] debug1: user entretoize does not match group list administrators at line 84 debug1: user entretoize matched 'User entretoize' at line 92 debug1: userauth-request for user entretoize service ssh-connection method password [preauth] debug1: attempt 1 failures 0 [preauth] Accepted password for entretoize from 111.222.333.444 port 1716 ssh2 debug1: monitor_child_preauth: entretoize has been authenticated by privileged process debug1: monitor_read_log: child log fd closed User child is on pid 3092 debug1: sshd version OpenSSH_for_Windows_8.0, LibreSSL 2.6.5 debug1: user entretoize does not match group list administrators at line 84 debug1: user entretoize matched 'User entretoize' at line 92 Changed root directory to "c:\\htdocs" debug1: rekey in after<PHONE_NUMBER> blocks debug1: rekey out after<PHONE_NUMBER> blocks debug1: ssh_packet_set_postauth: called debug1: active: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding debug1: Entering interactive session for SSH2. debug1: server_init_dispatch debug1: server_input_channel_open: ctype session rchan 0 win 1048576 max 32768 debug1: input_session_request debug1: channel 0: new [server-session] debug1: session_new: session 0 debug1: session_open: channel 0 debug1: session_open: session 0: link with channel 0 debug1: server_input_channel_open: confirm session debug1: server_input_channel_req: channel 0 request subsystem reply 1 debug1: session_by_channel: session 0 channel 0 debug1: session_input_channel_req: session 0 req subsystem debug1: subsystem: cannot stat C:/Program Files/OpenSSH/sftp-server.exe: No such file or directory debug1: subsystem: exec() C:/Program Files/OpenSSH/sftp-server.exe Starting session: subsystem 'sftp' for entretoize from 111.222.333.444 port 1716 id 0 debug1: Received SIGCHLD. debug1: session_by_pid: pid 1960 debug1: session_exit_message: session 0 channel 0 pid 1960 debug1: session_exit_message: release channel 0 debug1: session_by_channel: session 0 channel 0 debug1: session_close_by_channel: channel 0 child 0 Close session: user entretoize from 111.222.333.444 port 1716 id 0 debug1: channel 0: free: server-session, nchannels 1 Received disconnect from 111.222.333.444 port 1716:11: Disconnected from 111.222.333.444 port 1716 debug1: do_cleanup debug1: do_cleanup sshd.exe exited on WIN-123456789 with error code 255. PS C:\Users\Administrator>

debug1: cannot stat C:/Program Files/OpenSSH/sftp-server.exe: No such file or directory

It looks like your server didn't have sftp enable.

It works with filezilla, doesn't it mean sftp is enabled ?

I just had a similar issue. All of the handshaking looks good, and then ...
[08-29 16:34:04] [debug] DEBUG: Host accepted by default (no verification)
[08-29 16:34:04] [debug] DEBUG: Verifying signature
[08-29 16:34:04] [debug] Outgoing: Writing NEWKEYS
[08-29 16:34:04] [debug] Outgoing: Writing SERVICE_REQUEST (ssh-userauth)
[08-29 16:34:04] [debug] Outgoing: Writing USERAUTH_REQUEST (none)
[08-29 16:34:04] [debug] Client: none auth failed
[08-29 16:34:04] [debug] Outgoing: Writing USERAUTH_REQUEST (password)
[08-29 16:34:04] [debug] Client: password auth failed
[08-29 16:34:04] [debug] Outgoing: Writing DISCONNECT (BY_APPLICATION)
[08-29 16:34:04] [debug] Outgoing: Writing DISCONNECT (BY_APPLICATION)

Like @Entretoize, I noticed that there was no ssh-rsa cert received in the handshaking. I was seeing a log entry about ~.ssh\config being invalid. I created an id_rsa private/public key there and an empty config file. That eliminated the message but I don't know what the message was actually telling me. I added these values into the profile in sftp.config:
"privateKeyPath": "C:\\Users\\tony\\.ssh\\id_rsa",
"sshConfigPath": "C:\\Users\\tony\\.ssh\\config",

That made no difference so I removed them.
But on reading the wiki more closely I saw the interactiveAuth value, and set that to true. Indeed, the server was ignoring the password parameter, and on entering the password at the interactive prompt I successfully connected.
I hope this helps someone.


Approve/Decline approval

Actually approvals are approved/declined by executing a PUT/PATCH with Status = Condition. This should be improved by executing ~/Approvals(ID)/InvokeAction

Example
http://host:port/api/Core/Approvals(ID)/InvokeAction

{
  "Parameters": "approved! enjoy working",
  "Name": "Continue"
}

Coded, but can not be tested because no approval has a job see issue 8 in biz.dfch.CS.Appclusive.Api

@ChrEggenberger should now work (see dfensgmbh/biz.dfch.CS.Appclusive.Api#8 for reason why it didn't work)


SKR_TRACE_ON env flag

These changes are enabling SKR_TRACE_ON environment variable to enable the attestation trace logs.
it will be useful for debugging.

@canfikret
use case validated.

no SKR_TRACE_ON, No logs only output.
SKR_TRACE_ON=1, masked output for tokens and secrets. (only logging 15%)
SKR_TRACE_ON=2, no masking
other invalid value: exit with message.

Bam is working on codeql fixes


Change mongo to mongodb

Can you change the usage of mongo to be mongodb?
Just want to be mindful of their name/brand.

Implemented with PR #39


GNUC_GNU_INLINE and always_inline

https://github.com/nemequ/hedley/blob/913adf3bbcd42224e460154b47c789676d7b0130/hedley.h#L900
If __GNUC_GNU_INLINE__==1, then HEDLEY_INLINE HEDLEY_ALWAYS_INLINE foo() will cause compiler warning.
The problem is that HEDLEY_INLINE is empty in this case. Compiler says that you can not always inline something that is not inlined at all.
Not sure how to deal with that. There is gnu_inline that does the converse to what I want (i.e. inline with gnu90 semantic), but no way say that we want std inline (or __inline__ is what we want?)
Anyways, defining HEDLEY_INLINE either as inline or as __inline__ "solves" the problem; not sure if it is correct.

I'm thinking
diff --git a/hedley.h b/hedley.h
index 08d9a7d..b50dff9 100644
--- a/hedley.h
+++ b/hedley.h
@@ -875,7 +875,7 @@ HEDLEY_DIAGNOSTIC_POP
   (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \
   (defined(__cplusplus) && (__cplusplus >= 199711L))
 #  define HEDLEY_INLINE inline
-#elif defined(__GNUC_STDC_INLINE__) || HEDLEY_ARM_VERSION_CHECK(6,2,0)
+#elif defined(HEDLEY_GNUC_VERSION) || HEDLEY_ARM_VERSION_CHECK(6,2,0)
 #  define HEDLEY_INLINE __inline__
 #elif \
   HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \
@@ -897,7 +897,7 @@ HEDLEY_DIAGNOSTIC_POP
   HEDLEY_IBM_VERSION_CHECK(10,1,0) || \
   HEDLEY_TI_VERSION_CHECK(8,0,0) || \
   (HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))
-#  define HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__))
+#  define HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) HEDLEY_INLINE
 #elif HEDLEY_MSVC_VERSION_CHECK(12,0,0)
 #  define HEDLEY_ALWAYS_INLINE __forceinline
 #elif HEDLEY_TI_VERSION_CHECK(7,0,0) && defined(__cplusplus)

I don't think we need to worry about GNU vs C99 style inline here.
Also HEDLEY_INLINE HEDLEY_ALWAYS_INLINE may confuse some compilers… I think it would be safer to only do HEDLEY_ALWAYS_INLINE.
I need to do a bit more testing before I push, though.

Fixed in v7.


Dynamic tables with buttons + ASP.NET Grid not working?

Hello,
if I use a ASP.NET grid for the table and fill it with data, the buttons won't appear anymore. Why? I renamed the IDs, renamed the IDs in the function in the script too, but nothing new.

You need activate thead for grid view, It si sth like that;
gvUsers.HeaderRow.TableSection = TableRowSection.TableHeader;

Still not working. :(

Yeaaaaaaaah, it´s working!!!!!!! Thank youuu!!!!!!!!!!!!!!!!!

In which script can I change the default number of records in the table? Now it´s 15, even if I set the PageSize="20" in the Grid.

Np bro,
I have no idea about your second question :(

But thank you anyway. I would never know this. Thanks!

Maybe you can use jquery select option in page ready.
$("div.id_100 select").val("20");

On one page I have the table in HTML like in the template. But the HTML is generated from C# and inserted. It is in a update panel. I put the datatable buttons script in a function and calling it from behind before updating the panel, but the buttons don't appear :( :(
Any ideas??

Add a photo pls, i did'nt understand clearly :(

Gönderen: sem27<EMAIL_ADDRESS>Gönderildi: 15 Kasım 2016 Salı 12:39
Kime: puikinsh/gentelella
Bilgi: ltfi; Comment
Konu: Re: [puikinsh/gentelella] Dynamic tables with buttons + ASP.NET Grid not working? (#297)
On one page I have the table in HTML like in the template. But the HTML is generated from C# and inserted. It is in a update panel. I put the datatable buttons script in a function and calling it from behind before updating the panel, but the buttons don't appear :( :(
Any ideas??

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/puikinsh/gentelella/issues/297#issuecomment-260593126, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABen7fy-NtXmz9P6_qXtqeID9xdtjkLaks5q-X23gaJpZM4KZ-JE.

This is how I dynamically create the table. Just a part of the code. I create the whole row div.
At the end, I do this in C#:

(That commented line is what I used when I have a asp.net grid, then the buttons were working with it. Ignore that line now.)
And this is the function Starting() in Javascript:
` function Starting() {
var handleDataTableButtons = function () {
if ($("#datatablebuttons").length) {
$("#datatablebuttons").DataTable({
dom: "Bfrtip",
buttons: [
{
extend: "copy",
className: "btn-sm"
},
{
extend: "csv",
className: "btn-sm"
},
{
extend: "excel",
className: "btn-sm"
},
{
extend: "pdfHtml5",
className: "btn-sm"
},
{
extend: "print",
className: "btn-sm"
},
],
responsive: true
});
}
};
        TableManageButtons = function () {
            "use strict";
            return {
                init: function () {
                    handleDataTableButtons();
                }
            };
        }();

        $('#datatable').dataTable();
        $('#datatable-keytable').DataTable({
            keys: true
        });

        $('#datatable-responsive').DataTable();

        $('#datatable-scroller').DataTable({
            ajax: "js/datatables/json/scroller-demo.json",
            deferRender: true,
            scrollY: 380,
            scrollCollapse: true,
            scroller: true
        });

        var table = $('#datatable-fixed-header').DataTable({
            fixedHeader: true
        });

        TableManageButtons.init();
    }`

When generating the table, the id is like in the function "datatablebuttons".

Sorry bro, i have no solution for this problem :(

Gönderen: sem27<EMAIL_ADDRESS>Gönderildi: 15 Kasım 2016 Salı 14:54
Kime: puikinsh/gentelella
Bilgi: ltfi; Comment
Konu: Re: [puikinsh/gentelella] Dynamic tables with buttons + ASP.NET Grid not working? (#297)
When generating the table, the id is like in the function "datatablebuttons".

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/puikinsh/gentelella/issues/297#issuecomment-260622074, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABen7XP8c1Ox-G30GbqbPNmk9qRM29Kxks5q-Z1xgaJpZM4KZ-JE.

Why did you close my problem?

Hi there @sem, unfortunately we can't cover every integration in every language however if you still have issues, datables are very well documented on the project's web page, here is some good information about reference and code samples for a better understanding of the script:
https://datatables.net/reference/index
https://datatables.net/examples/index
The project is opensource and can be found on GitHub, if you still have this issue or you encounter other problems they have a comprehensive list of fixes and solutions for their version:
https://github.com/DataTables/DataTables/issues
In case you have an older version don't forget to update to the latest version of DataTables available on their website.
Thank you for your feedback.
Regards,
Andrew.

I am using the Responsive example table but I want to add the buttons of the Button example table, how can I add them without desapear my 'Show entries. select?

Hi, @Irishm for this you just need to use the buttons extension and add it to whatever possition yo want it, with the 'dom' option, from datatables, they have on their page quite good documentation about it with examples, you can check it out here: https://datatables.net/extensions/buttons/

Thanks William-H-M I will try.

I did it! It works perfectly, thank you William-H-M


Support a way to listen for javascript events

Hi I have a event I listen to in JS via the following Code. How can I listen to the event via chromedp?
window.addHook('mapDataRefreshEnd', function (data) {
    console.log("Done!")
});

To be more exact: I want to wait until the event fired

also window.addHook gets oaded dynamicly but works like addEventListener

I'm also trying to listen and wait for events, specifically dom ready and window loaded.
window.addEventListener('load', function() {
    console.log('All assets are loaded')
})
document.addEventListener("DOMContentLoaded", function() {
  console.log("done")
});

Maybe it's more of a request for help or new feature request than an issue. It's probably possible to use the Evaluate method using callbacks but I'm unsure how to do so.
Something like this would be nice:
chromedp.WaitEvent('window.load', func(event chromedp.Event) {
	fmt.Printf("%+v\n", event)
	return nil
}),

chromedp.WaitEvent('document.DOMContentLoaded', func(event chromedp.Event) {
	fmt.Printf("%+v\n", event)
	return nil
}),

@montanaflynn what you probably want to do is listen/wait for the devtools events instead. See https://godoc.org/github.com/chromedp/chromedp#example-ListenTarget--ConsoleLog, which you can use to listen for events like https://chromedevtools.github.io/devtools-protocol/tot/Page#event-loadEventFired.
I guess a way to receive JS events would be useful, but it's not clear to me in what cases it would be useful. Happy to take a look if anyone provides a full example, or a way to make it work with https://chromedevtools.github.io/devtools-protocol/tot/.

So this issue is really old and I am not activly working on the project anymore I had this issue with. I only roughly remember that I was working on a screenshot chat bot for https://intel.ingress.com/intel
This is an google map which was heavily modified. The only way to know for sure that the map fully loaded at the position I looked at is to listen for the specific javascript events fired by the map. So thoose events I had are fired exactly by that map code (cant provide source as obviously that one is copyrighted by google and obfuscated anyway). But in general this issue basicly is the same for any regular javascript event no matter what fires it.
Basicly what I wanted is to block until that event fired. Similiar to what is possible to wait on a DOM node in chromedp

Thanks. I'm leaving the "needs info" label on, because I still don't know how this is possible with the devtools protocol.

I'm also not aware of a clean way to do this with DTP, but I think you could probably hack together a solution with a breakpoint - maybe using DomDebugger.setEventListenerBreakpoint ?

If anyone figures out a way and wants to post about it here, that would be helpful. This issue is not at the top of my priority list for now.

How does puppeteer handle this?

I was able to code this POF on 0.3.0. Doesn't work on 0.1.2, which we still have a bunch of chromedp code for testing or UI
I took this from some of the code shown here and other piecemeal stuff: https://godoc.org/github.com/chromedp/chromedp#ListenTarget
And this seems to capture javascript errors in addition to the other chromedp tests we have. For the time being, this code will live in a separate repo since dep ensure we're locked on 0.1.2 with our old ChromeDP calls wrapped in GoConvey for BDD style testing.
As a FYI, this works but crudely, but I could see further maturation - if it's a priority. Otherwise, I may try puppeteer too, but this actually works for some tests our director wanted recently, because we want to crawl our webpages and see what javascript errors are introduced with the latest checkins.
And, of course private info has been replaced with public strings like username/pword, URLs
package main
import (
"io"
"fmt"
"context"
"strings"
"net/http"
"net/http/httptest"
"time"
"github.com/chromedp/cdproto/page"
cdpruntime "github.com/chromedp/cdproto/runtime"
//"github.com/chromedp/cdproto/target"
"github.com/chromedp/chromedp"

)
var (
cancel context.CancelFunc
err    error

)
func listenTargetWithStage() {
ctx, cancel := chromedp.NewContext(context.Background())
defer cancel()

chromedp.ListenTarget(ctx, func(ev interface{}) {
	switch ev := ev.(type) {
	case *cdpruntime.EventExceptionThrown:
		fmt.Printf("Event Exception, console time > %s \n", ev.Timestamp.Time())
		fmt.Printf("\tException Type > %s \n", ev.ExceptionDetails.Exception.Type.String())
		fmt.Printf("\tException Description > %s \n", ev.ExceptionDetails.Exception.Description)
		fmt.Printf("\tException Stacktrace Text > %s \n", ev.ExceptionDetails.Exception.ClassName)
	case *cdpruntime.StackTrace:
		fmt.Printf("Stack Trace, console type > %s \n", ev.Description)
		for _, frames := range ev.CallFrames {
			fmt.Printf("Frame line # %s\n", frames.LineNumber)
		}
	case *cdpruntime.EventConsoleAPICalled:
		fmt.Printf("Event Console API Called, console type > %s call:\n", ev.Type)
		for _, arg := range ev.Args {
			fmt.Printf("%s - %s\n", arg.Type, arg.Value)
		}

	}

})

if err := chromedp.Run(ctx,
	chromedp.Navigate("https://our.website.com"),
	chromedp.SendKeys(`#username`, "user"),
	chromedp.SendKeys(`#password`, "pword"),
	chromedp.Click(`#login-submit`),
	chromedp.Sleep(1 * time.Second),
	chromedp.Navigate("[another page]"),
	chromedp.Sleep(1 * time.Second),
); err != nil {
	panic(err)
}

}
func writeHTML(content string) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html")
io.WriteString(w, strings.TrimSpace(content))
})
}
func main() {
listenTargetWithStage()

}

This can be implemented with the chromedp.ListenTarget func. See: https://github.com/GoogleChrome/puppeteer/blob/master/examples/custom-event.js which has an overview of how Puppeteer uses this. I'll make a point of adding this in chromedp/examples.

With chromedp.Poll, we can do it like this:
// github.com/chromedp/chromedp v0.7.1
package main

import (
	"context"
	"fmt"
	"log"
	"net/http"
	"net/http/httptest"
	"time"

	"github.com/chromedp/cdproto/page"
	"github.com/chromedp/chromedp"
)

func main() {
	// create a test server to serve the page
	ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		_, _ = fmt.Fprint(w, `
<html lang="en">
<head>
    <script>
        setTimeout(() => {
            document.dispatchEvent(new Event('myCustomEvent'))
        }, 3000)
    </script>
</head>
<body>
</body>
</html>
`,
		)
	}))
	defer ts.Close()

	ctx, cancel := chromedp.NewContext(context.Background())
	defer cancel()
	ctx, cancel = context.WithTimeout(ctx, time.Minute)
	defer cancel()

	var timestamp int

	err := chromedp.Run(ctx,
		chromedp.ActionFunc(func(ctx context.Context) error {
			_, err := page.AddScriptToEvaluateOnNewDocument("__fired__ = null; document.addEventListener('myCustomEvent', (e) => {__fired__ = Date.now();})").
				Do(ctx)
			return err
		}),
		chromedp.Navigate(ts.URL),
		chromedp.Poll("__fired__", &timestamp, chromedp.WithPollingInterval(time.Second)),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Print(timestamp)
}

The key part is to subscribe to the event with javascript code, and when the event is fired, set the value of a javascript variable. Then use chromedp.Poll to check and wait for this javascript variable becomes truthy.

For anyone looking for something similar that doesn't involve polling, here's a staring point that does a limited version of the exposeFunction feature from Puppeteer:
func ExposeFunc(name string, f func(string)) chromedp.Action {
	return chromedp.Tasks{
		chromedp.ActionFunc(func(ctx context.Context) error {
			chromedp.ListenTarget(ctx, func(ev interface{}) {
				if ev, ok := ev.(*cdruntime.EventBindingCalled); ok && ev.Name == name {
					f(ev.Payload)
				}
			})
			return nil
		}),
		cdruntime.AddBinding(name),
	}
}

The exposed function will be a global in every target and is available regardless of navigation. This is a one-way street which just accepts a single string argument. The Puppeteer version provides a fully transparent proxy with support for arguments and return values, which this does not.

@daaku could you please extend your example to show how ExposeFunc() would be used to listen to a Javascript event?
@kenshaw adding an example to chromedp/examples would be a welcome addition

@porjo Please check the doc for Runtime.addBinding.
And see pr #1222.


AND assignment for bitwise operators

Implement the following AND assignment operators:
&=   // AND assignment
|=   // OR assignment
^=   // XOR assignment
<<=  // left-shift assignment
>>=  // right-shift assignment

Any examples of how to implement this in the compiler?

Just like any other operator. In a bytecode-VM it's just another opcode.


What Registry key does cleanmgr create with the /sageset:n option?

Hello,
It would help to use this document, about the cleanmgr utility in Windows, if it were a bit more specific.
For example, the document says that the /sageset:n option:
"Displays the Disk Cleanup Settings dialog box and also creates a registry key to store the settings that you select. The n value, which is stored in the registry, allows you to specify tasks for Disk Cleanup to run. The n value can be any integer value from 0 to 9999." (emphasis mine)
WHAT Registry key does it create?  Do not know, because the document does not say, ever.
I would like to humbly suggest that the specific Registry key (or the pattern of the key name, if there are variables involved) that gets created when cleanmgr is launched with the /sageset:n switch applied, be listed somewhere in this document.
You can tell me what the key is in response to this issue, here, but I would not consider this issue to be in Resolved status until the source document -- referenced below -- is updated.
Thank you for considering this suggestion.
Brian Hart

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

ID: 768ab539-031f-b493-edc9-2958ced20fc2
Version Independent ID: cab3aa07-fc05-1a74-875b-fd37983593d4
Content: cleanmgr
Content Source: WindowsServerDocs/administration/windows-commands/cleanmgr.md
Product: windows-server
Technology: windows-commands
GitHub Login: @JasonGerend
Microsoft Alias: jgerend

Hello @astrohart,
Thanks for contacting Microsoft. We value your feedback.
Documentation changes have been made to clarify and acknowledge this issue. The doc changes will be live after the next business day.
Thank you again and have a most pleasant day.
#please-close


review sandbox zenodo metadata

A variety of metadata fields can be associated with each deposition at Zenodo, these are defined in the developer documentation.
Currently we appear to be populating:

[ ] title: currently "Dataset Source" e.g. "Eia860 Source" Can we change this to use appropriate capitalization and potentially be more informative?
[x] publication_date: same as upload date.
[x] doi: as assigned by Zenodo.
[x] keywords: the keywords associated with the data source (e.g. eia861) in our existing PUDL metadata.
[x] license: CC0 for US Govt. data, would need to be different for e.g. ISO or derived datasets.
[ ] version: What versioning scheme are we using for this version number? Does it follow the semantic version of the archived data package? Or are we just assigning a new major version number to each subsequent archive which is published? I notice that the sandbox version of the EPA CEMS data has multiple DOIs associated with the same version number (1.0.0). Is there any circumstance under which that is appropriate and expected?
[x] upload_type: dataset
[x] access_right: open (everything is open for now)

Required fields which we should populate with meaningful information:

[ ] publication_type: other
[ ] creators: an array of creator objects including individual names (Family, Given), affiliations (Catalyst Cooperative) and creator IDs if available. Who should we associate with these archives?
[ ] description: currently we have just a one-liner. Can we add some more context here? E.g.

[ ] Note about relation to the PUDL project and Catalyst
[ ] Motivation for creating a persistent versioned archive of public data that isn't persistent or versioned or programmatically accessible?
[ ] Pointer to documentation about the Data Package Standard and the included datapackage.json file for programmatic access to the archived data.
[ ] Pointer to the PUDL software and pudl_datastore.py script for for an existing implementation of programmatic access.

Optional fields which we can populate with meaningful information:

[ ] communities: Catalyst Cooperative (this is an archive of all the archives we have published, so folks can see what all we've uploaded to Zenodo). Not sure how one specifies this, the docs say to use the "community identifier", but the Catalyst community is here. I'd guess it's probably catalyst-cooperative.
[ ] language: English
[ ] related_identifiers:

[ ] isCompiledBy: reference to the software by URL (Github repo) or DOI (if we have Zenodo archive that repo) that was used to collect and archive this data. Ideally this would include the particular release or commit ID that was used for the creation of this particular archive's generation.
[ ] isSupplementTo: Should refer to the DOI of any data release that we make which is based on this archive. We can add these references by hand when we make a new data release, but we could also set it up to be an automatic part of the data release process.

[ ] dates: ISO8601 formatted (YYYY-MM-DD) start and end dates indicating what range of time the data covers. This is relevant to most of our datasets.

URLs for the current round of archives. (The https://doi.org/ based URLs do not resolve... is that just because it's the sandbox server?)

[x] eia860: https://sandbox.zenodo.org/record/504556
[x] eia861: https://sandbox.zenodo.org/record/504558
[x] eia923: https://sandbox.zenodo.org/record/504560
[x] epaipm: https://sandbox.zenodo.org/record/602953
[x] epacems: https://sandbox.zenodo.org/record/638878
[x] ferc1: https://sandbox.zenodo.org/record/504562

I looked through all the Zenodo metadata fields in the developer documentation, and all of our current archives, and listed the fields that I think we should be populating in the issue description above. The ones I checked off are the ones we're currently populating that seem fine. The ones that aren't checked off I think need some work, or at least discussion as to whether and how we want to populate them.

Blockers
I'm going to risk posting the comment as best I can here.  Try and remember that just because my style is terse, does not mean I'm trying to hurt feelings.

Title:  By definition, I already filled out the titles with what I consider to be appropriate capitalization, punctuation, and detail.  If you want a different title, be more informative.  You need to give me a spec, not a series of essay questions and guessing games.

The version numbers can be specified manually or, by default, assume an incompatible change and jump accordingly.  This was discussed at length and largely at your request.  The sandbox has test data and experiments it, as should be expected.

Creators My name does not go in. My suggestion is either use the agency name or leave it alone, but again, spec.

Description - Looks like an essay question instead of a spec to me.  Pass.

The other parts are probably manageable, but if I were genuinely trying to get some power plants closed I wouldn't devote more than a few minutes on it.

"publication_type" is a controlled vocabulary intended for cases where the "upload_type" is a "publication." Our "upload_type" is a "dataset."

"isCompiledBy" is intended to reference software compilation. As in, a binary pointing to it's compiler.
https://0-www-crossref-org.biblio.url.edu/education/content-registration/structural-metadata/relationships/


stretched NetworkPolicy support on networkPolicyOnly mode

Describe the problem/challenge you have
Antrea multi-cluster feature plan to support stretched NetworkPolicy on v1.10. It should work with encap mode by design, and all cross-cluster traffic will utilize Geneve header to load Pod's LabelIdentity in tun_id. When Antrea is deployed on public cloud clusters like EKS, it will be deployed with networkPolicyOnly mode, the primary CNI is responsible to manage Pod's traffic in a cluster. In this case, current stretched NetworkPolicy design will not work as we expect when the Antrea is chained as secondary CNI.
Describe the solution you'd like
According to @Dyanngg 's suggestion, we may refine the stretched NetworkPolicy by splitting it into two parts of NetworkPolicy. The effort is still under evaluating, @Dyanngg @GraysonWu can help to input more details here.
Anything else you would like to add?

@Dyanngg could you check if #4432 can close this issue or not? thanks.


Certsign

See if KeyUsage CertSign fixes test failures on linux

Replaced by https://github.com/aspnet/AspNetCore/pull/9756


Added Red Dog w/Fire

Description

Added gifs for a new dog

Updated code to allow for user to choose a red dog under the search bar

Wow, ok. What's the story here, why is the dog on fire?

Wow, ok. What's the story here, why is the dog on fire?

 So not really on fire but controls fire. Almost like flairion from pokemon. Just a cool idea I had to show off to people at work who said that I should submit it so I thought I would.

The image is cropped so the tip of the flames is missing, are you able to fix that?

      The image is cropped so the tip of the flames is missing, are you able to fix that?

Sorry for the wait @tonybaloney Not sure why all the gifs got cropped but all gifs have been updated!


chore: update IPLD to latest version

js-ipld 0.19 has breaking changes that affect this project. Therefore
also update the corresponding code.
I have no clue if that code is correct or not as tests don't pass. It's best effort :)

resolved here https://github.com/tableflip/ipld-explorer-cli/commit/5800dd20328c807e9997e904290bf69ff6ee5e6e


When will the AgML Crop Detection Generalizability Challenge open?

Unfortunately, we were unable to host the ECCV 2022 DEGA-CV challenge this year.


Getting Input from Keyboard and Joypad (Axis) using Input.GetVector() and Input.GetAxis() sticks

Godot version
4.2.dev.mono
System information
Godot v4.2.dev4.mono - Windows 10.0.19045 - Vulkan (Mobile) - dedicated NVIDIA GeForce GTX 1650 (NVIDIA; <IP_ADDRESS>14) - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 Threads)
Issue description
Using only keyboard alone works just fine. Switch from keyboard to gamepad also seems to work fine. However, when switching gamepad (specifically axis) to keyboard, it behaves a kinda weird.
For the gamepad, the issue is when I used default value of deadzone, whenever I release the axis input, the input stays as is instead of returning to zero.
It works fine when I used Godot v4.1.2.stable.mono.
Edit: It also works well when on Godot Godot v4.2.rc1.mono
Steps to reproduce
Input Map

I set the deadzone to 0 to test the behavor when switching from joypad to keyboard.
Script
    protected Vector2 moveInput = Vector2.Zero;
    public override void _Input(InputEvent @event)
    {
        if (Input.IsActionPressed("ui_left") || Input.IsActionPressed("ui_right") || Input.IsActionPressed("ui_up") || Input.IsActionPressed("ui_down"))
        {
            //moveInput = Input.GetVector("ui_left", "ui_right", "ui_up", "ui_down");
            moveInput = new Vector2(Input.GetAxis("ui_left", "ui_right"), Input.GetAxis("ui_up", "ui_down"));
			GD.Print("Input Pressed: " + moveInput);
        } else if (Input.IsActionJustReleased("ui_left") || Input.IsActionJustReleased("ui_right") || Input.IsActionJustReleased("ui_up") || Input.IsActionJustReleased("ui_down"))
        {
            //moveInput = Input.GetVector("ui_left", "ui_right", "ui_up", "ui_down");
            moveInput = new Vector2(Input.GetAxis("ui_left", "ui_right"), Input.GetAxis("ui_up", "ui_down"));
			GD.Print("Input Release: " + moveInput);
        }
    }

In this case, I just used Control node and attached this block of code
Minimal reproduction project
Test.zip

Probably a duplicate of https://github.com/godotengine/godot/issues/81164 and was solved by https://github.com/godotengine/godot/pull/81170

Ah, sorry about that and thanks for taking a bit of time.


Add a fuchsia-specific entrypoint to allow flutter_tool to override artifacts.

Adds a separate BUILD.gn target and entrypoint file, which overrides the artifacts class with a configurable location for the frontend_server snapshot.
The current implementation is fairly basic and should only work for the fuchsia hot reload command.

I'm going to hold off on this PR, closing for now


mount can't find systemd-ask-password

When I try to mount a password-protected CIFS drive on my NixOS system, I get the following error message:
# mount /mnt/fritz.nas
sh: systemd-ask-password: command not found

Now, after that error, mount proceeds to ask  for a password anyway (probably through some means available as a fallback), but still this doesn't seem right. The requested tool is installed and available in $PATH:
# type -p systemd-ask-password
systemd-ask-password is /run/current-system/sw/bin/systemd-ask-password

Is it possible that mount doesn't have that $PATH configured for some reason?

me too

Noticed the same issue just now.
In nixos/modules/system/boot/systemd.nix it says
# Default path for systemd services.  Should be quite minimal.
          path =
            [ pkgs.coreutils
              pkgs.findutils
              pkgs.gnugrep
              pkgs.gnused
              systemd
            ];
          environment.PATH = config.path;

and systemd has systemd-ask-password.

This issue has been fixed.


base: status: For odhpcd leases display MAC formatted with colons

This should result in the MAC address display being the same
using odhcpd for v4 DHCP as when using DNSMasq for v4 DHCP.
Signed-off-by: Daniel Dickinson<EMAIL_ADDRESS>

This was annoying to manually verify some testing. Did this fix the DUID also?

@EricLuehrsen sorry didn't quite parse what you meant.  Do you mean there is some trouble verifying the PR or that the difference in MAC/DUID caused you issues with verifying your recent dnsmasq DHCPv6 patch?  I didn't do DUID (I didn't realize it was also supposed to be colon separated, since it's used without colons in the UCI config).  Or would it be better to remove colons from the dnsmasq DUID (which does dnsmasq expect for DUID specification?).
Also for the MAC address I just used the dumb and easy manual concat rather than a function.  To add DUID it'd need a proper generic function (which would better anyway, I just figured it was overkill).
Regards,
Daniel

I'd ideally like to see that from a UI / UCI config perspective that the parts of dnsmasq / odhcpd / unbound / ISC / bind / etc that peform the same functions have the same frontend.  This takes a combination of LuCI properly handling each case, as well as each daemon being able to accept the common interface method of configuration.  Of course there will be aspects unique to each tool, but that should be for the things that are unique to the tool.

PR is good. I was testing odhcpd+unbound and configuring hosts in weird ways for robustness. Its hard to read a DUID without separators. So its hard to manually inspect results without out them. A few DUID types use MAC, so again, its just annoying and would be nice if were fixed.

I have been trying to mimic UCI-dnsmasq as much as possible in UCI-Unbound. Obviously, a recursive server has significant differences from a stub resolver, but there are overlaps.

Ok, so probably best for DUID is

Display status (overview / DHCP and DNS page) as colon separated
Allow cut and paste into LuCI DUID field but strip colons in the UCI config so that e.g. odhcpd gets what it's expecting.
IOW this is a purely UI play.

@EricLuehrsen sounds good; you seem to be doing as I meant to say; differences where necessary, unified configuration interface where reasonably possible.

LGTM


Improve typos in Notebooks

Hi,
Probably a minor copy/paste fix needed in the notebooks:

https://github.com/rflamary/POT/blob/master/notebooks/plot_otda_mapping_colors_images.ipynb
https://github.com/rflamary/POT/blob/master/notebooks/plot_otda_color_images.ipynb

For example, in the latter, the following code seems produce EMD instead of Sinknorn
# prediction between images (using out of sample prediction as in [6])
transp_Xs_emd = ot_emd.transform(Xs=X1)
transp_Xt_emd = ot_emd.inverse_transform(Xt=X2)

transp_Xs_sinkhorn = ot_emd.transform(Xs=X1) # Shouldn't be ot_sinkhorn.transform(Xs=X1) ?
transp_Xt_sinkhorn = ot_emd.inverse_transform(Xt=X2)  # Same here

At least, it would match the example:
https://github.com/rflamary/POT/blob/e757b75976ece1e6e53e655852b9f8863e7b6f5a/examples/plot_otda_color_images.py#L118-L119
Thanks
PS. Sorry if I misunderstood something.

Indeed this is a typo, thank you for noticing.
Since the notebooks are generated automatically from the example we only need to the corresponding examples in the example folder.
You are welcome to provide a PR.

@rflamary sure, I can send a PR. However I have no idea on how to regenerate the notebooks.
Actually, plot_otda_color_images.ipynb was not regenerated since the edits of plot_otda_color_images.py as they differ too.

OK I can do it no problem.
For your information, the notebooks/doc can be updated by executing the script nb_build in folder POT/docs/.  It takes a lot of time and memory the first time so don't worry about it.
Thank you again.


mysqlclient==1.4.2.post1: Warning! Using precompiled lambda package version 1.3.12 instead!

I have the following package in requirements.txt:
mysqlclient==1.4.2.post1

When I run a zappa update it displays the following
Downloading and installing dependencies..
 - mysqlclient==1.4.2.post1: Warning! Using precompiled lambda package version 1.3.12 instead!
 - sqlite==python36: Using precompiled lambda package
Packaging project as zip.

I just wonder why, is it an issue?

you could set "use_precompiled_packages" in your zappa-settings.json to False which might help you. however I am also wondering why it uses a lower version from zappa-packages even if a higher one was explicitly specified.

Hello, i can confirm using local python env 3.6.6 and lambda doesn't let me run the function:
[1554483253817] Instancing..
[1554483255843] /var/task
[1554483256584] mysqlclient 1.3.13 or newer is required; you have 1.3.12.: ImproperlyConfigured
Traceback (most recent call last):
File "/var/task/handler.py", line 602, in lambda_handler
return LambdaHandler.lambda_handler(event, context)
File "/var/task/handler.py", line 245, in lambda_handler
handler = cls()
File "/var/task/handler.py", line 151, in init
wsgi_app_function = get_django_wsgi(self.settings.DJANGO_SETTINGS)
File "/var/task/zappa/ext/django_zappa.py", line 20, in get_django_wsgi
return get_wsgi_application()
File "/var/task/django/core/wsgi.py", line 12, in get_wsgi_application
django.setup(set_prefix=False)
File "/var/task/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/var/task/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/var/task/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/var/lang/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/var/task/django/contrib/auth/models.py", line 2, in
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "/var/task/django/contrib/auth/base_user.py", line 47, in
class AbstractBaseUser(models.Model):
File "/var/task/django/db/models/base.py", line 117, in new
new_class.add_to_class('_meta', Options(meta, app_label))
File "/var/task/django/db/models/base.py", line 321, in add_to_class
value.contribute_to_class(cls, name)
File "/var/task/django/db/models/options.py", line 204, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "/var/task/django/db/init.py", line 28, in getattr
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/var/task/django/db/utils.py", line 201, in getitem
backend = load_backend(db['ENGINE'])
File "/var/task/django/db/utils.py", line 110, in load_backend
return import_module('%s.base' % backend_name)
File "/var/lang/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/var/task/django/db/backends/mysql/base.py", line 36, in
raise ImproperlyConfigured('mysqlclient 1.3.13 or newer is required; you have %s.' % Database.version)
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 1.3.12.

you could set "use_precompiled_packages" in your zappa-settings.json to False which might help you. however I am also wondering why it uses a lower version from zappa-packages even if a higher one was explicitly specified.

If you do that you get "django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?"
For some reason newer versions are not compatible with lambda and older are not compatible with django.


Create a CSPM test to detect AWS registry container images that still have root enabled

Describe the issue
During the openshift on-prem build process of an image, the root user is always deleted after the installation of software in the image, so that the runtime cannot ever run as root since the root user is gone.  There are Openshift tests to scan for and prevent images with root from slipping by.  We wish to guarantee the same for ECS image registry images.
Additional context

Assume that CloudGuard CSPM access to the Production LZ2 environments with the new licensed Candian CSPM tool is already done
There are other image registries/docker images that we would need to check later, but limiting scope to ECS images because we start off a lot of our clients with ECS
Security Hub has this capability and can possibly give us alerts (hint: see Security Hub)
We don't know for sure we can scan with CSPM to do this (it's either easy or doesn't exist)

Definition of done

Pull in Gary to ride along and learn
Get Asset ID number from Julian for contacting CheckPoint support and get the contact name from Julian of the CSPM agent he is working with
Start by reaching out to CheckPoint Support to get help accomplishing this
Will happen in ECF Prod LZ2, might need use of lab account - I think we can do the scan on existing team workloads because there are lots of ECS out there
There might be two or more ways to solve this, either scan running ECS images or images in the ECR
Create a manually triggered test in CSPM that can detect if images in ECS/ECR images still have the root user present
Scope is Detect, related ticket 760 is Remediate (so out of scope for current ticket)

May need Onboarding Container Registries

Also checked and found checkov by bridgecrew has the capability to scan docker file to ensure the last USER is not root.   As mentioned in our daily scrum standup, checkov is the path we're goring forward.

We are working with CP support but not getting results yet.  We may be able try to build a github bot that looks at the dockerfile user (we will make tickets).  Currently waiting on CP

We think this might not be a feature that is ready to use in CSPM yet, we're going to leave the ticket open until we know for sure.  If the answer is no, please close the ticket

Prabhu had shared the container registry in LZ2.   The account, workload can be found in CSPM but not image.  It could be CSPM onboarding permission issue or checkpoint.   Currently, pending on onboarding permission to be fixed before try again.

Checkpoint TAC SR #6-0003369490 responded it could be related to role, external id, or SCP, guardrail.   Warren is helping to see if AWS SEA related.

PO to give Prabhu permission and same level of access to see if the unauthorized operaiton stemming from the lack of authority.    If not, due to extreme difficult and dependency on checkpoint support, we will close the ticket as a result.

Had the screenshare  with checkpoint TAC support.   The 'unauthorized operation' error is appeared related to SCP ro CSP Policy.   In addition, we have to onboarding Container Environment as it is not part of unified onboarding and have to do it separately.  However, Terraform API does not have the related serverless API.   Furthermore, the CloudGuard CSPM does not have AWS container in the UI.   If CheckPoint TAC support can't replicate the problem, I will create another ticket and reach out to Chris B. for it.

AWS Dashboard System Ruleset (D9.AWS.IAM.49 to be exact) covers the checking already.

ECS is only for AWS

Checkov can already cover root configuration checks in the Docker file IaC, so this mitigates a lot of the risk.
We are holding off on the ShipLeft, no certainty of runtime protection.  Bruce thinks ACS (RedHat Advanced Cluster Security) is capable of doing it for ROSA so we would imagine it's possible via Check Point.
Also possible to assign Carles to see if he design a custom test for probing container user status in all ECS instances.

Good try, thank you!


chore(package): update github-repository-provider to version 7.4.22

Coverage decreased (-0.1%) to 33.43% when pulling 5b0b0ee7cff53fe2c09d25975d730fc6d3399490 on greenkeeper/github-repository-provider-7.4.22 into 6dfb46a83a3a402092f39b940ab6f62b14747293 on master.


docs: Reference state partitioning in stream partitioning page

Documentation type
Explanation
Description
I was learning about stream partitioning and I thought it would be helpful to reference state partitioning here as well. A partitioned stream must have a partitioned state so I think it would be useful to clarify that relationship for others viewing the page.

Still open to contributions


QMAPS-2203 prevent multiple geolocation popups per session

Description
Once the position is requested (with "my position" suggest item or Mapbox's Geolocation button), and the permission has been granted, watch the user's position for all the session.
This is done by polyfilling getCurrentPosition and watchPosition with a custom function that mimics them without requesting the browser many times
Why
calling many times getCurrentPosition or watchPosition duting the same session trigger Firefox Desktop's permission popup many times which is annoying
TO DO
test to be sure that everything still works on other OS / devices / browsers than Windows 10 / PC / Fx & Chrome
TO DEBATE
Is it OK to "watch" the user's position even when the Mapbox geolocation button is disabled? (I'd say yes).
No information about the user's position is sent to our servers, and the user is aware that his position is known with this icon:

Screenshots

I also believe this "bug" is not worth all that.
But I also don't think it's useful to be able to disable geolocation during a browsing session.
What if the geolocation button simply disappeared after it has been clicked once?

A workaround for the geolocation issues on Firefox Desktop has been implemented in #1157.
Even if the authorization may appear twice in a session, errors should hopefully be rare. So this fix does not seem necessary for now.


Recognize new names for Xbox Console Companion

Uses process id to find the name of the running process executable.
e.g.
C:\Program Files\WindowsApps\Microsoft.XboxApp_48.54.3003.0_x64__8wekyb3d8bbwe\XboxApp.exe
and relies for detection on the name of the executable(this should be the same in any language)
feel free to check for your self.

is there anyway to test yr changes?

You can check out the code here https://github.com/Ignefolio/XboxKeyboardMous and run it in Visual Studio.


support for tsconfig.json

Can we have support for tsconfig.json files?
For real typescript based projects it's really hard to work without this.

Any news around it?

We'll be working more closely with the TS team going forward to ensure we have fewer discrepancies like this, so it's on the roadmap, but we don't know when exactly we'll get to it just yet.

any updates on that?

Support for tsconfig.json files seems to have be introduced into Typescript for VS at some point (perhaps TS 1.8). I've tested with a tsconfig.json at the root of my NTVS project and see the configuration options getting picked up properly during compilation.
Let me know if there is some other aspect of tsconfig.json support you were looking for, or if you have any ideas on how the experience could be improved.
Thanks.


The notice request info should be a unique batch ID

The server must keep idempotent.So the notice request info should be a unique batch ID .

task_id+trigger_time+target keep idempotent


[TMP] Fix Sass dependencies import for Bower

:warning: This is a temporary solution (see below)
Unlike NPM, Bower does not have its own registry and uses the Github repository. Like js/, sass/ and dist/, all the files required by Bower must be published on Git.
Changes:

Pin the Sass dependencies versions and update yarn.lock
Move only the require files to /vendor
Publish the Sass dependencies in vendor/ on git.

This is not a maintainable dependency management. This approach is limited to the v6.3.0 pre-releases and should be removed before any stable version.

Committing for now for rc2 so we can keep testing.  I think we have a better solution brewing


Red fields in UI give error impression

Problem
On a Wagtail YouTube video https://youtu.be/nBNb7k0BMP4 a comment is placed about reds in the admin ui:

vinny142
So are you going to change the red field label color to something that does not keep making me thing there's an error? :-) Please? I've shown Wagtail to lots of potential users and they all keep asking me why there are errors on the screen when they open it.

Solution
Do not use reds in a UI, unless it is an error or error related indicator.
Additional context
Maybe this is one of those things that surprises new users. Quickly forgotten once you get used to it.
But it is the wrong first impression, and easy to avoid.
I also don't know any user interface with reds near input fields (probably for the same obvious reasons).

We’ve significantly changed the designs for forms’ layout in Wagtail 4, as of #8921. Closing!


Add deprecated status and/or maintenance status to each API /index in JSON

Migrated from GitLab: https://gitlab.com/meltano/hub/-/issues/252
Originally created by @aaronsteers on 2022-05-20 19:07:07

Per https://gitlab.com/meltano/meltano/-/merge_requests/2654#note_955039338
We could add as "deprecated": false or "maintenance_status": "deprecated".

View 4 previous comments from the original issue on GitLab


Handle vfs protocol, fixes #48

Simple reflection based approach. In case this implementation is too optimistic ;-) it might be an option to refactor the VirtualFile reflection access into a util class to do some more checks before (e.g. method availability, return type check).

Closing this one, waiting for the plugin API.


[Feature Request] Include Docker images with each release

It would be extremely helpful to include Docker images with each release that include the tokenizer and compiled C libraries required to run hugot.
I'm busy writing integration tests that need to be run platform independently (due to the dependencies) and it's currently not viable to build my own hugot image. This will also be very useful as a base-image to build upon.
Thanks!

Hi @gregfurman, on this one, I could look at generating the docker image with hugot and putting it on dockerhub? I would probably do it without multi-platform build for now (i.e. image would be build for linux/amd64), would that work?

Hey @riccardopinosio.
Dockerhub works for me!, otherwise GitHub's container registry is another option to consider.
Regarding platform, linux/amd64 is perfect 😄

@gregfurman i added a step to upload a docker image with the hugot release. The image includes the hugot dependencies (onnxruntime and tokenizer) and can be found in the github docker repository on the main page.


Fix the protobuf dependency on zlib. [phab:D2137]

Created by fromberger at 2018-01-23 20:23:46:
When I updated the protobuf rules in #2580, I also inadvertently introduced a
dependency bug. In particular, I did not plumb through the correct zlib deps,
so that protobuf built using the ambient system-installed zlib instead of the
one we build in Bazel.
This change binds our //third_party/zlib rule as an external dependency and
fixes up the BUILD file for protobuf to use it properly.
Addresses #2596.

zarko accepted this revision at 2018-01-23 20:44:53

fromberger closed via commit 124a010a61e3449db40d7563678acd031037bebe at 2018-01-23 20:54:00


Ensure embedded keys are used to check uniqueness

When a node implements EntityKeyGen such that genEntityKey returns Just, we use insertKey to write the node to the database. However, if the key is a composite key, persistent keeps those values in the record itself, and insertKey doesn't ensure that the key argument and the record agree on those values.
This is bad.
Instead of trying to bake this into the API, we just do the right thing at runtime. We do the following:

Generate a node
Optionally generate a key
Check - did we generate a key, and does this type have a Primary definition?

No! We're done! Insert away!
Yes!

Convert the record to an association list of [(HaskellName, PersistValue)]
Convert the key to an association list of [(HaskellName, PersistValue)]
Replace any values in the record list with values from the key list where the names match up
Insert!

This is a little wacky, but it's basically what persistent does on write and read anyway. We'll only pay for it with entities that implement genEntityKey and declare Primary, so I don't think it's much of a problem.
I did go ahead and merge HasDependencies and EntityKeyGen.

The other alternative would be to get persistent to implement insertKey differently

Mmm, even if we made insertKey behave, we'd have to change how we check uniques ahead of time:
whenNothing existingKey $ do
  existingUnique <- checkUnique n -- <-------- garbage in n
  whenNothing existingUnique $ do
    insertKey key n -- <-------- silently fixes n to use values from key too late
    getEntity key

I changed my mind about how to do this. New description incoming.

Hmm, do we like that restyled is using ormolu? Or should I copy the config from megarepo into here?

We should turn off ormolu.

It's unintentional that ormolu ran by default (not here, like in Restyled at all). I'll fix that.

Re: upstreaming, it only makes sense as a part of insertKey, but I suspect this use-case isn't very common. In "real" applications, it's unlikely that all of these would be true:

You have a real record
You have a real key
persistent embeds a key in the record
The key you have does not match the key embedded in the record

This is entirely due to us separating record and key generation.
Additionally, doing this in insertKey is actually too late for us since we need to checkUnique ahead of time:
whenNothing existingKey $ do
  let updated = embedKey key n
  existingUnique <- checkUnique updated -- must check unique constraints here
  whenNothing existingUnique $ do
    insertKey key updated -- too late to embed key
    getEntity key

I did think maybe a better API would be to make genEntityKey depend on the value so you can just pull it out of the record if it's generated as part of the Arbitrary instance.
class HasDependencies a where
  type Dependencies a :: *

  ...

  genEntityKey :: a -> Gen (Maybe (Key a))

Unfortunately, we still need to call embedKey after this in the cases where you implement this, but it doesn't actually depend on the record. Alternatively, we define this:
class HasDependencies a where
  type Dependencies a :: *

  ...

  extractKey :: a -> Maybe (Key a) -- Pure, never need to call embedKey
  extractKey _ = Nothing

  genKey :: Gen (Maybe (Key a)) -- Has access to Arbitrary, must call embedKey
  genKey = pure Nothing

Then we do this:
attemptsToInsertWith attempts source =
  ...
    value <- source
    mKey <- liftIO $ maybe ((value `embedKey`) <$> generate genKey) pure $ extractKey value
    insert mKey value >>= \case
      Just a -> pure a
      Nothing -> pred attempts `attemptsToInsertWith` source

And we only pay for embedKey when the user defines genKey (which would be rare now).
WYT?

There are some important effects of embeding vs coalescing a key. In the case where you have a key in Dependencies only coalescing would work. @pbrisbin wasn't that your use case?

@cdparks couldn't coalescing take place in genEntityKey if we just passed the record to it as well? Why the other machinery?
genEntityKey record =
  CompositeKey
    (foo record) -- extracted
    (bar record) -- extracted
      <$> arbitrary -- some additional arbitrary value

Oh I see why you are differentiating. I think I'd rather keep embedkey as an internal implementation for coherence (anyway) and just keep everything in genEntityKey.

You then need to change the type of the genEntityKey in a way that's easy to ignore:
genEntityKey :: Thing -> Gen (Maybe (Entity Thing))
genEntityKey<EMAIL_ADDRESS>=
  pure $ Just $ Entity (ThingKey foo bar) thing -- <-- works, we just pulled stuff out

genEntityKey :: Blah -> Gen (Maybe (Entity Blah))
genEntityKey<EMAIL_ADDRESS>= do
  yarp <- someArbitraryComputation
  pure $ Entity (BlahKey foo bar yarp) blah -- <-- wrong, failed to update yarp in blah

I guess here's the thing that bugs me about the current scenario. You have to do this:
instance Arbitrary StarScoreSkillMapping where
  arbitrary = genericArbitrary

instance EntityKeyGen StarScoreSkillMapping where
  genEntityKey =
    Just <$> (StarScoreSkillMappingKey <$> arbitrary <*> arbitrary)

instance HasDependencies StarScoreSkillMapping where
  type Dependencies StarScoreSkillMapping = Only SkillId

But the work happening in genEntityKey has already been done in the Arbitrary instance for StarScoreSkillMapping. We can just yank those bits out!
  instance Arbitrary StarScoreSkillMapping where
    arbitrary = genericArbitrary

- instance EntityKeyGen StarScoreSkillMapping where
-   genEntityKey =
-     Just <$> (StarScoreSkillMappingKey <$> arbitrary <*> arbitrary)

  instance HasDependencies StarScoreSkillMapping where
    type Dependencies StarScoreSkillMapping = Only SkillId

+   extractKey StarScoreSkillMapping {..} =
+     Just $ StarScoreSkillMappingKey
+       starScoreSkillMappingStarScore
+       starScoreSkillMappingSkillId

In the scenario where the client does implement genKey, embedKey is still internal. We call it, not the client.

One of these days, I'm gonna bite the bullet and do this
share [mkGraphula, mkPersist sqlSettings] [persistLowerCase|
MathNumberBasicsQuestion json sql=math_number_basics_questions
    Id                  UUID sqltype=uuid
    skillCode           NumberBasicsSkillCode
    answerType          NumberBasicsAnswerType
    questionDiagramName Text Maybe
    updatedAt           UTCTime
    position            Natural
    deriving Generic
|]

But what about the case when you need to extract and you have randomness. Just adding record to the arguments of genEntityKey enables all this flexibility with little cost to the API.
  extractKey :: a -> Maybe (Key a) -- Pure, never need to call embedKey

  genKey :: Gen (Maybe (Key a)) -- Has access to Arbitrary, must call embedKey

vs
  genKey :: a -> Gen (Maybe (Key a)) -- Has access to Arbitrary and subsumes extractKey

I guess that's fine. I don't love having to pay for embedKey in the case where we don't need it, but I'd already convinced myself it wasn't that expensive

Yeah embedKey should be exceedingly cheap compared to any of the IO that happens here. And it only needs to happen in cases where we have a custom Key.

@pbrisbin that would be helpful to validating the API.

I would be surprised if the case where you need to extract and have randomness exists. That would mean you have a node that has an embedded key and the Arbitrary instance for the node is insufficient.

Yes please @pbrisbin

Entity:
{-# LANGUAGE NoDeriveAnyClass #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}

module FrontRow.Entities.RlSkill
  ( module FrontRow.Entities.RlSkill
  )
where

import Prelude

import Data.Aeson
import Database.Persist
import Database.Persist.TH
import FrontRow.Core.SchoolGrade
import FrontRow.Entities.RlAttributes
import FrontRow.Entities.RlStandard
import FrontRow.Entities.RlStandardSet
import FrontRow.Json
import GHC.Generics (Generic)
import Graphula (EntityKeyGen(..), HasDependencies(..))
import Test.QuickCheck.Arbitrary.Generic

mkPersist sqlSettings [persistLowerCase|
RlSkill sql=rl_skills
  uspId UspId
  name Name
  shortName Name
  progressionOrder ProgressionOrder
  grade SchoolGrade
  standardSetId RlStandardSetId
  standardId RlStandardId
  Primary uspId standardSetId
  deriving Show Eq Generic
|]

instance ToJSON RlSkill where
  toJSON = genericToJSON $ aesonOptions $ Just "rlSkill"
  toEncoding = genericToEncoding $ aesonOptions $ Just "rlSkill"

instance Arbitrary RlSkill where
  arbitrary = genericArbitrary

instance EntityKeyGen RlSkill where
  genEntityKey = Just <$> arbitrary

instance HasDependencies RlSkill where
  type Dependencies RlSkill = (RlStandardSetId, RlStandardId)

instance {-# OVERLAPPING #-} Arbitrary (Key RlSkill) where
  arbitrary = RlSkillKey <$> arbitrary <*> arbitrary

-- Doesn't work
        skill <- nodeWith @RlSkill $ keys (standardSet, standard)

-- Also doesn't work
        skill <- nodeEditWith @RlSkill (keys (standardSet, standard))
          $ (persistFieldLens RlSkillStandardSetId .~ entityKey standardSet)
          . (persistFieldLens RlSkillStandardId .~ entityKey standard)

-- Workaround
  skill <- liftIO $ generate arbitrary
  insertEntity $ skill
    { rlSkillStandardSetId = entityKey standardSet
    , rlSkillStandardId = entityKey standard
    }

Ok, this is actually a really interesting case because the primary key is also the dependencies. We actually can't generate a new random key and embed because then we'll have overwritten the dependencies!
If we have separate extractKey (pure) and genKey (impure) methods, we have this:
instance HasDependencies RlSkill where
  type Dependencies RlSkill = (RlStandardSetId, RlStandardId)

  extractKey RLSkill{..} =
    Just $ RLSkillKey
      RLSkillUspId
      RlSkillStandardSetId

In the case where we only have genKey, we have:
instance HasDependencies RlSkill where
  type Dependencies RlSkill = (RlStandardSetId, RlStandardId)

  genKey RLSkill{..} =
    pure $ Just $ RLSkillKey
      RLSkillUspId
      RlSkillStandardSetId

Note that the user could implement:
instance HasDependencies RlSkill where
  type Dependencies RlSkill = (RlStandardSetId, RlStandardId)

  genKey _ = Just <$> arbitrary

But now the dependencies have been erased!
So, yeah, I maybe need to think about if there's a way to make sure dependency fields are obviously untouchable.

@cdparks you seem to be hunting for correct by construction. However exposing genKey and extractKey as separate APIs still doesn't give you that. An individual could easily write genKey in a place where they should have written extractKey.  Additionally what happens if I implement both genKey and extractKey?

extractKey takes precendence. We could warn on both implemented or even throw. This is the order of updates that I think is at least correct:
nodeEditWith
  :: forall a m
   . GraphulaContext m '[a]
  => Dependencies a
  -> (a -> a)
  -> m (Entity a)
nodeEditWith dependencies edits = 10 `attemptsToInsertWith` do
  initialNode <- generateNode
  let
    edited = edits initialNode
    finalNode = edited `dependsOn` dependencies -- <- overwrites edits (as before)
    mExtractedKey = extractKey finalNode
  mKey <-
    case mExtractedKey of
      Nothing -> genExternalKey
      Just extractedKey ->
        mExternalKey <- genExternalKey
        maybe
          (pure $ Just extractedKey)
          (throwIO . usefulErrorMessage)
          mExternalKey
  logNode finalNode
  pure (mKey, finalNode)

This

Doesn't allow genExternalKey to override fields in the record (because that could break dependencies)
Requires that embedded keys use Arbitrary in the Arbitrary instance for the record itself
Logs the node that we actually intend to store
Explodes if you've implemented both. Again, I don't have a smart way to prevent this at compile time because persistent does not distinguish these cases at compile time.

you seem to be hunting for correct by construction

Yeah, i don't think i can get this without template haskell

@pbrisbin since your dependencies fully determine your primary key, I don't think you even need to implement genEntityKey. Do your tests work if you change your instance to
instance EntityKeyGen RlSkill

And use
skill <- nodeWith @RlSkill $ keys (standardSet, standard)

?

Will check. Going to be a bit of recompile to get an answer; stand by.

Oh man, not generating a key should work in this circumstance :face-palm:

Bwaaaawmp

Yup, looks like it worked. :man_facepalming:

Ok, so, should we just discard this for now? I'm not sure if we came up with something better than the (admittedly confusing) status quo

Yeah, this will at least leave a document of some ideas if this comes up again.


Cleanup testing

move TestingFileStorage to tests file
rename it to something like FakeFileStorage
rename tests.py to something which pytest can autodiscover (fixed by #48)

Huh, it seems TestingFileStorage is part of the public API, and after a search on GitHub it is actually used.
So, maybe it is a better idea to create the src directory structure first #21, and then split the module in several files.

Closing this, as TestingFileStorage was moved to a separate module.
It can't be renamed as it is part of the public API.


Monitor current run in Azure portal is not working

https://github.com/dotnet/machinelearning-tools/commit/bbdd09ea9ae3a65cb093d1c691ab12010c3e332f

Validated


VSCode crashed while trying to restore full-screen

We have written the needed data into your clipboard because it was too large to send. Please paste.
Issue Type: Bug
Restore full screen does not work if Prefer tabs: Always
VS Code version: Code - Insiders 1.67.0-insider (a9288be67bab4e9c4dbe62207f01fafc2bdaadcb, 2022-04-15T05:28:12.573Z)
OS version: Darwin arm64 21.4.0
Restricted Mode: No

System Info

Item
Value

CPUs
Apple M1 (8 x 24)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: enabledvideo_encode: enabledwebgl: enabledwebgl2: enabled

Load (avg)
5, 3, 2

Memory (System)
16.00GB (0.16GB free)

Process Argv
--crash-reporter-id 74c2ad87-67ad-4b90-b2c4-247f0ea3d1f9

Screen Reader
no

VM
0%

Extensions (56)

Extension
Author (truncated)
Version

svgo
100
2.7.0

vscode-fish
bma
1.0.27

vscode-intelephense-client
bme
1.8.2

npm-intellisense
chr
1.4.1

vscode-css-modules
cli
0.4.1

gitignore
cod
0.7.0

vscode-svgviewer
css
2.0.0

vscode-markdownlint
Dav
0.47.0

vscode-eslint
dba
2.2.2

vscode-deno
den
3.12.0

gitlens
eam
12.0.6

EditorConfig
Edi
0.16.4

vscode-npm-script
eg2
0.3.24

LogFileHighlighter
emi
2.15.0

prettier-vscode
esb
9.5.0

shell-format
fox
7.2.2

vscode-google-translate
fun
1.4.13

vscode-pull-request-github
Git
0.40.0

go
gol
0.32.0

todo-tree
Gru
0.0.215

r
Iku
2.4.0

vscode-phpfmt
kok
1.0.31

sftp
lix
1.12.10

rust-analyzer
mat
0.2.1010

vscode-language-babel
mgm
0.0.36

git-graph
mhu
1.30.0

dotenv
mik
1.0.1

HTMLHint
mka
0.10.0

vscode-apache
mrm
1.2.0

vscode-scss
mrm
0.10.0

gather
ms-
2022.3.0

python
ms-
2022.4.1

vscode-pylance
ms-
2022.4.1

jupyter
ms-
2022.3.1000901801

jupyter-keymap
ms-
1.0.0

jupyter-renderers
ms-
1.0.6

cpptools
ms-
1.9.7

color-highlight
nau
2.5.0

proto
pet
0.0.2

material-icon-theme
PKi
4.15.0

polacode
pnp
0.3.4

java
red
1.5.0

vscode-commons
red
0.0.6

vscode-yaml
red
1.6.0

postcss
ric
2.0.0

code-settings-sync
Sha
3.4.3

gitconfig
sid
2.0.1

code-spell-checker
str
2.1.11

code-spell-checker-russian
str
2.0.3

vscode-styled-components
sty
1.7.4

vscode-stylelint
sty
1.2.2

vscode-sql-lit
the
0.4.0

vscodeintellicode
Vis
1.2.19

vscode-nginx
wil
0.7.2

viml
Xad
2.1.1

vscode-open-in-github
ziy
1.3.6

Steps

Set macOS Prefer tabs to Always to reproduce this error

Download VSCode Insiders
Open a 3-4 apps in native tabs (on macOS-only)
Set these settings

 "window.nativeTabs": true,
  "window.dialogStyle": "native",
  "window.titleBarStyle": "native",
  "window.menuBarVisibility": "compact",
  "window.nativeFullScreen": true,
  "window.restoreFullscreen": true,
  "window.restoreWindows": "all",

Exit VSCode (Cmd+Q)
Try to re-open VSCode

Related issues

https://github.com/microsoft/vscode/issues/76537
https://github.com/microsoft/vscode/issues/131018

Can you please follow the steps in https://github.com/Microsoft/vscode/wiki/Native-Crash-Issues to get at more details around the crash and attach the result here? Thanks!

@bpasero Here it is dump
a72505bd-653a-4333-97aa-aa47a57c10bf.dmp.zip

@bpasero Currently at version 1.70.2 it works, really, some repos cannot be closed but for other repos works


could not install

npm i -g install-aab
then
install-aab file.aab
Extracting APK...
Unzipping...
Unzipped.
APK path: /private/var/folders/n_/30jh5m816yzg3_cftvg647j40000gn/T/install-aab-0.24210479471617607/extracted/splits/base-master.apk
Installing...
Could not install: Command failed with exit code 2 (ENOENT): adb install /private/var/folders/n_/30jh5m816yzg3_cftvg647j40000gn/T/install-aab-0.24210479471617607/extracted/splits/base-master.apk
spawn adb ENOENT
Cleaning up...
Done.

spawn adb ENOENT Could be an issue with your adb.. is adb in your $PATH?
What is the output of which adb?


issue(material-experimental/mdc-form-field): cleanup CSS styles

The MDC-based form-field has undergone a restructuring recently and we should be able to clean up some of the styles

Closing since this should've happened a long time ago.


provide flag to automatically run script on command start

Perhaps rerun-script test -a (-a for auto) ?

fixed by #5


OAuth unable to get the accesstoken on iOS 14

Description:
We have implemented the flow that loggin in our iOS app opens SFSafariViewController which displays the login page handled by our own identity server. The user logs in, is redirected back to the app, and there the necessary calls our made to get the tokens we need.
This is working fine up until iOS 13.
When trying on iOS14, building with Xcode 12, the logging in and redirecting back is working as expected. But
when the OAuthSwift framework tries to get the access token in the function
fileprivate func requestOAuthAccessToken(..)
it fails, because it encounters an error, 403 Forbidden.
Any ideas what kind of differences between Xcode 12/iOS 14 and Xcode 11/iOS 13 could be causing this?
Thank you.
OAuth Provider? (Twitter, Github, ..):
our own
OAuth Version:

[ ] Version 1
[x ] Version 2

OS (Please fill the version) :

[x] iOS :
[ ] OSX :
[ ] TVOS :
[ ] WatchOS  :

Installation method:

[ ] Carthage
[x] CocoaPods
[ ] Swift Package Manager
[ ] Manually

Library version:

[ ] head
[ ] v2.1.0
[x] v2.0.0
[ ] v1.4.1
[ ] other: (Please fill in the version you are using.)

Xcode version:

[ ] 11.4 (Swift 5.2)

[ ] 11.x (Swift 5.1)

[ ] 10.x (Swift 5.0)

[ ] other: (Please fill in the version you are using.)

[ ] objective c

Using this I am able to get access token in Xcode 13, ios 14. Please try this.
self.oauthswift?.client.credential.oauthToken

no idea

Thank you for your answers. However I'm not able to reproduce the issue anymore reliably.


Fix source download link when no code unit allowed

will fix #3165

Codecov Report

Merging #3166 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3166      +/-   ##
==========================================
+ Coverage   34.74%   34.74%   +<.01%
==========================================
  Files         276      276
  Lines       39945    39945
==========================================
+ Hits        13878    13880       +2
+ Misses      24073    24071       -2
  Partials     1994     1994

Impacted Files
Coverage Δ

models/repo.go
41.47% <0%> (ø)
:arrow_up:

models/repo_list.go
67.18% <0%> (+1.56%)
:arrow_up:

Continue to review full report at Codecov.

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

LGTM

LGTM

@lunny please backport

@lafriks done.


add vercel.json to remove vercel bot comment from PR and commit

JIRA

Description
Add vercel.json file to switch off vercel bot during PR and commit

Tests
The following are included in this PR

[ ] Unit Tests (Most changes should have unit tests)
[ ] Integration Tests

Checklist

I have considered the following implications of my change:

[ ] Security (in particular for changes to authentication, authorization, data fetching, ...)
[ ] Performance
[ ] Migration
[ ] Code maintainability

Documentation

[ ] Inline documentation
[ ] Internal Documentation (wiki)
[ ] User-facing Documentation

change my mind


Issue using /dev/random on Alpine

When using /dev/random on Alpine (C1 Server), the command is stuck indefinitely : dd if=/dev/random of=/dev/null bs=8 count=1
Using the same command on another Image (Xenial) is working fine.

duplicate with #51


Sc 10616 GDS User UI : implement Identity Certificate Details feature

Scope of changes
Sc 10616 GDS User UI : implement Identity Certificate Details feature
Type of change

[ ] bug fix
[x] new feature
[ ] documentation
[ ] other (describe)

Acceptance criteria
https://app.shortcut.com/rotational/story/10616/gds-user-ui-implement-identity-certificate-details-feature
Author checklist

[x] I have manually tested the change and/or added automation in the form of unit tests or integration tests
[ ]  I have updated the dependencies list
[ ]  I have recompiled and included new protocol buffers to reflect changes I made
[ ]  I have added new test fixtures as needed to support added tests
[x]   Check this box if a reviewer can merge this pull request after approval (leave it unchecked if you want to do it yourself)
[x]  I have moved the associated Shortcut story to "Ready for Review"

Reviewer(s) checklist

[ ] Any new user-facing content that has been added for this PR has been QA'ed to ensure correct grammar, spelling, and understandability.

Codecov Report
Base: 44.02% // Head: 47.08% // Increases project coverage by +3.05% :tada:

Coverage data is based on head (7764309) compared to base (ab09a62).
 Consider uploading reports for the commit 18e422e to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #883      +/-   ##
==========================================
+ Coverage   44.02%   47.08%   +3.05%
==========================================
  Files         635      275     -360
  Lines       23194    19964    -3230
  Branches     1416      655     -761
==========================================
- Hits        10212     9400     -812
+ Misses      11645     9240    -2405
+ Partials     1337     1324      -13

Flag
Coverage Δ

unittests
47.08% <ø> (+3.05%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

web/gds-user-ui/src/application/routes/routes.ts

...-ui/src/components/CertificateManagement/index.tsx

...uest/ConfirmIdentityCertificateRequest.stories.tsx

...onents/ConfirmIdentityCertificateRequest/index.tsx

web/gds-user-ui/src/utils/menu.tsx

...ashboard/certificate/lib/reviewValidationSchema.ts

...b/gds-user-ui/src/components/MetricsTabs/index.tsx

...er-ui/src/components/TestnetProgress/StepLabel.tsx

...s-user-ui/src/application/routes/LandingOutlet.tsx

web/gds-user-ui/src/components/TableRow/index.tsx

... and 349 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Consider improving the self relations docs

From the user feedback in this call log:
https://prisma.productboard.com/insights/notes/all-notes/notes/27266684
"Docs for self relations

Need to use two fields for relation but why and how does it work? Would be great to improve this. Is this mandatory? Why is the relation exactly the same?
Misguiding in docs: why would you want to pick explicit over implicit many-to-many"

(second bullet is not about self relation)

👋 we're cleaning up our backlog of issues and are closing everything older than two years. If you still feel that this issue is relevant, please feel free to re-open and our team will take a look. Thank you!