react/jsx-uses-react not working

even though the plugin is condigured and react/jsx-uses-react  is enabled i get:
'React' is defined but never used
I am using eslint 3.11.1

Can you share the file on which this is erroring?

(note that it's JSX syntax that requires use of React, not a .jsx extension)

It might also help to share your eslint configuration as well as check to make sure that there aren't any overriding .eslintrc files in intermediary directories.

// @flow
import React, {PropTypes} from 'react';
// more imports here...
const Component = (props: Object) => {
//more code here
     return (

)
//therre is more jsx in the above
}
//more code here
export default Component;

@lencioni  I am using eslint -c to specify configuration
...
 "extends": ["eslint:recommended", "plugin:react/recommended", "plugin:flowtype/recommended"],
  "parserOptions": {
    "ecmaFeatures": {
      "experimentalObjectRestSpread": true,
      "jsx": true
    },
    "sourceType": "module"
  },
  "plugins": [
    "react",
    "flowtype"
  ]
...

I have also tired manually enabling the rule but sill the same

@agalazis what about the file this is erroring out on?

If you remove the flow syntax from the file, does the error still happen?

It would be helpful if you could create a repo that has a minimal reproduction of the issue.

Sorry for not getting back earlier couldn't get it replicated in any other project after playing with build /linting scripts (changing order) it worked. thanks!


Use integer or real as the data type for number index

At the moment we use BigDecimal stored as strings in the database number index tables: https://github.com/google/android-fhir/blob/master/core/src/main/java/com/google/android/fhir/db/impl/DbTypeConverters.kt#L51
This defeats the point of having number index. We should change the underlying data type to be integer or real (sqlite data type for decimal). It's not clear to me if we should create a separate integer index table or just put everything in the real index table.

There are two possible approaches here, each with their own pros and cons:

Use REAL for numeric indices
Just change the BigDecimal <> String conversion to a BigDecimal <> Double conversion.
Pros:

Super-simple change, easy to maintain
More performant

Cons:

Numeric range is lost (minor issue, as Double.MAX_VALUE is quite large)
Accuracy is lost

In particular, this is concerning because two numbers could round off to the same floating-point representation
When doing a sorted LIMIT 1 operation, for example, this could result in undefined behavior for retrieving the largest/smallest value that matches a search query

Use an int + string
BigDecimal is represented by two values: An int scale and a String unscaledValue (it's actually stored as an int[], but we'll use its String representation).
We can deconstruct the BigDecimal when we put it in the DB, into two separate columns.
To do this, we need to make a new class (eg, FHIRBigDecimal) and make it @Embedded into our Room Entities. (read more)
This might be more complicated than we thought it'd be based on our last meeting, though. Edge-cases, eg negative numbers and decimals in the range (-1, 1) are tricky. I've tried to approximate how SQLite would sort these (by the "magnitude" of the int, then by the string representation of its unscaled value, lexographically) here.
Pros:

Perfect precision
Unlimited range

Cons:

Performance hit (sort using 2 fields, one of which is a string)
More complicated

@brynrhodes @pld FYI

Just one minor correction: the int+string approach still have an upper bound of range - it's 10^(2^63-1) because the int has an upper bound of 2^63-1.
A third approach is to use one string field to encode the numbers lexigraphically while maintaining order: https://www.zanopha.com/docs/elen.pdf

Looking at these different approaches, I think personally I have a slight preference for using REAL for its simplicity.
If we change our mind in the future, we can always write a db migration.
How do others feel?


UnicodeEncodeError during cookiecutter

Hi everyone,
I have an issue at the end of the configuration (after I set docker_image_frontend value):
Traceback (most recent call last):
  File "$HOME/.local/bin/cookiecutter", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "$HOME/.local/lib/python3.8/site-packages/cookiecutter/cli.py", line 140, in main
    cookiecutter(
  File "$HOME/.local/lib/python3.8/site-packages/cookiecutter/main.py", line 101, in cookiecutter
    result = generate_files(
  File "$HOME/.local/lib/python3.8/site-packages/cookiecutter/generate.py", line 352, in generate_files
    generate_file(
  File "$HOME/.local/lib/python3.8/site-packages/cookiecutter/generate.py", line 180, in generate_file
    fh.write(rendered_file)
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc3' in position 254: surrogates not allowed

Does anyone have the same issue?
My configuration:
Python: 3.8.2
Cookiecutter: 1.7.2
WSL-Ubuntu 20.04.1
Thanks

I found the problem: I had only "python3" command and not "python". I fix it by installing python-is-python3

Thanks for coming to report back and close the issue! 🍰

Sorry for the long delay! 🙈  I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.


Cleanup client unit tests

As part of the review for #884, @haoming29 noted that some of the tests look like duplicates (or near-duplicates), such as TestFullUpload and TestGetAndPutAuth.
Let's review the existing suite of tests and clean up the overlaps.

The duplicate test is removed in #878 but I can double check through again to make sure there are no more duplicates


lp-371 : add getLimitedPartnership method to limited partnership service

JIRA link
https://companieshouse.atlassian.net/browse/LP-371
Change description
add getLimitedPartnership method to limited partnership service

LGTM


Can't understand this

[6/3/2023] [4:56:36 AM] [Migrate  ] › ℹ  info      Current database version:<PHONE_NUMBER>5214
[6/3/2023] [4:56:46 AM] [Global   ] › ✖  error     Migration table is already locked
If you are sure migrations are not running you can release the lock manually by running 'knex migrate:unlock'
[6/3/2023] [4:56:49 AM] [Global   ] › ✖  error     Migration table is already locked
Can't take lock to run migrations: Migration table is already locked
[6/3/2023] [4:56:52 AM] [Migrate  ] › ℹ  info      Current database version:<PHONE_NUMBER>5214
[6/3/2023] [4:56:52 AM] [Global   ] › ✖  error     Migration table is already locked
[6/3/2023] [4:57:01 AM] [Migrate  ] › ℹ  info      Current database version:<PHONE_NUMBER>5214
[6/3/2023] [4:57:01 AM] [Global   ] › ✖  error     Migration table is already locked
[6/3/2023] [4:57:04 AM] [Global   ] › ✖  error     Migration table is already locked
[6/3/2023] [4:57:04 AM] [Migrate  ] › ℹ  info      Current database version:<PHONE_NUMBER>5214
[6/3/2023] [4:57:07 AM] [Migrate  ] › ℹ  info      Current database version:<PHONE_NUMBER>5214
[6/3/2023] [4:57:10 AM] [Global   ] › ✖  error     Migration table is already locked

I'm having a somewhat similar issue with this error:
[6/17/2023] [1:13:13 AM] [Migrate  ] › ℹ  info      Current database version: none
[6/17/2023] [1:13:13 AM] [Global   ] › ✖  error     BEGIN; - SQLITE_ERROR: cannot start a transaction within a transaction
Can't take lock to run migrations: Transaction query already complete, run with DEBUG=knex:tx for more info
If you are sure migrations are not running you can release the lock manually by running 'knex migrate:unlock'
My error shows there's no database version however, but it's giving a similar suggestion to release the lock manually.

The only way I've found to address this to reinstall by pulling the latest version.  Then manually move all the configuration from old to new.  Since the author of this project seems MIA.

...
It seems so. Not verry amusable...
okynnor @.***> schrieb am Fr., 7. Juli 2023, 06:30:

The only way I've found to address this to reinstall by pulling the latest
version. Then manually move all the configuration from old to new. Since
the author of this project seems MIA.
—
Reply to this email directly, view it on GitHub
https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2975#issuecomment-1624707714,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AK35VR747ZSWDFGEY7A7NS3XO6GHJANCNFSM6AAAAAAYZB3KOI
.
You are receiving this because you authored the thread.Message ID:
@.***>

I encountered the same issue, but I'm not certain about its origin. I was able to resolve it by changing the "is_locked" value from 1 to 0 in the npm database and migration_lock table.
Here are some details:
Display migration lock tables.
MariaDB [npm]> select * from migrations_lock; +-------+-----------+ | index | is_locked | +-------+-----------+ |     1 |         1 | +-------+-----------+ 1 row in set (0.000 sec)
Update value:
update migrations_lock set is_locked= 0;
Result:
MariaDB [npm]> select * from migrations_lock; +-------+-----------+ | index | is_locked | +-------+-----------+ |     1 |         0 | +-------+-----------+ 1 row in set (0.000 sec)
and npm result:
31/12/2023 18:46:43 [12/31/2023] [3:46:43 PM] [Global   ] › ℹ  info      Using MySQL configuration 31/12/2023 18:46:44 [12/31/2023] [3:46:44 PM] [Migrate  ] › ℹ  info      Current database version:<PHONE_NUMBER>5214 31/12/2023 18:46:44 [12/31/2023] [3:46:44 PM] [Setup    ] › ℹ  info      Logrotate Timer initialized 31/12/2023 18:46:44 [12/31/2023] [3:46:44 PM] [Setup    ] › ℹ  info      Logrotate completed.

Thanks @IaZ001 - that worked for me.
In addition for dummies like me who didnt know how to ssh into the docker image and login to maria-db follow below steps

docker exec -it <container_id> /bin/sh
mysql -u root -p
USE npm;


Add a way to use custom syntaxes

The raw function allows to use custom or less known language through the syntaxes which takes a path to a sublime-syntax file. It looks good add a same argument to allows the use of sourcerer with custom syntaxes

Hello! I agree, and am currently working on this.

After using the module, this issue was indeed a non-issue because the syntax is made from a raw element and the lang parameter is just a description of the code label.

This is indeed possible with the current release. I will still be adding native support for this, for convenience and future-proofing.

A temporary working workaround was replacing the last raw call with this code:
  let source_args = (
    lang: source.lang
  )

  if source.has("theme") {
    source_args.insert("theme", source.theme)
  }

  if source.has("syntaxes") {
    source_args.insert("syntaxes", source.syntaxes)
  }

  raw(block: true, ..source_args, unlabelled-source)


Add method to get the leaf certificate from cert chain

The VerifiedCertChain now provides a method leaf() to get the leaf
certificate of the chain. If the certificate chain is composed of only
CA certificates then None will be returned.

Motivation

@nick-mobilecoin started a stack merge that includes this pull request via Graphite.

@nick-mobilecoin merged this pull request with Graphite.


Quinoa dev server forwards to ipv6 loopback address, instead of ipv4

Hello!
I'm trying to embedd a vite vue frontend into my quarkus app. I've followed the steps here: https://quarkiverse.github.io/quarkiverse-docs/quarkus-quinoa/dev/#vite
While runing quarkus dev it starts up without issues. But when attempting to reach localhost:8080, I get this issue where Quinoa attempts to forward requests to the ipv6 loopback address, instead of ipv4:
$ quarkus dev
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< <redacted>:<redacted>>------------------------
[INFO] Building <redacted>1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- quarkus-maven-plugin:2.16.4.Final:dev (default-cli) @ <redacted>---
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:resources @ <redacted>
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Invoking io.quarkus.platform:quarkus-maven-plugin:2.16.4.Final:generate-code @ <redacted>
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile @ <redacted>
[INFO] Nothing to compile - all classes are up to date
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:testResources @ <redacted>
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/imago/Projects/<redacted>/src/test/resources
[INFO] Invoking io.quarkus.platform:quarkus-maven-plugin:2.16.4.Final:generate-code-tests @ <redacted>
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.10.1:testCompile @ <redacted>
[INFO] Nothing to compile - all classes are up to date
Listening for transport dt_socket at address: 5005
2023-03-08 06:52:16,892 INFO  [com.git.eir.mav.plu.fro.lib.NodeInstaller] (build-10) Node v16.17.0 is already installed.
2023-03-08 06:52:18,601 INFO  [io.qua.qui.dep.ForwardedDevProcessor] (build-8) Quinoa package manager live coding is up and running on port: 5173 (in 1575ms)
2023-03-08 06:52:18,604 INFO  [io.qua.qui.dep.ForwardedDevProcessor] (build-13) Quinoa is forwarding unhandled requests to port: 5173
__  ____  __  _____   ___  __ ____  ______
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2023-03-08 06:52:19,128 WARN  [io.qua.config] (Quarkus Main Thread) Unrecognized configuration key "quarkus.quinoa.dev-server.host" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo <- Here I "guessed" how I maybe could target the host
2023-03-08 06:52:19,449 INFO  [io.quarkus] (Quarkus Main Thread) <redacted>1.0.0-SNAPSHOT on JVM (powered by Quarkus 2.16.4.Final) started in 3.298s. Listening on: http://<IP_ADDRESS>:8080
2023-03-08 06:52:19,450 INFO  [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2023-03-08 06:52:19,450 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, quinoa, resteasy-reactive, smallrye-context-propagation, vertx]
2023-03-08 06:52:29,068 ERROR [io.qua.qui.QuinoaDevProxyHandler] (vert.x-eventloop-thread-2) Quinoa failed to forward request, see logs.: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /[0:0:0:0:0:0:0:1]:5173
Caused by: java.net.ConnectException: Connection refused
        at java.base/sun.nio.ch.Net.pollConnect(Native Method)
        at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672)
        at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:946)
        at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337)
        at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:833)

My vue app is reachable on <IP_ADDRESS>:5173
$ curl "http://localhost:5173"
<!DOCTYPE html>

    <meta charset="UTF-8">
    <link rel="icon" href="/favicon.ico">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vite App</title>

</html

But it's not reachable on [::1]:5173
$ curl -6 "http://[::1]:5173"
curl: (7) Failed to connect to ::1 port 5173: Connection refused

So an alternative is to figure out how to make npm host ipv6 servers, but that's somewhat useless as this npm server only will be used for local debugging. I'd prefer if I could make Quinoa target the ipv4 address, or force it to enter "ipv4-mode" somehow. Is this possible?
Current environment is:
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"
...
$ java --version
openjdk 17.0.6 2023-01-17
OpenJDK Runtime Environment Temurin-17.0.6+10 (build 17.0.6+10)
OpenJDK 64-Bit Server VM Temurin-17.0.6+10 (build 17.0.6+10, mixed mode, sharing)
$ quarkus version
2.16.4.Final

Many thanks,
Imago

what is you use this:
  server: {
    port: 5173,
    host: '<IP_ADDRESS>',
    hmr: {
      port: 5173,
      host: '<IP_ADDRESS>',
    }
  }

this is what's used to forward the request, I don't understand why it would target the ipv6:
https://github.com/quarkiverse/quarkus-quinoa/blob/main/runtime/src/main/java/io/quarkiverse/quinoa/QuinoaDevProxyHandler.java#L69
You could try to to debug this line and see why you get a ipv6?

Thanks for quick reply, I did as you asked:

It seems like the request itself is is ipv6. This got me suspicious, so (naturally) I did some curling:
$ curl -s http://localhost:8080
<!DOCTYPE html>

    <meta charset="UTF-8">
    <link rel="icon" href="/favicon.ico">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vite App</title>

It's reachable from within wsl using ipv4, not reachable from inside wsl using ipv6:
$ curl "http://[::1]:8080"
Quinoa failed to forward request, see logs.%

So I think the issue is on my end somehow. Seems like my browsers only can reach WSL ipv6 loopback, not ipv4, and thus quarkus+quinoa interprets the request as an ipv6  one (and attempts to proxy it as such).
I'll keep digging on my end to see why my browsers can't reach WSL ipv4 loopback

what is you use this:
  server: {
    port: 5173,
    host: '<IP_ADDRESS>',
    hmr: {
      port: 5173,
      host: '<IP_ADDRESS>',
    }
  }

Where/how can I configure this? I'm very new to Quarkus and modern Java

what is you use this:
  server: {
    port: 5173,
    host: '<IP_ADDRESS>',
    hmr: {
      port: 5173,
      host: '<IP_ADDRESS>',
    }
  }

Where/how can I configure this? I'm very new to Quarkus and modern Java

This is in the vite config

@baalimago I am using WSL and it works fine I can hit the IP of Vite from my Windows host running my Quinoa Vite app.
I haven't seen any issues?

@baalimago any update on this issue?

Closing, feel free to re-open.

This is now fixed


chore(release): v0.9.5 🎉

:robot: I have created a release *beep* *boop*
0.9.5 (2022-11-25)
Bug Fixes

update: provide a deserialized cached output to the update toValue function for user (3fe2522)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/ehmpathy/with-simple-caching/releases/tag/v0.9.5 :sunflower:


Wave effect in Emerald Coast

I don't know how doable this is, but it's a really cool effect that added a lot to the atmosphere in the original game.
https://youtu.be/DjUgfunJu84?t=268
The lighting on the water changes to simulate a wave. Shame it got cut like everything else in SADX, really.
I hope something can be done to recreate or at least simulate it in some way.

While not strictly lighting related, it would probably be easier to implement in a shader than in the fixed function pipeline.
The Dreamcast clearly switches to a higher poly count mesh during the effect (or dynamically subdivides), so that would need to be re-implemented. That of course means understanding the entity's existing code in SADX, which ought to be "fun".

Since the wave effect is going to be implemented in the DC mod soon and no lighting tweaks seem necessary, I think this can be closed now.


mongoose model templates

overview
Similarly and adherent to what was done in #21, add model choices for mongoose
tasks

[x] add model choice
[x] add model choice dependencies
[x] update model template
[x] test that it works

I've somewhat started accounting for this in #25 but will pull up short on the full implementation to post the lions share of it against this PR.

Looks good. :shipit:


gateware.applets.analyzer: return packet timestamp in microseconds

When trying to run the luna backend in ViewSB, I get this error:
$ ./viewsb.sh luna --speed full qt
WARNING:root:SoC framework components could not be imported; some functionality will be unavailable.
WARNING:root:No module named 'lambdasoc'
WARNING:root:SoC framework components could not be imported; some functionality will be unavailable.
WARNING:root:No module named 'lambdasoc'
WARNING:root:SoC framework components could not be imported; some functionality will be unavailable.
WARNING:root:No module named 'lambdasoc'
Warning: Wire top.usb.USBControlEndpoint.setup_decoder.data_handler.position_in_packet_TRELLIS_FF_Q_3_DI_LUT4_B_1_Z_TRELLIS_FF_CE_Q has an unprocessed 'init' attribute.
Warning: Wire top.$flatten\usb.\USBControlEndpoint.\setup_decoder.\data_handler.$signal$51 has an unprocessed 'init' attribute.
Warning: Wire top.$flatten\usb.\USBControlEndpoint.\setup_decoder.\data_handler.$signal$52 has an unprocessed 'init' attribute.
Warning: Wire top.$flatten\usb.\USBControlEndpoint.\setup_decoder.\data_handler.$signal$55 has an unprocessed 'init' attribute.
Warning: Wire top.$flatten\usb.\USBControlEndpoint.\setup_decoder.\data_handler.$signal$56 has an unprocessed 'init' attribute.
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/mike/projects/viewsb/viewsb/commands/viewsb.py", line 206, in <module>
    main()
  File "/home/mike/projects/viewsb/viewsb/commands/viewsb.py", line 201, in main
    analyzer.run()
  File "/home/mike/projects/viewsb/viewsb/analyzer.py", line 209, in run
    self.run_analysis_iteration()
  File "/home/mike/projects/viewsb/viewsb/analyzer.py", line 178, in run_analysis_iteration
    self.process_analysis_queue()
  File "/home/mike/projects/viewsb/viewsb/analyzer.py", line 124, in process_analysis_queue
    handled = decoder.handle_packet(packet)
  File "/home/mike/projects/viewsb/viewsb/decoder.py", line 83, in handle_packet
    self.consume_packet(packet)
  File "/home/mike/projects/viewsb/viewsb/decoders/grouping.py", line 456, in consume_packet
    if self.packet_starts_new_transfer(packet) or self.packet_seems_discontinuous(packet):
  File "/home/mike/projects/viewsb/viewsb/decoders/grouping.py", line 442, in packet_seems_discontinuous
    if packet.endpoint_number != 0 and (packet.timestamp - last_packet.timestamp) > 10e3:
TypeError: '>' not supported between instances of 'datetime.timedelta' and 'float'

I think the packet timestamp is supposed to be in microseconds, so this change returns that instead of a datetime object.

(This is pending relevant discussion in https://github.com/usb-tools/ViewSB/pull/70).

I think this can be closed now that https://github.com/usb-tools/ViewSB/pull/78 got merged.


Proc that receives any argument type

Is it possible to create a Proc, that receives any type of argument?
Something like this:

proc = ->(arg : EverySingleType) {
  puts "arg is: #{arg}"
}

def num
  yield 25
end

def string
  yield "hello"
end

num &proc # This should be okay
string &proc # This should be okay too

Am I missing something?

No, that's currently a limitation of the language.
Closing as a duplicate of #2733.


1:2.3.4 version dcgm_prometheus.py  error AttributeError: 'DcgmPrometheus' object has no attribute 'm_publishFieldIds'

we follow doc here
https://docs.nvidia.com/datacenter/dcgm/latest/dcgm-user-guide/integrating-with-dcgm.html#starting-prometheus-client
and looks like the new version of datacenter-gpu-manager has issue for this script:

python3 dcgm_prometheus.py -e
Traceback (most recent call last):
File "dcgm_prometheus.py", line 264, in
main()
File "dcgm_prometheus.py", line 257, in main
prometheus_obj.LogBasicInformation()
File "dcgm_prometheus.py", line 142, in LogBasicInformation
for fieldId in self.m_publishFieldIds:
AttributeError: 'DcgmPrometheus' object has no attribute 'm_publishFieldIds'

already install datacenter-gpu-manager
Version table:
1:2.3.4 600

not able to find any information when google this... this version just updated Feb 2022 and guess no one use this feature to monitor...

@graywen24,
Unfortunately, the dcgm_prometheus.py is not actively supported and is rather an example. We have the dcgm-exporter project that is meant to provide Prometheus metrics and is actively supported.

@graywen24,
Unfortunately, the dcgm_prometheus.py is not actively supported and is rather an example. We have the dcgm-exporter project that is meant to provide Prometheus metrics and is actively supported.

thanks.. but we dont use k8s cluster and only run offline training on single GPU node... if install dcgm-exporter will be a very heavy process for the node. While node-exporter cant not have gpu monitoring metric..

@graywen24,
dcgm-exporter may work outside of the k8s environment, and in general, that's just a small binary written in Go. If the DCGM is installed on the machine, you do not need to use the dcgm-exporter docker image (just the dcgm-exporter binary) because the libdcgm.so that will be already on the machine.


Unit tests

[x] Run tests on every PR
[x] Connection tests
[x] Workflow tests
[x] Creation tests

A comment about the Dockerfile: I see that the image as of now is 5.2Gb. Can we try some of the following?

Reduce the number of RUN actions: each one triggers a new layer in the image, that occupies space. We could try to squeeze stuff, like

RUN conda upgrade -c conda-forge nodejs && \
    python3 -m pip install --upgrade pip && \
    python3 -m pip install -r requirements.txt && \
    jlpm && jlpm run build && \
    python3 -m pip install . && \
    jupyter server extension enable --py reana_jupyterlab && \

You can also not be this extreme, but maybe having 2, max 3 RUN steps would be optimal.
2. Can we try to clean stuff after conda did its thing? Most of the times there are a lot of unused files left to occupy space. So one or more of these steps, to check if the image builds correctly:
- conda clean --all -y
- jlpm cache clean
- rm -rf /root/.cache/pip /root/.cache/yarn /root/.npm

This is an hardcore step, but we could also try
rm -rf /opt/conda/pkgs/*

See this

Hello @rubenperezm,
I'm making a picky comment, seen that we are in the stage of looking into the details - otherwise the PR looks very nice and the pytests work pretty much very well.
Could you please implement a coverage within the package and the tests, please ? Also, adding the badge into the readme  will be an asset, as you are covering 93% (see below) of the functionalities of the package - what is f***ing good, as many packages cover very little or none of their functionalities:
$ pytest reana_jupyterlab/tests/ --color=yes --verbose --cov=reana_jupyterlab
================================================================================================================== test session starts ==================================================================================================================
platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /root/miniconda3/envs/dev_rea/bin/python
cachedir: .pytest_cache
rootdir: /root/software/reana-jupyterlab-extension
configfile: pyproject.toml
plugins: anyio-4.2.0, cov-5.0.0, mock-3.14.0, asyncio-0.23.8
asyncio: mode=Mode.STRICT
collected 17 items

reana_jupyterlab/tests/test_connection.py::test_get_env_vars[/reana_jupyterlab/env] PASSED                                                                                [  5%]
reana_jupyterlab/tests/test_connection.py::test_post_env_vars_success[/reana_jupyterlab/env] PASSED                                                                                [ 11%]
reana_jupyterlab/tests/test_connection.py::test_post_env_vars_failure[/reana_jupyterlab/env] PASSED                                                                                [ 17%]
reana_jupyterlab/tests/test_workflows.py::test_get_workflows[/reana_jupyterlab/workflows] PASSED                                                                                [ 23%]
reana_jupyterlab/tests/test_workflows.py::test_get_workflow[/reana_jupyterlab/workflows] PASSED                                                                                [ 29%]
reana_jupyterlab/tests/test_workflows.py::test_get_workflow_logs[/reana_jupyterlab/workflows/mock_wf_id_1/logs] PASSED                                                                                [ 35%]
reana_jupyterlab/tests/test_workflows.py::test_get_workspace[/reana_jupyterlab/workflows/mock_wf_id_1/workspace] PASSED                                                                                [ 41%]
reana_jupyterlab/tests/test_workflows.py::test_get_specification[/reana_jupyterlab/workflows/mock_wf_id_1/specification] PASSED                                                                                [ 47%]
reana_jupyterlab/tests/test_workflows.py::test_download_files[/reana_jupyterlab/workflows/mock_wf_id_1/workspace/file1] PASSED                                                                                [ 52%]
reana_jupyterlab/tests/test_workflows.py::test_post_validate_success[/reana_jupyterlab/validate] PASSED                                                                                [ 58%]
reana_jupyterlab/tests/test_workflows.py::test_post_validate_error[/reana_jupyterlab/validate] PASSED                                                                                [ 64%]
reana_jupyterlab/tests/test_workflows.py::test_post_validate_invalid_path[/reana_jupyterlab/validate] PASSED                                                                                [ 70%]
reana_jupyterlab/tests/test_workflows.py::test_post_validate_not_yaml_file[/reana_jupyterlab/validate] PASSED                                                                                [ 76%]
reana_jupyterlab/tests/test_workflows.py::test_post_create_success[/reana_jupyterlab/run] PASSED                                                                                [ 82%]
reana_jupyterlab/tests/test_workflows.py::test_post_create_error[/reana_jupyterlab/run] PASSED                                                                                [ 88%]
reana_jupyterlab/tests/test_workflows.py::test_post_create_invalid_path[/reana_jupyterlab/run] PASSED                                                                                [ 94%]
reana_jupyterlab/tests/test_workflows.py::test_post_create_invalid_name[/reana_jupyterlab/run] PASSED                                                                                [100%]

=================================================================================================================== warnings summary ====================================================================================================================
../../miniconda3/envs/dev_rea/lib/python3.11/site-packages/jupyter_client/connect.py:27
  /root/miniconda3/envs/dev_rea/lib/python3.11/site-packages/jupyter_client/connect.py:27: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
  given by the platformdirs library.  To remove this warning and
  see the appropriate new directories, set the environment variable
  `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
  The use of platformdirs will be the default in `jupyter_core` v6
    from jupyter_core.paths import jupyter_data_dir

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform linux, python 3.11.9-final-0 -----------
Name                                         Stmts   Miss  Cover
----------------------------------------------------------------
reana_jupyterlab/__init__.py                     8      5    38%
reana_jupyterlab/_version.py                     1      0   100%
reana_jupyterlab/const.py                        3      0   100%
reana_jupyterlab/handlers/__init__.py            1      0   100%
reana_jupyterlab/handlers/connection.py         28      3    89%
reana_jupyterlab/handlers/files.py              17     13    24%
reana_jupyterlab/handlers/handlers.py           11      0   100%
reana_jupyterlab/handlers/workflows.py         148     11    93%
reana_jupyterlab/server.py                       1      0   100%
reana_jupyterlab/tests/mocks/connection.py       2      0   100%
reana_jupyterlab/tests/mocks/workflows.py       15      0   100%
reana_jupyterlab/tests/test_connection.py       41      0   100%
reana_jupyterlab/tests/test_workflows.py       183      0   100%
----------------------------------------------------------------
TOTAL                                          459     32    93%

============================================================================================================= 17 passed, 1 warning in 1.33s =============================================================================================================

Just 1 comment on the requirements file

An alternative for the optional packages is using this. If you decide to go this way, you would need to add an specific section in the pyproject.toml file as well as within the README.md, so that developers or anybody testing the extension could understand how to do so.

A comment about the Dockerfile: I see that the image as of now is 5.2Gb. Can we try some of the following?

Reduce the number of RUN actions: each one triggers a new layer in the image, that occupies space. We could try to squeeze stuff, like

RUN conda upgrade -c conda-forge nodejs && \
    python3 -m pip install --upgrade pip && \
    python3 -m pip install -r requirements.txt && \
    jlpm && jlpm run build && \
    python3 -m pip install . && \
    jupyter server extension enable --py reana_jupyterlab && \

You can also not be this extreme, but maybe having 2, max 3 RUN steps would be optimal. 2. Can we try to clean stuff after conda and jlpm did their thing? Most of the times there are a lot of unused files left to occupy space. So implement one or more of these steps, and then check if the image builds correctly:
- conda clean --all -y
- jlpm cache clean
- rm -rf /root/.cache/pip /root/.cache/yarn /root/.npm

This is an hardcore step, but we could also try
rm -rf /opt/conda/pkgs/*

See this.

Running everything above reduces the image size to 5GB

Could you please implement a coverage within the package and the tests, please ? Also, adding the badge into the readme will be an asset, as you are covering 93% (see below) of the functionalities of the package - what is f***ing good, as many packages cover very little or none of their functionalities. (To add the % of coverage within the badge, you would need to somehow fetch the cov returned from the CI )

Sure. Do you want the badge like in reana-client?

Also, adding the badge into the readme will be an asset, as you are covering 93% (see below) of the functionalities of the package - what is f***ing good, as many packages cover very little or none of their functionalities.

Disclaimer: We are covering 93% of the jupyter server extension, but we do not have any tests for the frontend part. Therefore, the badge will take the total coverage (<40%). https://app.codecov.io/gh/vre-hub/reana-jupyterlab-extension/tree/dev

Nice job Ruben !
Last comment, could you please remove the on.pull_request.branches.main on https://github.com/vre-hub/reana-jupyterlab-extension/blob/main/.github/workflows/docker-publish.yml#L8 ?
We should build the image every time there's a push or a new PR, but not with every change of a PR :)
Thanks

Nice job Ruben ! Last comment, could you please remove the on.pull_request.branches.main on https://github.com/vre-hub/reana-jupyterlab-extension/blob/main/.github/workflows/docker-publish.yml#L8 ?
We should build the image every time there's a push or a new PR, but not with every change of a PR :)
Thanks

Changed in ecebbeae57c9dc5e2c9b2f0e7d400442945a2859.


Could you make PascalABC.NET to follow system's scaling setting?

Currently, it doesn't work out of the box: https://github.com/pascalabcnet/pascalabcnetide/issues/272 https://github.com/pascalabcnet/pascalabcnetide/issues/273
I wonder if you could hack the PascalABC.NET so it would follow the system's scaling setting. What you did currently is already incredible and I used to think it's impossible, too.

At the moment I'm about to rewrite the project entirely.
I don't know whether I'll fix the issue. I might be able to scale icons and text according to the system scale like 125%, but now I won't do that.
After release of version 8, in which the project will be fully rewritten, you can remind me to fix the issue.


bug: set_focus() doesn't work properly on linux

it appears to be working fine now. I must have messed up when testing this the last time.


Bug - Sending emails from server sometimes fails

Description
Emails from the server sometimes fail to go through. This blocks password reset. It seems to happen inconsistently. We'd like to understand why this happens. At the very least, if the email fails to send it should retry.
Steps to Reproduce
Steps to reproduce the behavior. Example:

Go to 'Forgot Password' from Login screen.
Type your email and click 'Send Password Link'.
Error fails to send (maybe, its inconsistent)

Additional Context
The exception found in the logs:
Stacktrace:
#91 Swift_TransportException in /var/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:269
#90 Swift_Transport_StreamBuffer:establishSocketConnection in /var/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:58
#89 Swift_Transport_StreamBuffer:initialize in /var/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:143
#88 Swift_Transport_AbstractSmtpTransport:start in /var/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php:65
#87 Swift_Mailer:send in /var/www/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php:483
#86 Illuminate\Mail\Mailer:sendSwiftMessage in /var/www/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php:259
#85 Illuminate\Mail\Mailer:send in /var/www/vendor/laravel/framework/src/Illuminate/Notifications/Channels/MailChannel.php:65
#84 Illuminate\Notifications\Channels\MailChannel:send in /var/www/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php:144
#83 Illuminate\Notifications\NotificationSender:sendToNotifiable in /var/www/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php:103
#82 Illuminate\Notifications\NotificationSender:Illuminate\Notifications\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Support/Traits/Localizable.php:19
#81 Illuminate\Notifications\NotificationSender:withLocale in /var/www/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php:105
#80 Illuminate\Notifications\NotificationSender:sendNow in /var/www/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php:77
#79 Illuminate\Notifications\NotificationSender:send in /var/www/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php:39
#78 Illuminate\Notifications\ChannelManager:send in /var/www/vendor/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php:18
#77 App\Models\User:notify in /var/www/app/Models/User.php:145
#76 App\Models\User:sendPasswordResetNotification in /var/www/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php:70
#75 Illuminate\Auth\Passwords\PasswordBroker:sendResetLink in /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php:34
#74 App\Http\Controllers\Auth\ForgotPasswordController:sendResetLinkEmail in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54
#73 call_user_func_array in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54
#72 Illuminate\Routing\Controller:callAction in /var/www/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45
#71 Illuminate\Routing\ControllerDispatcher:dispatch in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Route.php:219
#70 Illuminate\Routing\Route:runController in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Route.php:176
#69 Illuminate\Routing\Route:run in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php:682
#68 Illuminate\Routing\Router:Illuminate\Routing\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
#67 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/app/Http/Middleware/RedirectIfAuthenticated.php:31
#66 App\Http\Middleware\RedirectIfAuthenticated:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#65 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#64 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/mcamara/laravel-localization/src/Mcamara/LaravelLocalization/Middleware/LaravelLocalizationViewPath.php:33
#63 Mcamara\LaravelLocalization\Middleware\LaravelLocalizationViewPath:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#62 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#61 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/mcamara/laravel-localization/src/Mcamara/LaravelLocalization/Middleware/LaravelLocalizationRedirectFilter.php:45
#60 Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRedirectFilter:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#59 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#58 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/mcamara/laravel-localization/src/Mcamara/LaravelLocalization/Middleware/LocaleSessionRedirect.php:33
#57 Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#56 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#55 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/app/Http/Middleware/DateLocale.php:21
#54 App\Http\Middleware\DateLocale:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#53 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#52 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/app/Http/Middleware/InitializeUser.php:60
#51 App\Http\Middleware\InitializeUser:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#50 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#49 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41
#48 Illuminate\Routing\Middleware\SubstituteBindings:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#47 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#46 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:75
#45 Illuminate\Foundation\Http\Middleware\VerifyCsrfToken:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#44 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#43 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49
#42 Illuminate\View\Middleware\ShareErrorsFromSession:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#41 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#40 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:63
#39 Illuminate\Session\Middleware\StartSession:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#38 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#37 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37
#36 Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#35 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#34 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:66
#33 Illuminate\Cookie\Middleware\EncryptCookies:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#32 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#31 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104
#30 Illuminate\Pipeline\Pipeline:then in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php:684
#29 Illuminate\Routing\Router:runRouteWithinStack in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php:659
#28 Illuminate\Routing\Router:runRoute in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php:625
#27 Illuminate\Routing\Router:dispatchToRoute in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php:614
#26 Illuminate\Routing\Router:dispatch in /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176
#25 Illuminate\Foundation\Http\Kernel:Illuminate\Foundation\Http\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
#24 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php:65
#23 Barryvdh\Debugbar\Middleware\InjectDebugbar:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#22 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#21 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/app/Http/Middleware/FullFrameGuard.php:17
#20 App\Http\Middleware\FullFrameGuard:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#19 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#18 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/fideloper/proxy/src/TrustProxies.php:57
#17 Fideloper\Proxy\TrustProxies:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#16 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#15 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:31
#14 Illuminate\Foundation\Http\Middleware\TransformsRequest:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#13 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#12 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:31
#11 Illuminate\Foundation\Http\Middleware\TransformsRequest:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#10 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#9 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27
#8 Illuminate\Foundation\Http\Middleware\ValidatePostSize:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#7 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#6 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62
#5 Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode:handle in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
#4 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#3 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104
#2 Illuminate\Pipeline\Pipeline:then in /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151
#1 Illuminate\Foundation\Http\Kernel:sendRequestThroughRouter in /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116
#0 Illuminate\Foundation\Http\Kernel:handle in /var/www/public/index.php:55```

Resolved by #1020.


Add support for JMX application monitoring

commit a18f156ced80834178f25aae30bb0437ef3f0f87 - Updated manifest.in

commit 74e354d70e0877c81abf08ed84028fc8071157ce

The current fix assists in monitoring java application. Will open a separate issue for other types of application monitoring.


Feature/add reference support

support references to a definitions section in order to handle multiple used structures

Codecov Report

Merging #23 into master will decrease coverage by 1.88%.
The diff coverage is 86.95%.

@@            Coverage Diff             @@
##           master      #23      +/-   ##
==========================================
- Coverage   91.11%   89.23%   -1.89%
==========================================
  Files           1        1
  Lines          45       65      +20
  Branches        2        1       -1
==========================================
+ Hits           41       58      +17
- Misses          4        7       +3

Impacted Files
Coverage Δ

...org/zalando/spark/jsonschema/SchemaConverter.scala
89.23% <86.95%> (-1.89%)
:arrow_down:

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 5307a6c...6608a99. Read the comment docs.

👍

:+1:


Much better wav2vec2 performance  after using the new version of fairseq?

Hi, Thanks for the great open-source toolkit!
I noticed you updated the installation note and asked to install a new version of fairseq due to some known bugs for wav2vec2 inference and ASR decoding.
About a month ago, I tried evaluated wav2vec2 with the older version of your repo and the stable version of fairseq, and I got similar results to the results you reported.
However, After using the new version of fairseq, and re-evaluate wav2vec2 on some downstream tasks, I find it can achieve 77.31 on SID task (lr=1e-1) and 6.81 on SD task  (lr=1e-2), which is much better than the reported results (45.62 on SID and 7.48 on SD).
It seems very surprising to me, and I'm wondering if you have the results after using the new version of fairseq? Are we supposed to get a better performance?
BTW, can you please provide a reference of the "known bugs for wav2vec2 inference and ASR decoding" in the stable version 0.10.2 of fairseq?
Many thanks~

Hi,
Thanks you for the interest!
May I ask which commit you are currently using in this repo?
We had a major update to let the downstream training weighted-sum on all the hidden states by default 6 days before in this commit: https://github.com/s3prl/s3prl/commit/39b408730bb6b39b6d10d963b3eba2b82582e735
Since we found that especially for wav2vec2, the different layers have huge performance differences on different tasks, and it will be more fair the use weighted-sum to represent the best a pretrained model can get. So what you got is very likely the weighted-sum results, and the numbers are also closed to what we got here. (We have also updated the paper to use weighted-sum and the Arxiv version will be available a few days later.)
The fairseq bugs we consider in this repo are fixed by these two commits: fix asr decoding and fix conv padding.
The first fix is required for the CTC decoder to function normally, while the second fix is pretty much a correctness issue.
Hope these information help!
Sincerely,
Leo

Thank you for the response, It's really helpful!
Yes, I am currently using the commit after the weighted-sum update. It is good to know the reason for the performance improvement and the huge performance differences among different hidden states.
Looking forward to your updated superb paper!

Hi Leo,
Thanks again for the response above, and I can successfully get similar results on almost all the downstream tasks as reported in your paper.
However, I am wondering if you are also using the weighted-sum hidden states when you report the results on QBE tasks?
When I try to experiment with the Hubert-base model, I got the score 0.0579 with the weighted-sum representation and 0.0695 with the last layer's representation, while the reported score is 0.0736.
When I try to experiment with the Hubert-large model, I got the score 0.0176 with the weighted-sum representation and 0.0339 with the last layer's representation, while the reported score is 0.0353.
Since the results I got are not exactly the same as your reported results, I am wondering if you can offer any insights?
Thanks a lot!

Hi Sanyuan-Chen,
Since QbE actually does not involve downstream model training, so you results is very likely the average of all layers, since our initial values of those weights are uniformly distributed. In the paper, we run DTW for all the hidden states one-by-one. Since DTW is less computationally expensive than downstream model training so layer exploration is feasible. To do this, instead of using the default -s hidden_states, you can use -s hidden_state_0, -s hidden_state_1 until -s hidden_state_12 for HuBERT base. You can also automate this pipeline with a shell script. Hence, our newly reported results should be always better than the last layer representation.
I should also update the downstream README to clarify this part for QbE.
Many thanks for letting me know!

Hi @Sanyuan-Chen,
Glad to know it is reproducible at your side!


Add AMD/RequireJS and CommonJS

This PR add support for AMD/RequireJS and CommonJS.
Now we can use this script with npm, webpack,... :
var slidebars = require('slidebars');
var controller = new slidebars();

Fix the issue #256 and partially the #122 without break the actual code

We need this one for sure!

agreed!

please merge this pull request!

If you're still waiting for this merge and using Webpack 2 you can user exports-loader
I've included slidebars using exports-loader and the webpack provide plugin:
...
 new Webpack.ProvidePlugin({
  slidebars: 'exports-loader?slidebars!slidebars/dist/slidebars',
}),
...

@Nubuck : Thanks, it's works well !

Any plan of merging this? Seems like a much needed feature!

If you don't want to use the plugin @Nubuck  mentions above, you can depend on my fork which includes CommonJS/AMD support and plays nice with webpack out of the box.  Just change your package.json to depend on:
"slidebars"<EMAIL_ADDRESS>
And then yarn or npm install.

I have sent an email to Adam (owner / creator) to ask if he can merge this request! 🤞

Another way to import slidebars instead of using the provide plugin to make it globally available (which I find a bit too magical), you can use:

Install exports-loader plugin:npm install exports-loader --save-dev

In your js file, compiled by webpack:window.slidebars = require('exports-loader?slidebars!slidebars/dist/slidebars');

Note sure if it's best practice or not though.


mutate is not rerendering

Bug report
Description / Observed Behavior
I'm using mutate() to update data. Here is a little snip of what I want to do:
export const updateList = async (body, mutate) => {
  const res = await mutate(sendPutRequest(body), false);
  return res;
};

I think mutate is working and data is properly updated, because if the UI is updated for another reason (for example a scroll event) the fresh data appears. But for some reason the UI is not updated, right after executing mutate()
Expected Behavior
I would expect that as soon as mutate is, done all UI, that refers to the updated data, is refreshed.
Repro Steps / Code Example
Here is a CodeSandbox
Additional Context
usually swr acts expected. The issue appears only if I try to refer a value out of an array. So if the response is:
{
   _id: 123,
   active: true
}

and I'm trying to update some UI elements in terms of active, it will work.
But if the response is:
[{
   _id: 123,
   active: true
},
{
   _id: 456,
   active: false
}]

and I'm trying to update some UI elements in terms of active, it won't work.
also there is another ticket #662 wich is very similar to this and where i postet the CodeSandbox, but it was closed at that time allready and I'm not sure if someone will have a look on it anymore. Sorry for the duplication and if there would be a better flow than creating a new ticket to get attention on a closed topic, please let me know.
SWR version: 0.3.11

In codesanbox, i think the problem is
const fakePutRequest = (body) => {
  setTimeout(() => {
    return body;
  }, 300);
};

fakePutRequest will return undefined
mutate(undefined, false) will not make component rerender.

In codesanbox, i think the problem is
const fakePutRequest = (body) => {
  setTimeout(() => {
    return body;
  }, 300);
};

fakePutRequest will return undefined
mutate(undefined, false) will not make component rerender.

Hi @promer94,
thanks for your response. I don't think that's the problem, because if you take a look at the console tab while clicking the star button, you'll see that the array "exerciseIds" is set and also changes its value.

Hi @promer94,
thanks for your response. I don't think that's the problem, because if you take a look at the console tab while clicking the star button, you'll see that the array "exerciseIds" is set and also changes its value.

Hey, I just saw that the console log for some reason is not visible from other accounts. Here is a picuture of mine:

the same value that is logged will be returned from fakePutRequest.

Hey, I just saw that the console log for some reason is not visible from other accounts. Here is a picuture of mine:

the same value that is logged will be returned from fakePutRequest.

https://codesandbox.io/s/fancy-smoke-k1016?file=/pages/index.js

https://codesandbox.io/s/fancy-smoke-k1016?file=/pages/index.js

Hi @promer94 ,
sorry for the stupid mistake. I updated my original CodeSandbox, but the issue remains. Hopefully you can help me and thanks for your efforts so far.

 I updated my original CodeSandbox, but the issue remains. Hopefully you can help me and thanks for your efforts so far.

Hi together,
I ran into pretty the same issue.
In my case i call mutate([newData], false), with [newData] coming as response from my backend and my UI does not refresh.
Also when I deepclone the returned newData before I call mutate([...newData], false), it does not refresh.
When I deepclone an {...object} with spread syntax before it is sent to the backend, then replace the object in [...data] with the response (updated Object) resulting in [newData] and afterwards calling mutate([newData], false) the refresh works fine. But without the spread syntax before the update request it does not work.
But when I deepclone the returned newData before I call mutate([...newData], false), it does not refresh.
With mutate(newData,true) it always refreshes, but I don't want so send an additional request because the newData is already there.
This behavior is a mystery for me, since objects coming from a server are as far as I know always a new reference.
Does anyone have an idea what causes this behavior and how to fix it ?
Im sorry but i could not reproduce this issue in sandbox.
My Database is running on Mongo.

Hi together,
I ran into pretty the same issue.
In my case i call mutate([newData], false), with [newData] coming as response from my backend and my UI does not refresh.
Also when I deepclone the returned newData before I call mutate([...newData], false), it does not refresh.
When I deepclone an {...object} with spread syntax before it is sent to the backend, then replace the object in [...data] with the response (updated Object) resulting in [newData] and afterwards calling mutate([newData], false) the refresh works fine. But without the spread syntax before the update request it does not work.
But when I deepclone the returned newData before I call mutate([...newData], false), it does not refresh.
With mutate(newData,true) it always refreshes, but I don't want so send an additional request because the newData is already there.
This behavior is a mystery for me, since objects coming from a server are as far as I know always a new reference.
Does anyone have an idea what causes this behavior and how to fix it ?
Im sorry but i could not reproduce this issue in sandbox.
My Database is running on Mongo.

First of all, thanks for opening this issue! But please simplify your reproduction to keep it minimal. There're a lot of unrelated stuff such as isNoted, and that will not help the maintainers understanding the problem you're having.
@Munnopsis can you try to reproduce it by adding some mock up to this CodeSandbox template: https://codesandbox.io/s/swr-basic-wnqi2?

First of all, thanks for opening this issue! But please simplify your reproduction to keep it minimal. There're a lot of unrelated stuff such as isNoted, and that will not help the maintainers understanding the problem you're having.
@Munnopsis can you try to reproduce it by adding some mock up to this CodeSandbox template: https://codesandbox.io/s/swr-basic-wnqi2? It has nothing to do with your database, you can use a fake fetcher.

@shuding @promer94 hey guys, I updated the CodeSandbox.

You should not mutate the original data from SWR.
 let newList = [...list.data];
 // doing this will affect the original list.data which is stored in cache
 newList[buttonIndex].active = !newList[buttonIndex].active;

Instead, you should use immer to make safe mutations
 let newList = produce(list.data, (data) => {
      data[buttonIndex].active = !data[buttonIndex].active;
});

FYI
https://codesandbox.io/s/focused-allen-msrz6?file=/pages/index.js:1086-1199


cmd/go: still need to set GOROOT with go1.9beta2

I had hoped that now that issue #18678 is resolved I never have to think about GOROOT again. That does not seem the case, though.
What version of Go are you using (go version)?
go1.9beta2.linux-amd64 running on Fedora 26
What operating system and processor architecture are you using (go env)?
$ unset GOROOT
$ /opt/cc-i386-linux/go/golang/go1.9beta2.linux-amd64/bin/go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mfx/go"
GORACE=""
GOROOT="/opt/cc-i386-linux/go/golang/go1.9beta2.linux-amd64"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="/usr/bin/gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build312405700=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?
$ cat hello.go
package main

import "fmt"

func main() {
        fmt.Println("Hello go")
}

$ unset GOROOT
$ /opt/cc-i386-linux/go/golang/go1.9beta2.linux-amd64/bin/go env | grep GOROOT
GOROOT="/opt/cc-i386-linux/go/golang/go1.9beta2.linux-amd64"

As you can see GOROOT is set correctly by go env.
$ unset GOROOT
$ /opt/cc-i386-linux/go/golang/go1.9beta2.linux-amd64/bin/go build hello.go
hello.go:3:8: cannot find package "fmt" in any of:
        /usr/local/go/src/fmt (from $GOROOT)
        /home/mfx/go/src/fmt (from $GOPATH)
package main
        imports runtime: cannot find package "runtime" in any of:
        /usr/local/go/src/runtime (from $GOROOT)
        /home/mfx/go/src/runtime (from $GOPATH)

But it seems go build has a different GOROOT /usr/local/go.

Somewhat related, it seems that GOTOOLDIR is not automatically set.
$ unset GOROOT GOTOOLDIR
$ /opt/cc-i386-linux/go/golang/go1.9beta2.linux-amd64/bin/go env | egrep 'GOROOT|GOTOOLDIR'
GOROOT="/opt/cc-i386-linux/go/golang/go1.9beta2.linux-amd64"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"

Should I file a new issue for GOTOOLDIR ?

Please show us the output of go build -x.

The GOTOOLDIR problem is interesting, and may be related.  GOTOOLDIR is computed based on the value returned by runtime.GOROOT(), which is not the same as the GOROOT value that the go tool computes after it starts up.

There's not much extra info that go build -x does provide. And as I'm just using the public version from https://storage.googleapis.com/golang/go1.9beta2.linux-amd64.tar.gz you should be able to reproduce this issue.
$ env -i /opt/cc-i386-linux/go/golang/go1.9beta2.linux-amd64/bin/go env | egrep 'GOROOT|GOTOOLDIR'
GOROOT="/opt/cc-i386-linux/go/golang/go1.9beta2.linux-amd64"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"

$ env -i /opt/cc-i386-linux/go/golang/go1.9beta2.linux-amd64/bin/go build -x hello.go
WORK=/tmp/go-build254896712
hello.go:3:8: cannot find package "fmt" in any of:
        /usr/local/go/src/fmt (from $GOROOT)
        ($GOPATH not set. For more details see: 'go help gopath')
package main
        imports runtime: cannot find package "runtime" in any of:
        /usr/local/go/src/runtime (from $GOROOT)
        ($GOPATH not set. For more details see: 'go help gopath')

You're right, I can recreate the problem.  It's easy to recreate by building Go, and then moving the entire GOROOT directory elsewhere.  Our tests don't work because we don't move the GOROOT directory--we don't want to do that, because it would break any other tests running at the same time.
@bradfitz Any suggestions for how to test this?  The best I can think of is to copy GOROOT, remove GOROOT/pkg, run make.bash, move the copied GOROOT elsewhere, and check that it works.  But that will be very slow and I'm not even sure where to put such a test.

Our tests don't work because we don't move the GOROOT directory--we don't want to do that, because it would break any other tests running at the same time.

Only one cmd/dist/test test runs at a time per builder machines. (A single build might have it tests sharded out over 6-8 machines)
And if one fails, that buildlet ("machine") is never reused. So the test can clean up after itself (rename the goroot back to its original name) and any future tests would still work.
So the src/cmd/dist/test.go test would do something like:

rename $GOROOT to $GOROOT+"-moved"
run the test that the go tool works
rename $GOROOT+"-moved" back to the original $GOROOT

... and if you want to not mess with user machines, you can do it only if testenv.Builder() != ""

Oh, in dist we can't depend on testenv, but looks like it already uses os.Getenv("GO_BUILDER_NAME") in a few places.

Thanks.  Added a test to the CL.

Thanks!


Compute api version update

Some tests are still failing.
@yugangw-msft  please can you look further?

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

[ ] I adhere to the Command Guidelines.

@troydai Another situation where the CI is failing because "privates" is not compatible with the dependency check.
@adewaleo the last we discussed with Troy about this, "dependency check" was not ok with "privates", and if you want further CI you need to disable it temporarily (edit the travis.yaml, but put it "allowed failure").

@lmazuel, let me ensure tests are fine with the private version, in the meanwhile we can ignore the dependency check error.  I will let you know when you can publish the sdk, then I will remove the privates from this pr.

Close for #7461 which should cover this.


#1511 Incomplete SBOM generated from Docker image

#1511 Stopped enabling strict mode with node-tar  so warnings do not prematurely end expansion.
Dump stack traces from failed TAR extraction if DEBUG_MODE is enabled.

Thank you so much. Do you have any ideas for adding any new test cases or this is good to go?

Let me do some more manual tests as well. Meanwhile, can you make strict: false in the other places as well as shown in my PR? Also run pnpm run lint.

I also have another question. Other than the image you shared, are there any other images that are not working without strict: false. If the sample size happens to be just one or a small value, perhaps we make it an optional flag instead?
I am unsure of the security and performance implications of this change.

@robross0606 Can you test the new PR https://github.com/CycloneDX/cdxgen/pull/1513 ?

I also have another question. Other than the image you shared, are there any other images that are not working without strict: false. If the sample size happens to be just one or a small value, perhaps we make it an optional flag instead?
I am unsure of the security and performance implications of this change.

The sample size is not small at all.  In fact, it appears to be happening on almost every expanded TAR from a docker image.  Literally any warning would currently be turned into an error and kick out the expansion at random times with no logged reason.  In my spot checking, there were random things skipped from almost every TAR file.

Ok, please test my new PR. I have made it to work in strict mode.


Add threat model diagram

A community member asked about the threat model for CoCo this week:
https://cloud-native.slack.com/archives/C039JSH0807/p1705931776196029
I could not find any existing diagram in the coco project that showed the TEE boundaries in a plain and simple way. This PR tries to provide such a diagram in the existing trust-model doc.

@dcmiddle thanks for the feedback! I think it tightened up several parts. The new diagram should have your suggestions, unless I missed something.
Regarding source, it looks like I did it on google drive originally, and it's here. Any preference for how we fold that into the project?

I'd migrate the google slide to the ppt deck in this repo.
Got it. Latest force-push should have this now.


Add support for "genericModelSubstitutes"

Some of our model fields are wrapped into a class DtoField which is just a container for the actual value.
It would be great to have a method in the SwaggerGenOptions to simply "replace" the class by its generic argument.
In Springfox there is a simple method call .genericModelSubstitutes(DtoField.class) to do that.
These models
        public class ModelA
        {
            public DtoField<ModelB> B { get; set; }
        }
        public class ModelB
        {
            public DtoField<string> C { get; set; }
            public string D { get; set; }
        }
        public class DtoField<T>
        {
            public T Value { get; }
            ...
        }

should be replaced by these models before being mapped:
        public class ModelA
        {
            public ModelB B { get; set; }
        }
        public class ModelB
        {
            public string C { get; set; }
            public string D { get; set; }
        }

Any updates on this?
It would be awesome to have a "type preprocessor" like behavior instead.
Instead of extracting the first generic argument from the type (like it is in springfox) just "override" which Type to use.
Something like:
  private class ReplaceDtoFilterAndDoOtherStuffFilter : ITypeFilter
  {
      public Type Apply(SchemaFilterContext context)
      {
          if (context.Type.IsGenericType && context.Type.GetGenericTypeDefinition() == typeof(DtoField<>))
              return context.Type.GetGenericArguments()[0];

          if (context.Type == typeof(DateTime))
              return typeof(string);

          return context.Type;
      }
  }

In this example the type DtoField<> is replaced by its first generic argument + A DateTime is replaced by a string.


[rake-db] TSError when trying to seed db

After writing my migrations and ensuring I can stand up and tear down the database correctly, I decided to write a bunch of seed scripts to populate the database, but even a simple create() query is failing.
TSError: ⨯ Unable to compile TypeScript:
src/db/seed.ts:213:43 - error TS2345: Argument of type '{ name: string; title: string; }' is not assignable to parameter of type 'CreateRelationsData<Db<"facility", { id: ColumnWithDefault<UUIDColumn & { data: { isPrimaryKey: true; }; } & { data: { default: RawSQLBase<ColumnTypeBase<unknown, BaseOperators, unknown, unknown, unknown, ColumnDataBase>, {}>; }; }, RawSQLBase<...>>; ... 4 more ...; updatedAt: ColumnWithDefault<...>; }, { ...; }, { ...'.
  Type '{ name: string; title: string; }' is missing the following properties from type 'Omit<SetOptional<{ id: CreateColumn<Db<"facility", { id: ColumnWithDefault<UUIDColumn & { data: { isPrimaryKey: true; }; } & { data: { default: RawSQLBase<ColumnTypeBase<unknown, BaseOperators, unknown, unknown, unknown, ColumnDataBase>, {}>; }; }, RawSQLBase<...>>; ... 4 more ...; updatedAt: ColumnWithDefault<...>;...': id, createdAt

213   const { id } = await db.facility.create({
                                              ~
214     name: "test",
    ~~~~~~~~~~~~~~~~~
215     title: "test",
    ~~~~~~~~~~~~~~~~~~
216   });
    ~~~

Migration
import { change } from "../dbScript";

change(async (db) => {
  await db.createTable("facility", (t) => ({
    id: t
      .uuid()
      .primaryKey()
      .default(t.sql`uuid_generate_v4()`),
    name: t.varchar().unique(),
    title: t.varchar(),
    description: t.varchar().nullable().default(null),
    createdAt: t.timestamp().default(t.sql`now()`),
    updatedAt: t.timestamp().nullable().default(null),
  }));
});

Table model
import { BaseTable } from "./BaseTable";

export class FacilityTable extends BaseTable {
  readonly table = "facility";
  columns = this.setColumns((t) => ({
    id: t
      .uuid()
      .primaryKey()
      .default(t.sql`uuid_generate_v4()`),
    name: t.varchar().unique(),
    title: t.varchar(),
    description: t.varchar().nullable().default(null),
    createdAt: t.timestamp().default(t.sql`now()`),
    updatedAt: t.timestamp().nullable().default(null),
  }));
}

Seed script
import { db } from "./db";
export const seed = async () => {
  await db.facility.create({
    name: "test",
    title: "test",
  });

  await db.$close();
};

Any ideas why this may be happening? I have set up my dbScript.ts exactly as per documentation, but here it is, just in case:
import { rakeDb } from "rake-db";
import { appCodeUpdater } from "orchid-orm/codegen";
import { config } from "./config";
import { BaseTable } from "./tables/BaseTable";

export const change = rakeDb(config.database, {
  snakeCase: true,
  baseTable: BaseTable,
  migrationsPath: "./migrations",
  appCodeUpdater: appCodeUpdater({
    tablePath: (tableName) => `./tables/${tableName}.ts`,
    ormPath: "./db.ts",
  }),
  useCodeUpdater: false, // set to false to disable code updater
  commands: {
    async seed() {
      const { seed } = await import("./seed");
      await seed();
    },
  },
  import: (path) => import(path),
});

As mentioned before, migrations and rollback run perfectly, I am able to to select my data without issues, just can't create anything right now due to these type errors.

I'll debug to see what's wrong, later today. The error says it's missing id and createdAt, maybe ORM type doesn't take SQL defaults into account, though it should do it.
uuid column type has gen_random_uuid() default by default.
For timestamps, you can use ..timestamps() instead of createdAt + updatedAt (docs), it will set defaults to now(), and updatedAt will be updated automatically when updating.

Thanks, let me know what you did find in your debug. I'll try to use the factory timestamps.
I wish there was some examples of seeders in your other repo, because I couldn't find anything except for single snippet in the docs.

I copied the code as is but could not reproduce the error.
The error says: "Argument ... is not assignable to parameter of type 'CreateRelationsData<...>", CreateRelationsData means that you have defined relations and the error is somehow related to that. Could you publish a reproduction repo, or just copy BaseTable, the table class, createDb, and the seed function to a separate file and share its contents to reproduce the error?

I noticed that you declare timestamps in the BaseTable by spreading ...t.timestamps, not by invoking a function ...t.timestamps().

In the BaseTable you can override column types (optionally) such as to configure timestamps to be parsed into Date objects:
import { createBaseTable } from 'orchid-orm';

export const BaseTable = createBaseTable({
  columnTypes: (t) => ({
    ...t,
    timestamp: () => t.timestamp().asDate(),
  }),
});

Column types are defined in the column class, in your code examples all is correct, except that updatedAt and createdAt better be constructed with ...t.timestamps(). If you destructure it without calling it won't have effect:
const fn = () => {}

// we can destructure a function, without type errors, but this won't have any effect:
const obj = { ...fn } // obj is an empty object

I wish there was some examples of seeders in your examples repo, because I couldn't find anything except for single snippet in the docs.

You can do everything described in the create-update-delete or anything at all in the seeds

I'll get a sample repo ready for you shortly, so you could have a closer look.

@romeerez I have a playground repo ready for you to test: https://github.com/matthewmorek/orchidorm-db-playground

Published a fix, it should be fine with the latest versions.
You're using uuid-ossp extension to set uuid_generate_v4() default for uuids, and it's okay but FYI the ORM is setting gen_random_uuid() default to primary key uuids by default, and this function is standard and doesn't require extensions, works for Postgres >= 13.

I'm using the UUID extension because it's part of Supabase stack, and I'd like to avoid issues in the future with default values, as my plan is to build multiple clients, some of which won't be able to rely on OrchidORM (Swift, Flutter, etc).
Thanks again for a rapid support and a fix! 🙌


Error deploy server 2012 r2

Application 'MACHINE/WEBROOT/APPHOST/DEFAULT WEB SITE' with physical root 'C:\inetpub\wwwroot' failed to start process with commandline 'dotnet .\SimplCommerce.WebHost.dll', ErrorCode = '0x80004005 : c0000135.
Please see help me

Have you installed .net core and .net core modules in the server?  Or which is the .net core version in the server.

@thiennn
I successfully deployed on server 2016 but 2012 was bugs and I installed the full core

I haven't encountered this issue, google by the error code. this might be a permission issue

@balasratran  How's it going? Has you resolved this issue?

@thiennn
Maybe my server has a problem. I was deploy on 1 server and was running. I will check that server later. Thank you


Add gentx alkadeta

Please make sure your node is up and running now. Join #validators on Discord for help: https://discord.gg/QeJWCrE.


helm upgrade doesn't work

Hi Team,
I made some changes to my custom pack and upgraded helm using below command:
helm upgrade --install stackstorm-systems-gb5 --namespace stackstorm-test . --timeout 1000
After completion I could see only jobs were restarted and pods weren't impacted:
~ $ kubectl get po| grep system
stackstorm-systems-gb5-job-st2-apikey-load-nxzgf               0/1     Completed   0          18m
stackstorm-systems-gb5-job-st2-key-load-h4fs8                  0/1     Completed   0          17m
stackstorm-systems-gb5-job-st2-register-content-4747m          0/1     Completed   0          15m
stackstorm-systems-gb5-mongodb-ha-0                            1/1     Running     0          6d22h
stackstorm-systems-gb5-mongodb-ha-1                            1/1     Running     0          6d22h
stackstorm-systems-gb5-mongodb-ha-2                            1/1     Running     0          6d22h
stackstorm-systems-gb5-rabbitmq-ha-0                           1/1     Running     0          6d22h
stackstorm-systems-gb5-rabbitmq-ha-1                           1/1     Running     0          6d22h
stackstorm-systems-gb5-rabbitmq-ha-2                           1/1     Running     0          6d22h
stackstorm-systems-gb5-st2actionrunner-56cd49596f-827xt        1/1     Running     0          6d22h
stackstorm-systems-gb5-st2actionrunner-56cd49596f-g95ct        1/1     Running     0          6d22h
stackstorm-systems-gb5-st2actionrunner-56cd49596f-gjghc        1/1     Running     0          6d22h
stackstorm-systems-gb5-st2actionrunner-56cd49596f-hkc9p        1/1     Running     0          6d22h
stackstorm-systems-gb5-st2actionrunner-56cd49596f-m6k6h        1/1     Running     0          6d22h
stackstorm-systems-gb5-st2api-66dd7dcb8c-cdk6r                 1/1     Running     0          6d22h
stackstorm-systems-gb5-st2api-66dd7dcb8c-rdmrs                 1/1     Running     0          6d22h
stackstorm-systems-gb5-st2auth-5dfc468dc6-p4dp2                1/1     Running     0          6d22h
stackstorm-systems-gb5-st2auth-5dfc468dc6-sh69k                1/1     Running     0          6d22h
stackstorm-systems-gb5-st2client-c95d8fdcd-gtfzq               1/1     Running     0          6d18h
stackstorm-systems-gb5-st2garbagecollector-6bbd69f4df-flv6g    1/1     Running     0          6d22h
stackstorm-systems-gb5-st2notifier-548c694f6c-d7h4j            1/1     Running     0          6d22h
stackstorm-systems-gb5-st2notifier-548c694f6c-lwdgz            1/1     Running     0          6d22h
stackstorm-systems-gb5-st2rulesengine-5988895d46-7xq4s         1/1     Running     0          6d22h
stackstorm-systems-gb5-st2rulesengine-5988895d46-gqf7t         1/1     Running     0          6d22h
stackstorm-systems-gb5-st2scheduler-5997b585f8-869ns           1/1     Running     0          6d22h
stackstorm-systems-gb5-st2scheduler-5997b585f8-wd75z           1/1     Running     0          6d22h
stackstorm-systems-gb5-st2sensorcontainer-5778df4b78-flncp     1/1     Running     0          6d22h
stackstorm-systems-gb5-st2stream-64f65fd746-64kfj              1/1     Running     0          6d22h
stackstorm-systems-gb5-st2stream-64f65fd746-x4qgm              1/1     Running     0          6d22h
stackstorm-systems-gb5-st2timersengine-6f996dcb59-chclw        1/1     Running     0          6d22h
stackstorm-systems-gb5-st2web-6f9c475db4-kdps4                 1/1     Running     0          6d22h
stackstorm-systems-gb5-st2web-6f9c475db4-tzt6v                 1/1     Running     0          6d22h
stackstorm-systems-gb5-st2workflowengine-66796d8c98-7zq58      1/1     Running     0          6d22h
stackstorm-systems-gb5-st2workflowengine-66796d8c98-89n5p      1/1     Running     0          6d22h

I could see changes on dashboard(New actions added to pack) but when I tried running them got error "(action file most likely doesn't exist or contains invalid syntax)", Upon checking inside the pod both yaml & py files weren't actually there.
After I manually deleted all st2actionrunners and st2client(they were automatically created), I could see the changes.
Is there I'm doing wrong with my commands or something changed with the latest version(Can't confirm if it's same with older versions though).
If I do helm delete followed by helm install, it works too.
Please help!

As per discussion on slack. The version number of your st2packs image must change for the upgrade to know that it has altered.

Changing the build version everytime worked.


hx:target throws an error when a raw CSS selector for ID is used: hx:target="#myId"

Since the # sign is used when looking up message properties, Thymeleaf throws an error when a CSS selector is used directly.
This works: hx:target="${'#myDiv'}
This also works: hx-target="#myDiv" (Since it isn't a thymeleaf processor)
This fails: hx:target="#myDiv"
However the doProcess method that is failing in a protected final method of the parent class, so we can't override it to handle this single case.
I think if I use a delegate object, we can handle the edge case for hx:target processor only. I'll look through the other processors to see if the ID use case is common enough to warrant this special case.
I do think it that we need to address it more than just documenting that it isn't supported since the purpose of the hx:target is to reference an id.

I would think that you would use the "normal" hx-target="#myDiv" if you want that.
If you want to use hx:target, it would be because you have some conditional probably, so you would do hx:target="${cond}?'#myDiv':'#otherDiv'}. I would just document this personally.

Ok


Usage on Windows causes shell prompt issues

Bug description
Invocations of wrapper output on Windows don't play well with the shell prompt. It appears at least once for the initial process creation (startpe 0.0.0 ...), appears multiple times when batch scripts are used (may be just how batch scripts work, I know little about them), and the prompt for the next command is missing but has stdin appear at the correct indent level.
Reproduction steps
Run generated wrapper on Windows via PowerShell, Cmd, etc.

Note the odd prompt presence.
Additional context
Nope

On Windows this is a bit tricky. Windows programs are either console subsystem programs, which will work properly in a console but always create a console window on start when started from the explorer, or windows subsystem programs, in which they don't create one either way. See here for more details. Currently the Windows runners are all compiled for the windows subsystem and either manually attach to a console when available, or create a new one when packed with the show-console argument.
AttachConsole with windows subsystem programs doesn't work as one might hope; As the child program is detached, while its outputs are redirected to the parent console the parent console acts like the child isn't running. So I assume this issue is caused by outputs of the child program intermingling with the parent console.
One option to work around this would be compiling an additional runner for the console subsystem as a choice next to the windows subsystem one. This still leaves the issue with .wait()/stdin though.

Actually it seems like .wait() doesn't preclude the child process from accessing stdin, just the parent process from accessing it. So a console-subsystem runner would solve this.
I'm currently working on a PE file resource editor to include in wrappe, which would allow just setting a flag in the windows header while packing without needing two separate runners. Until then I'm alright with switching the Windows runner to the console subsystem and accept a console window flashing up when starting a GUI application.

The runner in the latest snapshot now waits on the spawned child process. Could you check if that solves the problem for you? It should also solve the issue on the other platforms 😄

Working MUCH better now, prompt is showing up only where it would be expected.

One thing I will note. .wait() will terminate stdin (to avoid deadlocks in normal usage). This can be avoided by taking ownership of the stdin handle before calling .wait().
See https://docs.rs/tokio/1.18.1/tokio/process/struct.Child.html#:~:text=If the caller wishes to explicitly control when the child’s stdin handle is closed%2C they may .take() it before calling .wait()%3A


Develop

Currently CodeIgniter does not have way to see query built my active record. For example in ZF you can echo out SQL made by Zend Select. So, I wrote similar  thing for CI.

CodeIgniter does include $this->db->last_query(); which will show you the query.

As far I know $this->db->last_query(); only shows latest query that was fired. My modification shows query that was prepared by active record before query execution. For more information please visit http://framework.zend.com/manual/en/zend.db.select.html#zend.db.select.execute.tostring.

https://github.com/EllisLab/CodeIgniter/blob/develop/system/database/DB_driver.php#L679
That only shows the last executed query.  This gives you the potential to view/dump query as you are building it.
Seems like a neat little query, though it'd probably be better if it were renamed to something like current_querry() instead of overriding the __toString() method of the class

this has already been added
https://github.com/EllisLab/CodeIgniter/pull/307
https://github.com/EllisLab/CodeIgniter/commit/12e93fe725493cc2a6dfe17a0bd7a15cb0bcdab6


flannel: fix flannel integration

This change is

test-flannel

test-me-please

Coverage decreased (-0.04%) to 43.072% when pulling af56835c53b38aca69f9629dacfe0739b29354b2 on pr/fix-flannel into 5a62d3786f173060b7f8ed91426a45eba538dacd on master.


when TLSSecret is provided, all tls related parameters are required

when TLSSecret is specified, then the below parameters are all required in that secret:
use_tls:
tls_allow_insecure:
hostname_verification_enabled:
tls_trust_cert_path:

which doesn't look good to users

another thing is that tls_trust_cert_path is a file, is it better to use a secret to mount it?
otherwise, since our providing runner images doesn't have that file, users need to build a new docker image to include the tls_trust_cert_path

@streamnative/serverless any opinion?

thanks @jiangpengcheng for this issue, I think there are two things that need to solve here:

the controller doesn't load the secrets referenced by the resource, which may lead to the issue of incomplete function command when the secret does not contain all info. One possible solution is to read the secret first, then construct the commands based on the secret keys.
For the cert path issue, certs can be mounted separately with .spec.pod.volumeMounts and .spec.volumes, then use tls_trust_cert_path in tls secret. If we are not changing this part, we should add some doc to let the user know how to use this feature, like a use-case section on the function-mesh website.

I think it's better to add a field for tls_trust_cert_path explicitly to generate volume&volume mount since the init container for downloading packages/functions may also require the tls_trust_cert_path


⚠ Bofrost.be has degraded performance

In 518c83c, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 2456 ms

Resolved: Bofrost.be performance has improved in b54f849.


Encapsulate followingOnlinesRequests into a tool or add it as a lichessTools mechanism

It's duplicated code.

However, with ver3 the friends tools might get combined. Anyway, it's a small piece of code.


Files with prefixes are not processed properly

As mentioned in https://github.com/awslabs/cdk-serverless-clamscan/issues/54#issue-922994847 files with prefixes fail to scan
[ERROR] FileNotFoundError: [Errno 2] No such file or directory: '/mnt/lambda/b0289808-bb0c-4d94-934f-d08e8c27ad2a/nestedfoldercheck/0000001.jpg.262a6F0b'
Traceback (most recent call last):
  File "/var/lang/lib/python3.8/site-packages/aws_lambda_powertools/metrics/metrics.py", line 184, in decorate
    response = lambda_handler(event, context)
  File "/var/lang/lib/python3.8/site-packages/aws_lambda_powertools/logging/logger.py", line 347, in decorate
    return lambda_handler(event, context)
  File "/var/task/lambda.py", line 75, in lambda_handler
    download_object(input_bucket, input_key, payload_path)
  File "/var/task/lambda.py", line 119, in download_object
    s3_resource.Bucket(input_bucket).download_file(
  File "/var/lang/lib/python3.8/site-packages/boto3/s3/inject.py", line 244, in bucket_download_file
    return self.meta.client.download_file(
  File "/var/lang/lib/python3.8/site-packages/boto3/s3/inject.py", line 170, in download_file
    return transfer.download_file(
  File "/var/lang/lib/python3.8/site-packages/boto3/s3/transfer.py", line 307, in download_file
    future.result()
  File "/var/lang/lib/python3.8/site-packages/s3transfer/futures.py", line 106, in result
    return self._coordinator.result()
  File "/var/lang/lib/python3.8/site-packages/s3transfer/futures.py", line 265, in result
    raise self._exception
  File "/var/lang/lib/python3.8/site-packages/s3transfer/tasks.py", line 126, in __call__
    return self._execute_main(kwargs)
  File "/var/lang/lib/python3.8/site-packages/s3transfer/tasks.py", line 150, in _execute_main
    return_value = self._main(**kwargs)
  File "/var/lang/lib/python3.8/site-packages/s3transfer/download.py", line 571, in _main
    fileobj.seek(offset)
  File "/var/lang/lib/python3.8/site-packages/s3transfer/utils.py", line 367, in seek
    self._open_if_needed()
  File "/var/lang/lib/python3.8/site-packages/s3transfer/utils.py", line 350, in _open_if_needed
    self._fileobj = self._open_function(self._filename, self._mode)
  File "/var/lang/lib/python3.8/site-packages/s3transfer/utils.py", line 261, in open
    return open(filename, mode)

It looks like this function needs to updated to create additional folders in EFS when the file has a prefix


Openmm setup

Hey,
Could you please take a look at the codes that I have added for setting a system up using Gromacs for Openmm simulations and merge them.
Thank you!
Nazanin

Development has now moved to https://github.com/PolusAI/workflow-inference-compiler
Unfortunately we were not able to migrate PRs, so please open a new PR over there.


Problems to handover a none json string

Hello,
I have to handly a webhook from a network system where the content is not json like. Here a example:
date=2024-10-12 time=23:52:08 devid="FGVMEV-CTZXP2_8F" devname="FGVMEV-CTZXP2_8F" eventtime=1728769927878132716 tz="+0200" logid="0100026001" type="event" subtype="system" level="information" vd="root" logdesc="DHCP Ack log" interface="port2" dhcp_msg="Ack" mac="00:XC:29:F4:XX:XX" ip=<IP_ADDRESS> lease=300 hostname="CL" msg="DHCP server sends a DHCPACK"
As far as I see the content is not well json formated.
webhook tells me:
[webhook] 2024/10/13 00:30:51 [20b296] 200 | 0 B | 104.629µs | <IP_ADDRESS> | POST /hooks/FS
[webhook] 2024/10/13 00:30:51 [20b296] error extracting command arguments: couldn't retrieve argument for {Source:payload Name: EnvName: Base64Decode:false}
[webhook] 2024/10/13 00:30:51 [20b296] executing /tmp/test.py (/tmp/test.py) with arguments ["/tmp/test.py" ""] and environment [] using /tmp as cwd
[webhook] 2024/10/13 00:30:51 [20b296] command output:

My question how can I tell webhook to do NOT parse the content as json and handover the string (content) to my python program?
Regards
Stephan

To be more clear:
Here is the relevant part of hook.json:
   {
    "id": "FS",
    "execute-command": "/tmp/test.py",
    "command-working-directory": "/tmp",
    "pass-arguments-to-command":
    [
      {
        "source": "entire-payload"
      }
    ],
    "trigger-rule":
      { "match": { "type": "ip-whitelist", "ip-range": "<IP_ADDRESS>/32" } }
   },

In that case I receive:
[webhook] 2024/10/13 11:11:45 [e34378] incoming HTTP POST request from <IP_ADDRESS>:23384
[webhook] 2024/10/13 11:11:45 [e34378] FS got matched
[webhook] 2024/10/13 11:11:45 [e34378] error parsing JSON payload invalid character 'd' looking for beginning of value
[webhook] 2024/10/13 11:11:45 [e34378] FSc hook triggered successfully
[webhook] 2024/10/13 11:11:45 [e34378] 200 | 0 B | 86.836µs | <IP_ADDRESS> | POST /hooks/FS
[webhook] 2024/10/13 11:11:45 [e34378] executing /tmp/test.py (/tmp/test.py) with arguments ["/tmp/test.py" "null"] and environment [] using /tmp/ as cwd

As written above, I think the json format that is passed does not fit. I would therefore like to read in the data as a string and then take care of the further processing myself.

{
    "source": "raw-request-body"
}

should give you the complete text as one argument.  You'll still get the "error parsing JSON payload" message in the log but that's only happening because the sender that is calling your webhook is sending it with a Content-Type header that claims it is JSON - the actual execute-command should still work.

{
    "source": "raw-request-body"
}

should give you the complete text as one argument. You'll still get the "error parsing JSON payload" message in the log but that's only happening because the sender that is calling your webhook is sending it with a Content-Type header that claims it is JSON - the actual execute-command should still work.

You can use the incoming-payload-content-type - sets the Content-Type of the incoming HTTP request (ie. application/json); useful when the request lacks a Content-Type or sends an erroneous value