dynamic scenario outline background not included in report

as reported here: https://stackoverflow.com/q/75891220/143475
to replicate:
Feature:

Background:
* print 'in background'

@setup
Scenario:
* def data = [{a: 1}, {a: 2}]

Scenario Outline:
* print __row

Examples:
| karate.setup().data |

report:

the Background has worked for both scenarios (appears in the log) but does not appear in the HTML report where the @setup does

1.4.0 released


Question: Customising templates

Hi! I'm new to Django, and I have been following this tutorial (timestamp: 4hrs 25 mins) https://www.youtube.com/watch?v=WbNNESIxJnY, the author is able to change the base.html to have login/signup forms with his own navbar etc. I think this is because he's using an older version of this library. However, I don't know how to dot it in the newer versions and I can't find any examples.

https://github.com/danihodovic/django-allauth-ui/issues/93

Thanks, it wasn't really clear to me still (as a beginner). So I just used an older version of the package.


Introduce (de-)serialization of contents depending on key

⚠ The current implementation is not complete -- more input needed! 🚧
When the content type of an Irmin store is a variant, you currently need to serialize it to a string such that the members can be discerned just from looking at this string. This PR is an attempt to allow serialization and deserialization of content values to also depend on the key. This means you don't need to include additional data in the serialized string to discern between members. This is a particular benefit when interacting with contents of an Irmin store outside of Irmin, e.g. via Git.
This PR introduces a new signature Irmin.Serializer.S, which captures serializing and deserializing a value while depending on a key:
module Serialize : sig
  module type S = sig
    type t
    type key

    val encode_bin : key -> t Type.encode_bin
    val decode_bin : key -> t Type.decode_bin
    val size_of : key -> t Type.size_of
  end
end

An additional argument with this type has been added to the functors APPEND_ONLY_STORE_MAKER and ATOMIC_WRITE_STORE_MAKER, as well as Irmin.Store.Make_ext. Existing implementations of these signatures have been updated.
Everything compiles, but the current patch does not have the desired effect. This is because the serializer is only passed to append-only stores and atomic write stores, but not content addressable stores (CONTENT_ADDRESSABLE_STORE). Content adressable stores don't care about keys, only values, so it does not really make sense to provide a Serialise.S for a content adressable store. However, the actual content is stored in a content adressable store (here). Further, the contents store is currently keyed by a hash, not the path of the store, and is not aware of the path at all.
I'm currently investigating different approaches on how to solve this, but would appreciate any input. I'll try update this PR as I learn more.

Recording some thoughts and suggestions that were proposed on Slack:

Another solution proposal would be to alter the signature Irmin.Type.S such that val t: key -> t Type.t. This is an even more invasive change than this PR proposes, at the benefit of also having pretty printers and more being dependent on the key.
Yet another alternative, which is similar but not identical, would be to keep a tree of Irmin type witnesses that corresponds with the store tree structure, where each leaf of the 'witness tree' denotes the type of the corresponding subtree in the store. As an example, you might have x Type.t for /foo and y Type.t for /bar. This does not allow mixing different types for the same node (folder) though.

I've proceeded with yet another solution myself. As mentioned above, the fundamental issue (in my view) is that content addressable stores are oblivious to the key. The insight for my proposed solution is that we don't need all content addressable stores to be aware of the key, only S.CONTENTS_STORE. So, what if only that signature is updated to be path-aware?
module type CONTENTS_STORE = sig
  type 'a t

  type key

  type path

  type value

  val mem : [> `Read ] t -> key -> bool Lwt.t

  val find : [> `Read ] t -> key -> path -> value option Lwt.t

  val add : [> `Write ] t -> path -> value -> key Lwt.t

  val unsafe_add : [> `Write ] t -> key -> string -> unit Lwt.t

  val merge : [ `Read | `Write ] t -> path -> key option Merge.t

  (* ... *)
end

This is fairly easy to achieve and a quite local change -- and many of the current changes from this PR are not required at all! There are ripple-effects though for nodes, trees, commits and stores. I've attempted to follow through with the required changes, and it pans out for the most part. However, I got stuck on the following problem: nodes are not aware of their path. What's more, it's possible for the path of a node to change! This could cause deserialization of the contents to fail, which seems like a bad design. As such, I'm wondering if serialization and deserialization should not depend on the key but only on the step?

I've continued working with the idea of updating the contents store, though I've continued with paths, not steps as mentioned in my previous comment (I continue to believe just using steps would be simpler though). Code compiles, but there are still a bunch or things to be sorted out. Tests do not pass currently.
Latest work here: https://github.com/andreas/irmin/tree/andreas/key-dependent-contents-store


the ebean enhancer isn't silent

The ebean gradle plugin isn't "silent" when gradle is started with "-q".
$ gradle -q clean build
We get lot's of messages like this:
ebean-enhance> cls: com/foo/bar/entity/Query  msg: enhanced
enhancement prior to running tests
Nothing wrong here - but we use -q to have the continious integration build verbose level stripped down just to errors and warnings.
Please patch :)

Please submit a patch :)

gradle -q ... >/dev/null

I just found it out :)
You guys are using "logger.info"
According to this: https://docs.gradle.org/current/userguide/custom_plugins.html
it's
logger.quiet "Writing message 'Hi from Gradle' to file"
Can you change this?

Ok, should be sorted in 11.13.1


fix(chat): fix guarantee resolver for selected booking page

LiveURL: https://smartfaq-fix-guarantee-resolver.surge.sh

:tada: This PR is included in version 1.9.7 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


ls at ubuntu 16.10 crashes

RUST_BACKTRACE=1 ./alacritty outputs that once running ls:
thread 'pty reader' panicked at 'index out of bounds: the len is 2 but the index is 2', /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/slice.rs:640
stack backtrace:
   1:     0x55f57d115dea - std::sys::imp::backtrace::tracing::imp::write::h2b860f17b6b0f511
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
   2:     0x55f57d11b15f - std::panicking::default_hook::{{closure}}::hedea7d569eb1e6b8
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:349
   3:     0x55f57d11ad5e - std::panicking::default_hook::he87e0c76c89c52a4
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:365
   4:     0x55f57d11b607 - std::panicking::rust_panic_with_hook::h304127bde2d3d5e2
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:553
   5:     0x55f57d11b494 - std::panicking::begin_panic::h814f60faa3ce8314
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:515
   6:     0x55f57d11b3b9 - std::panicking::begin_panic_fmt::hf4f7d700fa077693
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:499
   7:     0x55f57d11b347 - rust_begin_unwind
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:475
   8:     0x55f57d14740d - core::panicking::panic_fmt::hee207ff21fb62166
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/panicking.rs:69
   9:     0x55f57d1473b8 - core::panicking::panic_bounds_check::hca28eae069525a56
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/panicking.rs:56
  10:     0x55f57d02df5d - alacritty::ansi::parse_color::he1f954b5b4f73a83
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/slice.rs:640
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/slice.rs:542
                        at /home/chrmod/Projects/opensource/alacritty/src/ansi.rs:732
  11:     0x55f57cff689c - vte::Parser::perform_action::ha595f6d3713fa1a4
                        at /home/chrmod/Projects/opensource/alacritty/src/ansi.rs:630
                        at /home/chrmod/.cargo/registry/src/github.com-1ecc6299db9ec823/vte-0.1.2/src/lib.rs:205
  12:     0x55f57d009aba - <alacritty::event_loop::EventLoop<Io>>::spawn::{{closure}}::h8a87f59e0d85f278
                        at /home/chrmod/.cargo/registry/src/github.com-1ecc6299db9ec823/vte-0.1.2/src/lib.rs:158
                        at /home/chrmod/.cargo/registry/src/github.com-1ecc6299db9ec823/vte-0.1.2/src/lib.rs:137
                        at /home/chrmod/Projects/opensource/alacritty/src/ansi.rs:85
                        at /home/chrmod/Projects/opensource/alacritty/src/event_loop.rs:211
                        at /home/chrmod/Projects/opensource/alacritty/src/event_loop.rs:308
  13:     0x55f57cff518b - std::panicking::try::do_call::h36ad92b485fdc90c
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panic.rs:295
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:458
  14:     0x55f57d12254a - __rust_maybe_catch_panic
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libpanic_unwind/lib.rs:98
  15:     0x55f57d00797a - <F as alloc::boxed::FnBox<A>>::call_box::h9e0ff91ec3235773
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:434
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panic.rs:351
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/thread/mod.rs:287
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/liballoc/boxed.rs:605
  16:     0x55f57d11a454 - std::sys::imp::thread::Thread::new::thread_start::h460a0adc61139b06
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/liballoc/boxed.rs:615
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys_common/thread.rs:21
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys/unix/thread.rs:84
  17:     0x7f896b4fe709 - start_thread
  18:     0x7f896b0210ae - __clone
  19:                0x0 - <unknown>
child finished with error '1'

once running tmux, ls works just fine

repro (ubuntu 16.04.1):
$ mkdir foo
$ ls -d foo  # ok
$ chmod o+rw foo
$ ls -d foo  # crash

The default dircolors setting changes the color of the directory foo if it is other-writable (on my system in xterm it is shown in blue with gray background).

Same in archlinux, kernel 4.8.13

https://github.com/jwilm/alacritty/pull/164/commits/180150bbc1b3d14f1a23f9762b7d0e9a9b3ee6ea did not fix the issue

if the issue is related to ls colour configuration, here goes the link to my .dircolors https://github.com/chrmod/dotfiles/blob/master/.dircolors

I'm aware of a bug that may be causing this; patch forthcoming.

Added a patch to master, fancy giving it a try @chrmod?

These steps no longer make it crash for me:
$ mkdir foo
$ ls -d foo  # ok
$ chmod o+rw foo
$ ls -d foo  # ok

So I think this issue is fixed

Thanks for the follow-up @holygeek. Going to close this as fixed until we hear otherwise.

can confirm the fix. Thanks! :+1:


Fix cracking between quantized terrain tiles in 2D.

For #3393.
In 2D, the texture coordinates of the tile are interpolated over the rectangle to get the position in the vertex shader. When the texture coordinates are quantized, error is introduced. This can be seen through the 1px wide cracking between the quantized tiles in 2D. To compensate for the error, move the expand the rectangle in each direction by half the error amount.

Update CHANGES.md.

Looks good!


Cannot assign "Technical Provider" role to Supplier

Build: BES_MASTER_DELIVERY-10252017/04/26
Windows Server 2016
jdk1.8u121
SAML mode
[How to reproduce]
Create new organization with Supplier role
Update the organization - assign Technical Provider role
Login as Supplier
[Expected result]
The organization has the both roles (can create new Technical Service)
[Observed result]
The organization still has only Supplier role (cannot create new Technical Service)
[Details]
Administrator should have possibility to assign TP role to Supplier

When administrator adds 'Technology Manager' role to a Supplier which doesn't already have this role, it becomes possible for the Supplier to add the Technology Manager role to him/herself from Account > Manage users > click on own username > check 'Technology Manager'.
This looks like intentional behaviour. Should it be changed?
Thanks @badziakp for help on this.

Yes, it works as designed. When the platform operator creates the organization with both roles "Supplier" and "Technology Provider", the corresponding user roles are assigned to the user created with the organization. If the "Technology Provider" role is assigned to the organization after its creation, the user must take additional step in assigning appropriate user role (technology manager) to be able to manage technical services on the platform.


Implement /whowas

MagNet (and probably others) allows a /whowas command which is exactly like /whois but for someone who has left the network. This is especially handy when someone is abusing or when you want to remember details about a contact who is currently offline

Yes, WHOWAS is part of the original 1459 RFC: https://tools.ietf.org/html/rfc1459#section-4.5.3
So all irc servers should implement it, though some may limit its use.

This should probably be implemented in Mojo::IRC and then just proxied from Convos:

https://github.com/jhthorsen/mojo-irc/blob/master/lib/Mojo/IRC/UA.pm#L257
https://github.com/Nordaaker/convos/blob/master/lib/Convos/Core/Connection/Irc.pm#L185

Bump. The lack of this feature made it hard for me to moderate #mojo

I'm closing this in favour of https://github.com/Nordaaker/convos/issues/317


chore: delete old control protocol

This can only be deleted once we are comfortable that the gateway release following the merge no longer needs to support clients using the old control protocol.


🐛 [llama2][export] Cannot extract range information from symbolic nodes

Bug Description
Configuration : llm_examples_main branch, current torch version : 2.4, transformers==4.41.2
One of the subgraphs is receiving a SymInt node (s0+1) which relies on other SymIntnodes. Hence the node.meta does not have the shape information of this node but it has info about (s0). File a bug with PyTorch if this can be computed.
Error message:
Traceback (most recent call last):
  File "/work/TensorRT/examples/dynamo/torch_export_llama2.py", line 38, in <module>
    trt_model = torch_tensorrt.dynamo.compile(
  File "/work/TensorRT/py/torch_tensorrt/dynamo/_compiler.py", line 227, in compile
    trt_gm = compile_module(gm, inputs, settings)
  File "/work/TensorRT/py/torch_tensorrt/dynamo/_compiler.py", line 365, in compile_module
    submodule_inputs = partitioning.construct_submodule_inputs(submodule)
  File "/work/TensorRT/py/torch_tensorrt/dynamo/partitioning/common.py", line 96, in construct_submodule_inputs
    torchtrt_inputs.append(get_input(input_shape, input_meta.dtype))
  File "/work/TensorRT/py/torch_tensorrt/dynamo/partitioning/common.py", line 69, in get_input
    return construct_dynamic_input(
  File "/work/TensorRT/py/torch_tensorrt/dynamo/partitioning/common.py", line 40, in construct_dynamic_input
    assert var_range, var_val
AssertionError: None

To Reproduce
python examples/dynamo/torch_export_llama2.py

Environment

Build information about Torch-TensorRT can be found by turning on debug messages

Torch-TensorRT Version (e.g. 1.0.0):
PyTorch Version (e.g. 1.0):
CPU Architecture:
OS (e.g., Linux):
How you installed PyTorch (conda, pip, libtorch, source):
Build command you used (if compiling from source):
Are you using local sources or building from archives:
Python version:
CUDA version:
GPU models and configuration:
Any other relevant information:

Additional context

The minimal reproducer for this bug:
"""Test script for TRT export"""

import torch
import torch_tensorrt
from torch.export import export, Dim

class TestMod(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = torch.nn.Linear(10,10)
        self.linear2 = torch.nn.Linear(10,10)
    def forward(self, x):
        return self.linear1(x)

x = torch.randn(2,2,10).to("cuda")

mod = TestMod().to("cuda")

dynamic_shapes = (
    {
        0: Dim("batch_size", min=1, max=10),
        1: Dim("seq_len", max=10),
    },
)
pgm = export(mod, (x,), dynamic_shapes=dynamic_shapes)

trt_fx_module = torch_tensorrt.dynamo.compile(
    pgm, (x,), min_block_size=1, enabled_precisions=(torch.float32,), debug=True
)

This PR fixes this issue : https://github.com/pytorch/TensorRT/pull/2918

Question to pytorch : https://github.com/pytorch/pytorch/issues/128640


592-504-errors-on-production-nginx-dns

We need to define our urls as variables and pass these to proxy pass to ensure the dns lookup is periodically expired.
We have seen 504 errors when the ips of our s3 buckets are changed because the DNS resolution is never expired and always points to the ip looked up when the papp is started.

domain names statically configured in config are only looked up once on startup (or configuration reload).
https://forum.nginx.org/read.php?2,215830,215832#msg-215832

Setting proxy_pass to a variable forces re-resolution of the DNS names, because Nginx treats variables differently to static configuration
https://serverfault.com/a/593003

These variables must be set outside the location block:
https://serverfault.com/questions/240476/how-to-force-nginx-to-resolve-dns-of-a-dynamic-hostname-everytime-when-doing-p#comment875954_593003

Hmmm I seem to remember having to make these non-variables for a reason. The problem with them being variables is it means they get evaluated once and only once. Will have to look back in the history. Maybe this was the double-slash story?

I think this will work because of this:

When variables are used in proxy_pass:
location /name/ {
proxy_pass http://<IP_ADDRESS>$request_uri;
}
In this case, if URI is specified in the directive, it is passed to the server as is, replacing the original request URI.

http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass

Usually nginx will pass the uri of the request automatically. But because we're using variables it doesn't know what part of the uri to replace when it matches against the location.
So when we manually pass it as $request_uri it overrides any replacements by nginx and passes the original.

Here's wat we were doing:

A request URI is passed to the server as follows:
If proxy_pass is specified without a URI, the request URI is passed to the server in the same form as sent by a client when the original request is processed, or the full normalized request URI is passed when processing the changed URI:

But we need to use variables now so the dns isn't cached and the docs say:

In some cases, the part of a request URI to be replaced cannot be determined:

When variables are used in proxy_pass:

So we have to do:

In this case, if URI is specified in the directive, it is passed to the server as is, replacing the original request URI.

Specify the server and the uri in our proxy_pass

At least I think that's how it works 🤷♂ It's not very clear docs. Could very much benefit from some examples.

Ah right, well I mean it sounds about right. Though I wonder - this doesn't mean that it doesn't cache DNS at all in this case does it? Because we already get occasional DNS failures which screw us up don't we?

@risicle It uses the resolver cache value which is set to 5 mins, but weirdly 5 minutes is the default so including it is superfluous 😁


Refactor Klatt implementation itself

The Klatt implementation is janky. There are some TODOs. Figure out ways to improve.

Store Klatt params better inside the synthesizer object. mast.params["paramname"] is janky.
JS doesn't do keyword args, so the Pythonic massive constructor for params doesn't work. Replace it with passing in an object or daisy chain methods (KlattParam().DUR(1.0).F0(200)).
Use an array instead of individual params for A1 through A6.


fix: update to latest interface

Let me know if there are substantial changes that would warrant a deeper look.

no, all the changes are in the base classes, thanks!


fix: troubleshoot make fail

:tada: This PR is included in version 1.0.0-alpha.19 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Use Vuex instead of repeating data

Now I am using the same data cross components.
It will be an improvement to, instead, using Vuex to manage the data and make sure it is updated cross components

This issue is being closed as it will automatically be fixed when using Vue3


Webview - How do I submit an event for the guest who is in the webview be heard by the electron?

How do I submit an event for the guest who is in the webview be heard by the electron?

You can use IPC. In my app I use socket.io to achieve this.
On Thu, Jul 16, 2015, 18:53 Candido Sales Gomes<EMAIL_ADDRESS>wrote:

How do I submit an event for the guest who is in the webview be heard by
the electron?
—
Reply to this email directly or view it on GitHub
https://github.com/atom/electron/issues/2255.

There is an event of webview for that.

I found the solution:
Webview --> Guest: webview.send();
Webview <-- Guest: ipc.sendToHost();
Webview --> Electron: ipc.send();
Webview <-- Electron: mainWindow.webContents.send();
Thanks =)


add native arm image

currently, it seems like elasticmq-native runs through qemu-x86_64 on arm, could this be made into a native image? it would really benefit laptop development and battery life, since it currently takes about 10-20% cpu with a light polling client

Continuation of #473

thanks @micossow, as I mentioned there, there's darwin aarch64 support over at https://github.com/graalvm/graalvm-ce-dev-builds/releases now, could m1 arm native elasticmq-native images be a thing with it?

It should be possible to build such image now, see: https://github.com/sbt/sbt-native-packager/issues/1503
Some changes in build.sbt are probably also necessary.

I tested the image softwaremill/elasticmq-native:1.3.14 on a Graviton AWS server, but it does not work
# docker run softwaremill/elasticmq-native:1.3.14
Unable to find image 'softwaremill/elasticmq-native:1.3.14' locally
1.3.14: Pulling from softwaremill/elasticmq-native
Digest: sha256:c251751b5d668033c69494ff37a938f977397ad3c806085e53f269bedb2c3ead
Status: Downloaded newer image for softwaremill/elasticmq-native:1.3.14
[FATAL tini (7)] exec /opt/docker/bin/elasticmq-native-server failed: Exec format error

The executable in the image is in amd64 format
file opt/docker/bin/elasticmq-native-server
opt/docker/bin/elasticmq-native-server: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=2ad8fd7fe117da1b01aea2b469d54497c42743d3, with debug_info, not stripped, too many notes (256)

Other files look for aarch64 architecture.

Will this be fixed? or is there a quick way of building this from the repo manually?

If you need docker image locally, you can run sbt "project nativeServer; clean; assembly; graalvm-native-image:packageBin; docker:publishLocal" on your AMR64 system.
To be able to create native docker images as a part of GH workflow, we need either:

GH Workflow supporting ARM64 systems
or cross compilation support in GraalVM https://github.com/oracle/graal/issues/407

GitHub released a MacOS builder which is M1 based.
Could that be used for ARM64 builds?

@diegobfernandez Interesting - if we only use it for releases, it might not be that expensive (hopefully in the order of a couple of dollars)

Hello, I updated build.sbt to use buildx supported image creation, which should create proper native images for both x64 and ARM. Please test if softwaremill/elasticmq-native:1.4.5-RC1 image works on your ARM machines. If yes, I'll create a release next week.

Update: softwaremill/elasticmq-native:1.4.5-RC2 has a fix for UI.

Fixed in https://github.com/softwaremill/elasticmq/releases/tag/v1.4.6


What counts as success?

Some situations where I'd expect success but receive failure:
(reg-event-fx
 :cms/test-200
 (fn [{:keys [db]} [_]]
   {:http-xhrio {:method :post
                 :uri "https://httpbin.org/status/200"
                 :timeout 5000
                 :params {}
                 :format (ajax/json-request-format)
                 :response-format (ajax/json-response-format {:keyword? true})
                 :on-success [:success-handler]
                 :on-failure [:failure-handler]}}))

(reg-event-fx
 :cms/test-201
 (fn [{:keys [db]} [_]]
   {:http-xhrio {:method :post
                 :uri "https://httpbin.org/status/201"
                 :timeout 5000
                 :params {}
                 :format (ajax/json-request-format)
                 :response-format (ajax/json-response-format {:keyword? true})
                 :on-success [:success-handler]
                 :on-failure [:failure-handler]}}))

Seems like just a 200 or 201 response is not enough to be considered a success.

We're using the definition of success provided by cljs-ajax. I can't see anything obviously wrong with the code above, what is it actually returning in the HTTP request?

Status Code: 200 OK

Response Headers
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: http://mysite.dev
Connection: keep-alive
Content-Length: 0

-------------------------------------------

Status Code: 201 CREATED

Response Headers
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: http://mysite.dev
Connection: keep-alive
Content-Length: 0

:on-failure handler gets triggered. https://httpbin.org/post works fine; sends a json body instead of empty. I'd guess there are some :body requirements lurking.

Sure, what does Chrome Devtools show about the requests? What is the error being returned in the :on-failure?

{:response nil, :last-method "POST", :original-text "", :last-error "", :failure :parse, :status-text "Invalid JSON string: Format should have been JSON", :status 201, :uri "https://httpbin.org/status/201", :debug-message "No Error", :last-error-code 0}
Looks like it can't take an empty body. I don't know if I quite agree an empty body should count as a failure but I'll consider this issue resolved.

I don't know if I quite agree an empty body should count as a failure

Ok sure. You can raise an issue with cljs-ajax about it if you'd like, as they make the decision about success/failure.


Blog backlog

Updates:

[x] Shatter: added Twitch collection, Polywork link

New:

[ ] UpLabs MaterialUp Design Challenge: Material GitHub for Android
[ ] Experiment: What's The Temp?
[ ] Experiment: Material Calculator
[ ] UpLabs Chat Interaction Challenge: Material Chat for Android
[ ] Experiment: List It
[ ] Building a Bug Report bot for Slack with Glitch and Airtable
[ ] Glitch-powered /tableflip for Slack
[ ] Add your Medium posts to Carrd with static-medium
[ ] gmailExtract.gs
[ ] #24hrStartup Challenge: The Making of Data Viz for Airtable
[ ] Building Automators Academy with Kartra and No Code
[x] BuiltOnAir Season 3: Episode 8
[ ] Gliding Out of Overlapping Scheduling Hell
[ ] Airtable Scripts: From URL to Attachment
[ ] Building a Discord Bot with Autocode for my #LetsCreate Community
[ ] Assign a custom Discord role to GitHub Sponsors with Autocode and Airtable
[ ] Level up your Link-in-Bio with Socialite

Shatter Twitch collection is not loading the first video in the list...
https://www.twitch.tv/collections/0WkbOP5xexWgGw
<iframe
	src="https://player.twitch.tv/?collection=0WkbOP5xexWgGw&video=videoId&parent=www.example.com"
	frameborder="0"
	allowfullscreen="true"
	scrolling="no"
	height="378"
	width="620">
</iframe>


Can't create new scenario

Issue Type

Bug report

Molecule and Ansible details
ansible --version && molecule --version
ansible [core 2.11.1]
  config file = None
  configured module search path = ['/home/static/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/static/.local/lib/python3.8/site-packages/ansible
  ansible collection location = /home/static/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/static/.local/bin/ansible
  python version = 3.8.5 (default, May 27 2021, 13:30:53) [GCC 9.3.0]
  jinja version = 2.11.2
  libyaml = True
molecule 3.3.4 using python 3.8
    ansible:2.11.1
    delegated:3.3.4 from molecule
    docker:0.2.4 from molecule_docker

Molecule installation method (one of):

pip

Ansible installation method (one of):

pip

Detail any linters or test runners used:
Desired Behavior
molecule --debug create --scenario-name scenarioname get scenario created.
Actual Behaviour
CRITICAL 'molecule/scenarioname/molecule.yml' glob failed.  Exiting.

The molecule create ... will not create a new scenario, it will create instances for a selected scenario. What you are looking for is the molecule init scenario subcommand.


Fabric, 1.20.1. Big issue. Fix needed

My dear friend,
I hope this message finds you well. I'm reaching out regarding the release strategy for the MineMenu mod, specifically the absence of a Fabric 1.20.1 version. As an enthusiast of your mod and an active member of the Minecraft community, I'd like to express my concern about the decision to skip the 1.20.1 release.
Request:
I kindly request the release of the MineMenu mod for Fabric 1.20.1. This version appears to be favored by a significant portion of the player base, and its absence limits accessibility and enjoyment for many users, including myself.
Reasoning:
Player Preference: Fabric 1.20.1 remains a popular choice among players due to various factors, including mod compatibility and stability.
Community Feedback: Numerous discussions across community forums and social media platforms highlight the desire for MineMenu compatibility with Fabric 1.20.1.
Usage Patterns: Despite the availability of subsequent versions, many players continue to utilize Fabric 1.20.1, underscoring its importance within the Minecraft modding community.
Impact:
Enhanced Player Experience: Releasing MineMenu for Fabric 1.20.1 will ensure that a broader audience can enjoy the mod without the need to update to a different Minecraft version.
Community Satisfaction: Addressing this request demonstrates responsiveness to the community's needs and preferences, fostering a positive relationship between developers and users.
Mod Visibility: Compatibility with Fabric 1.20.1 will maintain the visibility and relevance of MineMenu within the modding ecosystem, potentially attracting new users who prefer this version.
Conclusion:
Considering the evident demand and the substantial usage of Fabric 1.20.1, I strongly believe that releasing the MineMenu mod for this version would greatly benefit the community. I appreciate your attention to this matter and eagerly anticipate a favorable response.
Thank you for your time and consideration.

There won't be any backports to 1.20.1 for Fabric or any version before.
The only reason I made a Fabric version, is because I started using MultiLoader to have both NeoForge and Forge versions, figured I might as well do Fabric going forward, while I was at it.


shell: fix mkdir with parents for Windows nodes

spurplus is unable to create parent directories when the target node is a Windows node. This is because it expects only POSIX paths, and its parent creation logic doesn't work well with Windows paths. In these cases, spurplus throws OSError.
To fix this, catch the OSError exception and fallback to using the mkdir command to create the directory.

@LiliDeng LGTM

testing


Reduce number of mingw x86_64 parallel test runs due to wine errors

All checks passed. Christmas miracle!


Decide on how we intend to support Android

We don't yet have a cemented path for supporting Android. It could either be through our pre-existing Kotlin SDK or bindings exposed via Rust.
Need to decide on how soon we're hoping to have Android support

I would like to have a deep dive on what functionality we think is needed on a client and what is part of the server and how much overlap there is. I am all for reuse and engineering optimization, but we might make things harder then needed as well.

seem like this is dated. pending close - will close within a week pending objectinos.


Using FsAutoComplete with dotnetcore version of FCS results in compiler errors

Repro steps

Build FsAutoComplete.Core/Suave with dotnetcore
Reference the newly compiled FsAutoComplete.Suave in ionides javascript process invoke rather than the non dotnet core version.
Run vs code first choosing an F# file so that the suave service starts up
Select a project.json file so that the project cracker is ran
Select a source file triggering the error

Expected behavior
No errors
Actual behavior
Bug seen in compiler: System.TypeInitializationException: The type initializer for '<StartupCode$FSharp-Compiler-Service-netcore>.$Reshapedmsbuild' threw an exception. ---> System.ArgumentException: An item with the same key has already been added. Key: 4.6
   at System.ThrowHelper.ThrowAddingDuplicateWithKeyArgumentException(Object key)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey](TSource[] source, Func`2 keySelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable`1 source, Func`2 keySelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable`1 source, Func`2 keySelector)
   at <StartupCode$FSharp-Compiler-Service-netcore>.$Reshapedmsbuild..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.FSharp.Compiler.ToolLocationHelper.TargetDotNetFrameworkVersionToSystemVersion(TargetDotNetFrameworkVersion version)
   at Microsoft.FSharp.Compiler.MSBuildResolver.HighestInstalledNetFrameworkVersionMajorMinor()
   at Microsoft.FSharp.Compiler.CompileOps.TcConfig..ctor(TcConfigBuilder data, Boolean validate)
   at Microsoft.FSharp.Compiler.CompileOps.TcConfig.Create(TcConfigBuilder builder, Boolean validate)
   at Microsoft.FSharp.Compiler.IncrementalBuilder.TryCreateBackgroundBuilderForProjectOptions(FrameworkImportsCache frameworkTcImportsCache, FSharpOption`1 scriptClosureOptions, FSharpList`1 sourceFiles, FSharpList`1 commandLineArgs, FSharpList`1 projectReferences, String projectDirectory, Boolean useScriptResolutionRules, Boolean isIncompleteTypeCheckEnvironment, Boolean keepAssemblyContents, Boolean keepAllBackgroundResolutions)

   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage)
   at System.Diagnostics.Debug.Assert(Boolean condition, String message)
   at Microsoft.FSharp.Compiler.CompileOps.OutputExceptionR@600(StringBuilder os, Exception _arg1)
   at Microsoft.FSharp.Compiler.CompileOps.OutputPhasedError(StringBuilder os, PhasedError err, Boolean flattenErrors)
   at Microsoft.FSharp.Compiler.FSharpErrorInfo.CreateFromException(PhasedError exn, Boolean warn, Boolean trim, range fallbackRange)
   at <StartupCode$FSharp-Compiler-Service-netcore>.$IncrementalBuild.-ctor@976-54.ErrorSinkImpl(PhasedError )
   at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ErrorLogger.ErrorRecovery(ErrorLogger x, Exception exn, range m)
   at Microsoft.FSharp.Compiler.IncrementalBuilder.TryCreateBackgroundBuilderForProjectOptions(FrameworkImportsCache frameworkTcImportsCache, FSharpOption`1 scriptClosureOptions, FSharpList`1 sourceFiles, FSharpList`1 commandLineArgs, FSharpList`1 projectReferences, String projectDirectory, Boolean useScriptResolutionRules, Boolean isIncompleteTypeCheckEnvironment, Boolean keepAssemblyContents, Boolean keepAllBackgroundResolutions)
   at Microsoft.FSharp.Compiler.SourceCodeServices.BackgroundCompiler.CreateOneIncrementalBuilder(FSharpProjectOptions options)
   at Microsoft.FSharp.Compiler.SourceCodeServices.BackgroundCompiler.getOrCreateBuilder(FSharpProjectOptions options)
   at <StartupCode$FSharp-Compiler-Service-netcore>.$Service.ParseAndCheckFileInProject@2431.Invoke(CancellationToken _ct)
   at <StartupCode$FSharp-Compiler-Service-netcore>.$Reactor.EnqueueAndAwaitOpAsync@139-2.Invoke(Unit unitVar0)
   at <StartupCode$FSharp-Compiler-Service-netcore>.$Reactor.loop@60-86.Invoke(FSharpOption`1 _arg2)
   at Microsoft.FSharp.Control.AsyncBuilderImpl.args@834-1.Invoke(a a)
   at <StartupCode$FSharp-Core>.$Control.loop@429-54(Trampoline this, FSharpFunc`2 action)
   at Microsoft.FSharp.Control.Trampoline.ExecuteAction(FSharpFunc`2 firstAction)
   at <StartupCode$FSharp-Core>.$Control.-ctor@515-1.Invoke(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

Known workarounds
None
Related information

Operating system OSX
Branch: Master
CoreCLR RTM
Visual Studio Code

I have seen this in my Fake work as well, fix was https://github.com/fsharp/FSharp.Compiler.Service/pull/597/commits/8074762d7613dc3e15120d2d44d440d4f8a829f8#diff-52a3b381c6bc6da5211d19ccdec6484dR2388 (see corresponding PR from don)

OMG, now the dictionary write about the MISSING KEY? that's amazing
System.ArgumentException: An item with the same key has already been added. Key: 4.6

@enricosada Did this work for you?

I tried this PR but it didn't help

Oh, I think the 1_5 version has to be 1_6 now.  Doh!

Yes, and console app are always netcoreapp1.0

See: https://github.com/fsharp/FSharp.Compiler.Service/commit/4872c87c65f2be554621e0bf20571037e49e1536#commitcomment-18134562

So getting rid of the duplicate key stops the error but now I just get nothing apart from a warning in vscode:
[Extension Host] {"Kind":"info","Data":"Parse aborted"}
threadService.ts:207 [Extension Host] rejected promise not handled with 1 second

So still dead in the water, no idea on whats wrong.
Bad.

So I fiddled with the dependencies and it looks like the project.json -> ProjOptions bit only works with non-wildcard version numbers.

old issue, closing


Add make checks

adds an argument CHECK_LEVEL that can determine which checks are performed.
add a CI that runs check-short

The problem with the mpi tasks is as follows:
The output for real_time/18-hhg.test is :
#10 1610.9 Using input file : ../../testsuite/real_time/18-hhg.02-td.inp
#10 1610.9 Executing: cd /tmp/octopus-testsuite-real_time-18-hhg.test.0vTT8K; OCT_PARSE_ENV=1 OCT_AccelDevice=0  /usr/bin/mpiexec -n 4   /opt/octopus/_build/testsuite/../src/octopus  > out 2> err
#10 1610.9 	Elapsed time:      0.0 s
#10 1610.9
#10 1610.9 Test run failed with exit code 256.
#10 1610.9 These are the last lines of output:
#10 1610.9
#10 1610.9 ----------------------------------------
#10 1610.9 ----------------------------------------
#10 1610.9
#10 1610.9 These are the last lines of stderr:
#10 1610.9
#10 1610.9 ----------------------------------------
#10 1610.9 --------------------------------------------------------------------------
#10 1610.9 There are not enough slots available in the system to satisfy the 4
#10 1610.9 slots that were requested by the application:
#10 1610.9
#10 1610.9   /opt/octopus/_build/testsuite/../src/octopus
#10 1610.9
#10 1610.9 Either request fewer slots for your application, or make more slots
#10 1610.9 available for use.
#10 1610.9
#10 1610.9 A "slot" is the Open MPI term for an allocatable unit where we can
#10 1610.9 launch a process.  The number of slots available are defined by the
#10 1610.9 environment in which Open MPI processes are run:
#10 1610.9
#10 1610.9   1. Hostfile, via "slots=N" clauses (N defaults to number of
#10 1610.9      processor cores if not provided)
#10 1610.9   2. The --host command line parameter, via a ":N" suffix on the
#10 1610.9      hostname (N defaults to 1 if not provided)
#10 1610.9   3. Resource manager (e.g., SLURM, PBS/Torque, LSF, etc.)
#10 1610.9   4. If none of a hostfile, the --host command line parameter, or an
#10 1610.9      RM is present, Open MPI defaults to the number of processor cores
#10 1610.9
#10 1610.9 In all the above cases, if you want Open MPI to default to the number
#10 1610.9 of hardware threads instead of the number of processor cores, use the
#10 1610.9 --use-hwthread-cpus option.
#10 1610.9
#10 1610.9 Alternatively, you can use the --oversubscribe option to ignore the
#10 1610.9 number of available slots when deciding the number of processes to
#10 1610.9 launch.
#10 1610.9 --------------------------------------------------------------------------
#10 1610.9 ----------------------------------------
#10 1610.9
#10 1610.9 No error check performed!

The cause is that the runners have only 4 processors and unfortunately some tests for eg this one (https://gitlab.com/octopus-code/octopus/-/blob/main/testsuite/real_time/18-hhg.test?ref_type=heads#L27) have hardcoded the values of 4 process for their tests. ( so we oversubscribed as the current docker file specifies running 2 tests at a time)
Two solutions:

use OCT_TEST_NJOBS=1 and let the whole test suite take longer
Allow oversubscription of mpi slots, via some environment variable (to be found out)

Simply setting NTASKS to 1 doesnt help https://github.com/fangohr/octopus-in-docker/actions/runs/8265653749/job/22611800437?pr=18

@fangohr the infrastructure here is more or less read.
Questions to discuss:

what do we do with failing tests due to tolerance?
how often should we run the tests ( failed CI disables merging)
which kind of test do we want to run? (short, long, full)

@fangohr the infrastructure here is more or less ready. Questions to discuss:

what do we do with failing tests due to tolerance?
how often should we run the tests ( failed CI disables merging)
which kind of test do we want to run? (short, long, full)

Great!

I'd like to report the  failing tests to our Bingo/Flakey issue
we could run the tests only manually for now (manual_dispatch) [until the flakey tests are fixed]
In the end, I want to run all. Based on the Octopus developers input it might be useful to run the short tests somehow separately from the long tests (as I thought I heard a suggestion the short tests are more reliable). All else equal, I'd run the 'short' tests in one workflow and the 'long' tests in another. (I assume full is the union of short and long?) But this is the least clear/important point for now.

Right now I'm running the short test and on the CI there are 10/149 failures

can we merge this?

need to resolve the merge conflicts


[Bug]: Query param org doesn't work for the users page

Follow-up of #4982
As a developer, I want to be able to navigate to a specific organizations users page by specifying the org query param, so that further navigation clicks are not necessary anymore and misunderstandings are avoided.
Preflight Checklist

[X] I could not find a solution in the documentation, the existing issues or discussions
[X] I have joined the ZITADEL chat

Environment
ZITADEL Cloud
Describe the bug
The org context isn't  set properly in the console.
To reproduce
Run e2e tests for humans or machines, but directly visit by org param instead of using the navigateToUsers function
Screenshots
No response
Expected behavior
No response
Version
No response
Operating System
No response
Relevant Configuration
No response
Additional Context
No response

@eliobischof Can you please add where you want to send it? Is this in the console or api?
@peintnermax maybe you know also what is meant?

@eliobischof Can you please add where you want to send it? Is this in the console or api?
@peintnermax maybe you know also what is meant?

Console. Read above 👆

@eliobischof did you try to use it in combination with a login_hint param as the user may not be available for the preselected user? IMO it works if the user with the corresponding rights is set.

@eliobischof did you try to use it in combination with a login_hint param as the user may not be available for the preselected user? IMO it works if the user with the corresponding rights is set.

I passed the iam admin user as login hint


Fix iPad preview removal on viewWillDisappear

fixes issue where preview remained on screen (but not visible) after viewWillDisappear on iPad.
This fixes #4

Let me know how that looks.

Thanks for getting this done @neilmorton! 👍


SQL queries being stored in memory

Hello
I have been trying to debug why my server memory has been going up every day and tracking down memory leaks. (It's at 800MB usage atm)
I dumped all of the server memory with GDB (from /proc/PID/maps) and the largest file was 400MB (which is half of the entire processes usage), inside I found tons of SELECT, UPDATE, and other statements handled by the MySQL plugin.  -d3 is off, so there is no reason it should be writing all of the SQL queries to memory.
root@eu [~/dumps]# strings 16157-09336000-2146e000.dump | grep -E 'SELECT|UPDATE' | wc -l

125381
The file contained 125,381 lines of SELECT/UPDATE queries. I saw queries that usually run during login, independent queries which are ran via commands, and everything else in between. Why are these being written to memory and being kept there permanently?  This is causing the memory usage to increase daily as more queries are ran by users.
Is this expected behavior from the plugin, or is there something possibly in the gamemode that could cause this? (For reference, -d3 is disabled on compilation, I also tried disabling my other plugins such as crashdetect, and it did not have any effect.)
Let me know if there's something obvious I'm missing that would cause this.

It seems like you've got a lot of MySQL cached results in memory. Are you using cache_save or mysql_query anywhere? If you don't destroy the caches through cache_delete, they'll just stay in memory forever.

I do use mysql_query, but I always clear it using cache_delete on every instance of those, these should not be in memory.

What version is your MySQL plugin on? Are there any errors/warnings in your mysql_log.txt?

R39-5
There is one warning in the log repeated every few minutes:
[WARNING] cache_get_field_content_int - no active cache
Although some of the MySQL queries that appeared in the dump would not generate that warning.

Code like this can cause that warning:
new Cache:cache = mysql_query(sql, "SELECT stuff");
res = cache_get_field_content_int(0, "field1");
cache_delete(cache);
res2 = cache_get_field_content_int(0, "field2"); //this causes a "no active cache" warning

Please make sure that you fix those warnings, as they could indicate that you somewhere misplaced a cache_delete or overridden a cache with another, e.g.
new Cache:cache = mysql_query(sql, "SELECT * FROM table_a");
val1 = cache_get_field_content_int(0, "field1");

new Cache:cache2 = mysql_query(sql, "SELECT * FROM table_b");
val 2 = cache_get_field_content_int(0, "field1");
cache_delete(cache2);

val3 = cache_get_field_content_int(0, "field2"); //no active cache warning
cache_delete(cache);

I had thought of that, but some of the queries that are saving to memory are using mysql_pquery, so that should not apply.

The query string itself is stored in the cache and you can retrieve it through cache_get_query_string. And even if every one of your queries stored in memory would be 1000 characters long, it wouldn't fill up 400MB (125381 * 1000 = 125.4 * 10^6).
Could you also do the following?

Enable debug logging
Run your server for a while to pile up memory leaks
Force-kill the server (so that it won't shut down properly)
Open the MySQL log file
Count the occurrences of CMySQLResult::CMySQLResult()
Count the occurrences of CMySQLResult::~CMySQLResult()
Share your results here

@frostgaming any updates on this?

This issue was found to be related to d3. Closing this.


Examples/app: Record with ID 1 not shown

Hello,
in the examples app the table todo_entries does not show the record in the listview on Windows if id=1. I try by removing your default 1 (which is not shown on Windows) and by adding a new record with an ID=1
Otherwise: awesome work and KUDOS

            Many thanks SimonMit freundlichen Grüssen ---------------------------Gernot Am 12.07.22 um 17:53 schrieb Simon Binder

                Von: "Simon Binder"<EMAIL_ADDRESS>12. Juli 2022An: "simolus3/drift"<EMAIL_ADDRESS>"Author" ***@***.***>,"baeckerg"<EMAIL_ADDRESS>Re: [simolus3/drift] Examples/app: Record with ID 1 not shown (Issue #1925)

Thanks for the report, and good catch! This is a bug in the example. It only shows the entries in the currently selected category (the selection can be changed in the navigation drawer), but the query to load todo entries in the current category was using a wrong join.
I've fixed this in a3109b4.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>


Adding accessrule based on application instead of destination port

Hello
I am trying to post/put the access rule  to add the application ( eg. Facebook)  instead of ports based rule.
I checked the unit test script and don't see the option for the application.
Would it be possible to add the access rule to reference the application instead of the destination port?
Thanks for your help

Though the VALID_FOR_JSON lists an "application" variable there is no code in the AccessRule class to use it.  Are you interested in developing that feature out?

Thanks for looking into this.
I am still learning Python and have very basic knowledge of it. I would love to help in anyway to develop this feature if someone can guide/help me.
Thanks again.

I hear ya!  When I started this project I was a novice (probably still am) in programming in Python.  That said, check out the AccessRules file (https://github.com/daxm/fmcapi/blob/master/fmcapi/api_objects/policy_services/accessrules.py) and try to read through it.  I think you should be able to see how to add a new "sub-section" to the AccessRules Class.
Give it a shot!  If you can get it to work in your environment just ping me and I'll help you get your changes integrated into fmcapi project.

I hear ya!  When I started this project I was a novice (probably still am) in programming in Python.  That said, check out the AccessRules file (https://github.com/daxm/fmcapi/blob/master/fmcapi/api_objects/policy_services/accessrules.py) and try to read through it.  I think you should be able to see how to add a new "sub-section" to the AccessRules Class.
Give it a shot!  If you can get it to work in your environment just ping me and I'll help you get your changes integrated into fmcapi project.

I hear ya!  When I started this project I was a novice (probably still am) in programming in Python.  That said, check out the AccessRules file (https://github.com/daxm/fmcapi/blob/master/fmcapi/api_objects/policy_services/accessrules.py) and try to read through it.  I think you should be able to see how to add a new "sub-section" to the AccessRules Class.
Give it a shot!  If you can get it to work in your environment just ping me and I'll help you get your changes integrated into fmcapi project.

Yes  I agree  and will  try.
I was looking into the accessrules.py and added below
from fmcapi.api_objects.object_services.applications import Applications
!
def application_name(self, action, name=""):
"""
Add/modify name to applicatonname field of AccessRules object.
    :param action: (str) 'add', 'remove', or 'clear'
    :param name: (str) Name of Application in FMC.
    :return: None
    """
    logging.debug("In application_name() for AccessRules class.")
    if action == "add":
        app = Applications(fmc=self.fmc)
        app.get(name=name)
        if "id" in app.__dict__:
            if "app_name" in self.__dict__:
                new_app = {"name": app.name, "id": app.id, "type": app.type}
                duplicate = False
                for obj in self.app_name["objects"]:
                    if obj["name"] == new_app["name"]:
                        duplicate = True
                        break
                if not duplicate:
                    self.app_name["objects"].append(new_app)
                    logging.info(
                        f'Adding "{name}" to applicationname for this AccessRules.'
                    )
            else:
                self.applicationname = {
                    "objects": [
                        {"name": app.name, "id": app.id, "type": app.type}
                    ]
                }
                logging.info(
                    f'Adding "{name}" to applicationname for this AccessRules.'
                )
        else:
            logging.warning(
                f'Application: "{name}", '
                f"not found.  Cannot add to AccessRules."
            )

And I tried to create the accessrule with NTP application and see below while executing the script :
INFO:root:GET success. Object with name: "test-POLICY" and id: "0050569D-669F-0ed3-0000-146028892476" fetched from FMC.
INFO:root:GET success. Object with name: "test-1" and id: "641c654e-4f4a-11ea-a9d3-d4e43ad758b1" fetched from FMC.
INFO:root:Adding "test-1" to sourceZones for this AccessRules.
INFO:root:GET success. Object with name: "test-2" and id: "40facaec-4f4a-11ea-a9d3-d4e43ad758b1" fetched from FMC.
INFO:root:Adding "test-2" to destinationZones for this AccessRules.
INFO:root:GET success. Object with name: "NTP" and id: "767" fetched from FMC.
INFO:root:Adding "NTP" to applicationname for this AccessRules.
INFO:root:POST success. Object with name: "test-rule" and id: "" created in FMC.
INFO:root:Test ACPRule done.
But when I check the rule with GUI,  I don't see NTP application added to rule.
Still troubleshooting to see if I find what I am doing wrong.
Thanks

I believe what you're doing wrong is re-using the "objects" key, it should be "applications"

Thanks for your help.
I updated the function to below and replace the objects with applications.
def application_name(self, action, name=""):
"""
Add/modify name to applicatonname field of AccessRules object.
    :param action: (str) 'add', 'remove', or 'clear'
    :param name: (str) Name of Application in FMC.
    :return: None
    """
    logging.debug("In application_name() for AccessRules class.")
    if action == "add":
        app = Applications(fmc=self.fmc)
        app.get(name=name)
        if "id" in app.__dict__:
            if "app_name" in self.__dict__:
                new_app = {"name": app.name, "id": app.id, "type": app.type}
                duplicate = False
                for obj in self.app_name["applications"]:
                    if obj["name"] == new_app["name"]:
                        duplicate = True
                        break
                if not duplicate:
                    self.app_name["applications"].append(new_app)
                    logging.info(
                        f'Adding "{name}" to applicationname for this AccessRules.'
                    )
            else:
                self.applicationname = {
                    "applications": [
                        {"name": app.name, "id": app.id, "type": app.type}
                    ]
                }
                logging.info(
                    f'Adding "{name}" to applicationname for this AccessRules.'
                )
        else:
            logging.warning(
                f'Application: "{name}", '
                f"not found.  Cannot add to AccessRules."
            )

Still samething.
INFO:root:GET success. Object with name: "NTP" and id: "767" fetched from FMC.
INFO:root:Adding "NTP" to applicationname for this AccessRules.
INFO:root:POST success. Object with name: ""test-rule" and id: "" created in FMC.
INFO:root:Test ACPRule done.

Can you do a show_json on the ACP rule before it's posted?

Try this:
def application(self, action, name=""):
        """
        Add/modify name to applications field of AccessRules object.
        :param action: (str) 'add', 'addgroup', 'remove', or 'clear'
        :param name: (str) Name of Application in FMC.
        :return: None
        """
        logging.debug("In application() for AccessRules class.")
        if action == "add":
            app = Applications(fmc=self.fmc)
            app.get(name=name)
            if "id" in app.__dict__:
                if "applications" in self.__dict__:
                    new_app = {"name": app.name, "id": app.id, "type": app.type}
                    duplicate = False
                    if "applications" not in self.applications:
                        self.__dict__["applications"]["applications"] = []
                    for obj in self.applications["applications"]:
                        if obj["name"] == new_app["name"]:
                            duplicate = True
                            break
                    if not duplicate:
                        self.applications["applications"].append(new_app)
                        logging.info(
                            f'Adding "{name}" to applications for this AccessRules.'
                        )
                else:
                    self.applications = {
                        "applications": [
                            {"name": app.name, "id": app.id, "type": app.type}
                        ]
                    }
                    logging.info(
                        f'Adding "{name}" to applications for this AccessRules.'
                    )
            else:
                logging.warning(
                    f'Application: "{name}", '
                    f"not found.  Cannot add to AccessRules."
                )

It worked.
I just need to understand below code to better understand the flow.
if "applications" in self.dict:
new_app = {"name": app.name, "id": app.id, "type": app.type}
duplicate = False
if "applications" not in self.applications:
self.dict["applications"]["applications"] = []
for obj in self.applications["applications"]:
if obj["name"] == new_app["name"]:
duplicate = True
break
if not duplicate:
self.applications["applications"].append(new_app)
logging.info(
f'Adding "{name}" to applications for this AccessRules.'
)
else:
self.applications = {
"applications": [
{"name": app.name, "id": app.id, "type": app.type}
]
}
else:
self.applications = {
"applications": [
{"name": app.name, "id": app.id, "type": app.type}
]
}
logging.info(
f'Adding "{name}" to applications for this AccessRules.'
)
I'll also try to add remove and clear action using the your suggestions.
Thanks a lot.

The primary difference between what I wrote and what you wrote was just the name of the property.
If you turn around and get the newly created ACE from the FCM you'll see the JSON it returns is:
{
    "applications": {
        "applications": []
    }
}`

Compare that to the JSON that you're sending and you'll see what I mean.

MysticRyuujin, thanks for helping out here!  Looks like you both have almost gotten the code snippet done.
MSD101, when you have the code how you like it, do you want to do a Pull Request or do you want to post your snippet here and I'll add it in for you.  One of the cool things about doing a PR is that your name will be added to the contributors list.  (You can say you've contributed code to an open source project!)

Thanks MysticRyuujin and daxm. Appreciate all your help.
I was able to successfully add and test the add/remove/clear action for the application. It's working fine.
I made below Changes to accessrules.py.  Please review just to make sure I didn't do anything wrong.
I can also do the pull request ( never done it before), if you can walk me through the process.
Accessrules.py changes: -
from fmcapi.api_objects.object_services.applications import Applications
def application(self, action, name=""):
    """
    Add/modify name to applications field of AccessRules object.
    :param action: (str) 'add', 'remove', or 'clear'
    :param name: (str) Name of Application in FMC.
    :return: None
    """
    logging.debug("In application() for AccessRules class.")
    if action == "add":
        app = Applications(fmc=self.fmc)
        app.get(name=name)
        if "id" in app.__dict__:
            if "applications" in self.__dict__:
                new_app = {"name": app.name, "id": app.id, "type": app.type}
                duplicate = False
                if "applications" not in self.applications:
                    self.__dict__["applications"]["applications"] = []
                for obj in self.applications["applications"]:
                    if obj["name"] == new_app["name"]:
                        duplicate = True
                        break
                if not duplicate:
                    self.applications["applications"].append(new_app)
                    logging.info(
                        f'Adding "{name}" to applications for this AccessRules.'
                    )
            else:
                self.applications = {
                    "applications": [
                        {"name": app.name, "id": app.id, "type": app.type}
                    ]
                }
                logging.info(
                    f'Adding "{name}" to applications for this AccessRules.'
                )
        else:
            logging.warning(
                f'Application: "{name}", '
                f"not found.  Cannot add to AccessRules."
            )
    elif action == "remove":
        app = Applications(fmc=self.fmc)
        app.get(name=name)
        if "id" in app.__dict__:
            if "applications" in self.__dict__:
                applications = []
                for obj in self.applications["applications"]:
                    if obj["name"] != name:
                        applications.append(obj)
                self.applications["applications"] = applications
                logging.info(
                        f'Removed "{name}" from applications for this AccessRules.'
                    )
            else:
                 logging.info(
                    "Application doesn't exist for this AccessRules.  Nothing to remove."
                )
        else:
            logging.warning(
                f"Application, {name}, not found.  Cannot remove from AccessRules."
            )
    elif action == "clear":
        if "applications" in self.__dict__:
            del self.applications
            logging.info("All Applications removed from this AccessRules object.")

Let me add it in as I think it would be best served as a subroutine in
the AccessRules class instead of being imported. (All the other Access
Rule features are there too.)  I'm sure your way is more versatile but
it would be a 1-off.  I'd love to have you issue a PR.  In order to do
so you'll need to fork the project, make the changes in your fork, and
than issue a pull request.
On 4/21/20 3:33 PM, MSD101 wrote:

Thanks MysticRyuujin and daxm. Appreciate all your help.
I was able to successfully add and test the add/remove/clear action
for the application. It's working fine.
I made below Changes to accessrules.py. Please review just to make
sure I didn't do anything wrong.
I can also do the pull request ( never done it before), if you can
walk me through the process.
Accessrules.py changes: -
from fmcapi.api_objects.object_services.applications import Applications
|def application(self, action, name=""): """ Add/modify name to
applications field of AccessRules object. :param action: (str) 'add',
'remove', or 'clear' :param name: (str) Name of Application in FMC.
:return: None """ logging.debug("In application() for AccessRules
class.") if action == "add": app = Applications(fmc=self.fmc)
app.get(name=name) if "id" in app.dict: if "applications" in
self.dict: new_app = {"name": app.name, "id": app.id, "type":
app.type} duplicate = False if "applications" not in
self.applications: self.dict["applications"]["applications"] = []
for obj in self.applications["applications"]: if obj["name"] ==
new_app["name"]: duplicate = True break if not duplicate:
self.applications["applications"].append(new_app) logging.info(
f'Adding "{name}" to applications for this AccessRules.' ) else:
self.applications = { "applications": [ {"name": app.name, "id":
app.id, "type": app.type} ] } logging.info( f'Adding "{name}" to
applications for this AccessRules.' ) else: logging.warning(
f'Application: "{name}", ' f"not found. Cannot add to AccessRules." )
elif action == "remove": app = Applications(fmc=self.fmc)
app.get(name=name) if "id" in app.dict: if "applications" in
self.dict: applications = [] for obj in
self.applications["applications"]: if obj["name"] != name:
applications.append(obj) self.applications["applications"] =
applications logging.info( f'Removed "{name}" from applications for
this AccessRules.' ) else: logging.info( "Application doesn't exist
for this AccessRules. Nothing to remove." ) else: logging.warning(
f"Application, {name}, not found. Cannot remove from AccessRules." )
elif action == "clear": if "applications" in self.dict: del
self.applications logging.info("All Applications removed from this
AccessRules object.") |
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/daxm/fmcapi/issues/72#issuecomment-617425843, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAZOMZ6MPZ226J7RSO63U6TRNYGJLANCNFSM4MK6IHQA.

Daxm, I tried to do the pull request based on your above suggestion. Let me know if I did it correctly or not?
Also while configuring the applications in access rule policy there are two options 1) applications and 2) applicationfilters.
I added separate options for application ( add/remove/clear) and for applicationfilters ( addappfilter/removeappfilter/clear) under accessrules.py. Not sure if you want to include both options to have the support to add applicationfilters while configuring the access rules.
Thanks

I don't see a PR incoming.  Not sure where it went.  :-)

@MSD101,
Your changes have been committed and published.  Can you triple check they work from the official release?  If so, then we can close this issue.

Thank you. Looks good.


Can I use this weights as pretrained model to transfer my task ?

Thanks for your work  ! I wonder if there offer a code script that can used for transfer learning on my own dataset. If not I am very glad to contribute to this
Best

Hi @xiaoerlaigeid, maybe we can provide the training script. Which of the models in medigan would you like to use?

Thanks for your reply. I may try two types of models.

I attempt to train a DCGAN (256x256 or 512x512 image size). I may need to modify some layers.
Another model is C-DCGAN.

Nice! You may check out the training code for DCGAN and C-DCGAN (128x128 or 224x224) that we have in this repo.

@RichardObi Another question regarding to your paper "High-resolution synthesis of high-density breast mammograms: Application to improved fairness in deep learning based mass detection" How you generated the annotation bounding box ? Manually annotated or generated by Cyclegan ?

In this work we translated low density breast to high density breast mammograms with cycleGAN. The masses were annotated as bounding box in the source domain (e.g. low density breast). We used the same source domain bounding boxes as annotations in the target domain (after cycleGAN translation).

Thanks a lot! It seems that link I cannot open https://github.com/zuzaanto/mammo_gans/blob/main/gan_compare/scripts/train_gan.py

Sorry, here the link to the public repository.

Hi @xiaoerlaigeid. Yes, the whole breast image is processed in order to translate the breast density. The default output pixel dimension is 1332x800, but you can also pass another image_size=[1332, 800] to change the rescaling of your input image before translation (see here)


chore(main): release uniform 0.3.1

:robot: I have created a release beep boop
0.3.1 (2024-05-21)
Bug Fixes

deps: update dependency @react-aria/visually-hidden to v3.8.12 (0518f58)
deps: update dependency react-hook-form to v7.51.4 (5c3ecb8)
deps: update dependency react-icons to v5.2.1 (ebb3e80)
uniform: add @nextui-org/theme as dep (13bf2d2)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/fuf-stack/uniform/releases/tag/uniform-v0.3.1 :sunflower:


Need the dns server to listen and allow query on all networks

In a kubernetes context, the DNS server is started in a container and only knows the kubernetes network (not managed by bluebanquise but by kubernetes)
In this case, we must delete the listen-on and allow_query section and keep the default behavior to be able to function
for example
cat /etc/ansible/kubernetes-dns.patch

--- roles/core/dns_server/templates/named.conf.j2.bb    2020-02-05 14:51:21.871668303 +0100
+++ roles/core/dns_server/templates/named.conf.j2       2020-02-05 14:52:41.327668303 +0100
@@ -12,14 +12,14 @@
 {% set main_ntw = (ntw | first | join | trim) %}

 options {
-  listen-on port 53 {
-    <IP_ADDRESS>;
-{% for network in (networks | select('match',(j2_current_iceberg_network+'-[0-9]+')) | list | unique | sort) %}
-{% if networks[network]['is_in_dns'] is defined and networks[network]['is_in_dns'] == true %}
-    {{networks[network]['services_ip']['dns_ip']}};
-{% endif %}
-{% endfor %}
-  };
+  #listen-on port 53 {
+    #<IP_ADDRESS>;
+#{% for network in (networks | select('match',(j2_current_iceberg_network+'-[0-9]+')) | list | unique | sort) %}
+#{% if networks[network]['is_in_dns'] is defined and networks[network]['is_in_dns'] == true %}
+    #{{networks[network]['services_ip']['dns_ip']}};
+#{% endif %}
+#{% endfor %}
+  #};

   listen-on-v6 port 53 { ::1; };
   directory    "/var/named";
@@ -27,14 +27,14 @@ options {
   statistics-file "/var/named/data/named_stats.txt";
   memstatistics-file "/var/named/data/named_mem_stats.txt";

-  allow-query {
-    localhost;
-{% for network in (networks | select('match',(j2_current_iceberg_network+'-[0-9]+')) | list | unique | sort) %}
-{% if (networks[network]['is_in_dns'] is defined and not none) and (networks[network]['is_in_dns'] == true) %}
-    {{networks[network]['subnet']}}/{{networks[network]['prefix']}};
-{% endif %}
-{% endfor %}
-  };
+  #allow-query {
+    #localhost;
+#{% for network in (networks | select('match',(j2_current_iceberg_network+'-[0-9]+')) | list | unique | sort) %}
+#{% if (networks[network]['is_in_dns'] is defined and not none) and (networks[network]['is_in_dns'] == true) %}
+    #{{networks[network]['subnet']}}/{{networks[network]['prefix']}};
+#{% endif %}
+#{% endfor %}
+  #};

 {% if external_dns.dns_server is defined and not none and external_dns.dns_server %}
   forwarders {

Hello @loar38 ,
Would adding the k8s network configuration to your inventory be an acceptable solution?
We can still add a tunable to toggle the use of listen-on and allow-query, but listening on all interfaces and answering to any request might have undesirable side-effects one need to understand before disabling those options.

Hello @actatux ,
After several tests with an additional network and fake nic on this network, it seems ok for chrony, dns and dhcp but we found a bug on the advance_nic role.
As the IP on the host is managed by kubernetes we can't set an IP for the new nic and then the role generate a wrong ifcfg file for the fake nic.
An other remark is that for the dns as we don't know in advance the IP of the container, we set a subnet as dns_ip
example:
networks:
  ice1-k8s:
    subnet: <IP_ADDRESS>
    netmask: <IP_ADDRESS>
    prefix: 16
    is_in_dhcp: false
    is_in_dns: true
    services_ip:
      dns_ip: <IP_ADDRESS>/16

If you are ok, I will close this issue and opena new on for the nic role.
Regards
Laurent

Hello @loar38 ,
There is no advance_nic role, do you mean nic?
About your dns issue, I'm not familiar with k8s, but I find it surprising you cannot set an IP for the service, especially dns. Any other service can change its IP dynamically, all you would have to do is to update the map and reload the dns configuration. But for dns, if your IP should be set randomly, how would you configure the nameserver in /etc/resolv.conf?
That would not be an issue in an ephemeral HPC instance in the cloud, but for on-premise configuration, you should definitely consider using static IP address for your dns servers.

Hello @actatux ,
It seems that the advance_nic role has be moved to the nic role en 1.2 version.
Thank you for your remark
You have right, all services have an external IP to be adressed by equipement outside the k8s internal network.
The IP service (external) for dns are static and not allocated by kubernetes
But pods knows only the k8s internal network.
This is why the service need to allow or listen the k8s internal network.
When I talk about IP managed by k8s, I talk about the internal IP for the Pods not the external IP of the service.


Renamed: "New connection" to "Add connection" to reflect current UI

Summary of changes:

Renamed: "New connection" to "Add Connection" (1 occurrence)

@NenoLoje : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@markingmyname
Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"

@markingmyname What version do you run?
I'm running this one (and it says there are no updates available):

The big blue button clearly states "Add connection" (whereas the tooltip says "New connection"):

@NenoLoje
I see what you are referring to now.
I am more referencing the icon at the top showing "New Connection" than the blue bar "Add Connection."
But I know both can work.
this si good feedback to give to the PG.
Mind if I request to submit a feature request to the Azure Data Studio repo

Mind if I request to submit a feature request to the Azure Data Studio repo

Done: https://github.com/microsoft/azuredatastudio/issues/19242
Thanks, @markingmyname!


Adding month wise search filter buttons.

Is your feature request related to a problem? Please describe.
we don't have different months buttons where we can filter month wise internships.
Describe the solution you'd like
I will add Jan to Dec month filter buttons, if user click on Jan then it will filter Jan month internships and open source programs.
** Add screenshot

Please assign above issue on me.

You have created too many issues at once, first complete the previous ones that are assigned after that you will be assigned this @veera6513


assignment_4.2

Solve the given problems related to docker
Run docker command, record it and submit
Create a docker container
create docker image

Add Full Description(copy and paste whole assignment description)
Link your PR to the Issue

Done sir


Evaluation on Existing Elements

Note: this evaluation was done a long time ago, so it is probably outdated.
mostly considering how often they'll be used, how easily replaceable they are by
other things, and if I feel that they are really necessary to keep around.
I recommend removing the following:

× (Asterisk Literal) - it just seems kind of pointless and overspecialized TBH, just use *
¤ (Empty String) - just doesn't seem all that valuable, just use ``
is ċ (Not One) that useful?
is ₂ (Is Even) that useful when parity exists?
is ₃ (Divisible By three) even useful besides FizzBuzz?
is ₅ (Divisible By Five) even useful besides FizzBuzz?
ǒ (Modulo 3) - is this needed

I'm not too sure if the following are that important/needed:

« (Base Compressed String)
some of the ranges could possibly be removed although it'll cost more bytes in some cases which might not be worth it
I doubt triplicate is that popular but it's probably a pretty core feature to have in a stack-based language
push -1 is potentially not all that useful but also it could probably be made obsolete with different number syntax much like how Jelly does it
ð (Space) - could just be \  so I'm not sure it warrants the byte
¶ (Newline) - could just be [NL] so I'm not sure it warrants the byte
if the register is not popular you could free some bytes by just deleting it
is the global array used much?
FizzBuzz constants could be removed but I assume you don't want to
some of the k-constants might not be all that useful but I don't think there's a need to remove them
same goes for ∆-digraphs, the quadratic/polynomial solvers seem potentially not that useful (though they'd be really difficult to implement without built-ins so it could be useful)
the bracketify ø-digraphs might not be necessary

I propose potential changes to the following:

max/min by tail - could that just be max/min by key being reverse instead? I feel like that'd be more useful

Any I haven't listed here I either missed or I think they're necessary or at
least important enough that they shouldn't really be considered for deletion.

is ċ (Not One) that useful?

I use it quite often.
The global array is useless except for pushing [] lol

¤ (Empty String) - just doesn't seem all that valuable, just use ``
Rather useful in ASCII art challenges, but I'd degrade it to a digraph.

Side note: I'm a bit sceptical of z. It doesn't have any overloads and I've never seen it being used before. It's also the third least common element without any overloads.

z is extremely useless as we all know, we're planning on even replacing it in v2 maybe

https://github.com/jfioasd/jfioasd.github.io/blob/main/vyxal_order.txt
Divisible by 3 is relatively useful (interestingly), though divisible by 5 is not used often.


Full read SSRF in avatar upload

URLs for avatar upload are not restricted in any way. The attacker can set this to an arbitrary internal URL, eg. cloud metadata endpoint and the server will fetch it and store it on the server.
Steps to reproduce

Set the avatar URL to an internal address, eg. http://<IP_ADDRESS>/latest/meta-data/iam/security-credentials/baskinc-role

This is the request that's sent under the hood:

Go to /files/images/avatar/built-in/admin.png where admin is the username. This attack can be executed by a lower-privileged user as well.

The response from the internal address will be stored there.

This is not a bug

@starbassma @gregxsunday if you have any further security-related reports, please follow intructions here: https://github.com/casdoor/casdoor/issues/1190 . This issue is valuable. We can continue the dicussion via Email. GitHub is not a good place to discuss those things because a lot of malicious attackers may utilize the information you have leaked to attack the systems.


How to add files in a dependency containing json files to jsonSchema2Pojo plugin source

Hi,
I want to add files in a dependency containing json files to jsonSchema2Pojo plugin source
example:
jsonSchema2Pojo {
source "org.example:json:version"
}

Is this possible?

Sorry @anup1245, I don't understand what you are trying to achieve here. Could you explain in a little more detail?

The way I understood the question:
Is it possible to point source of jsonSchema2Pojo plugin at a gradle/maven managed dependency which contains json files.
Given example is from gradle

Hi @joelittlejohn its like what @unkish said.
We have a jar consisting of json files, wanted to see if that jar present in artifactory can be used as a dependency for json source files in the plugin

@anup1245 I'm afraid this is not supported, as jsonSchema2pojo plugin does not:

deal with dependency management/resolution
support packaged files (there's a lot of them: zip, tar, 7z, jar, ...)

Perhaps it is possible to:

resolve artifact by means of gradle (see gradle discussion[^1])
extract it to temp. directory
point jsonSchema2pojo plugin at temp. directory

Alt. it might be possible to write own extension of plugin that would support desired functionality.
[^1]: It may be out of date in which case it'd be worth to ask on gradle forums about topic

Seems like #942 had similar request (for maven) and there was a solution/workaround proposed


Fix links Step 4 of SSO Guides

Also some tiny mistakes saml -> oidc in oidc guide

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


UIGP: Allow for different variance along different input feature dimensions

Currently, the UIGP class extends the standard Gaussian Process model to handle uncertain inputs. However, it assumes that the variance (sigma_x) is the same for all input feature dimension. It would be a good idea to extend it to scenarios where we expect different variance for different input parameters.

Close via #74


TabularPandas not working in 0.0.17

Moving #297 as a separate item.
The following works in 0.0.13 and doesn't  in current master (0.0.17),  which seems to be the suggested approach here: https://dev.fast.ai/tabular.core
test = np.random.randn(1000,4)
test_df = pd.DataFrame(test, columns=['x1','x2','x3','y'])
splits = RandomSplitter(valid_pct=0.1)(range_of(test_df))
to = TabularPandas(test_df, [], None, ['x1','x2','x3'], y_names='y', splits=splits,)
dls = to.dataloaders(bs=256)
dls.valid.show_batch()

The following which is in the beginner tutorial fails with the same error:
dls = TabularDataLoaders.from_df(test_df, '.', [], None,['x1','x2','x3'], y_names='y', splits=splits,bs=256)
dls.valid.show_batch()

Stack :
https://pastebin.com/76JBZMFH

Thanks for flagging, should be fixed now :)

thanks for  the quick fix


Dependecies are available as query params?

Example
Here is a code from the official Fastapi relational tutorial
@app.get("/users/", response_model=List[schemas.User])
def read_users(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)):
    users = crud.get_users(db, skip=skip, limit=limit)
    return users

Description
db is supposed to be a SQLAlchemy session, but it will be also available to be set as a URL parameters. This seems like potentially a security issue. Basically one can pass GET /users/?db=foo which will cause an internal server error because "foo" does not have query or add attributes that are needed from a SQLAlchemy session. The question is if there can be a string that can be passed as db and gets de-serialized into a Python object that has the Session interface? How can the "db" dependency be inaccessible as a http query param?
Environment

OS: Linux
FastAPI Version 0.61.2

To know the FastAPI version use:
python -c "import fastapi; print(fastapi.__version__)"

Python version: 3.8.6

Why do you think it will be accessible as a query parameter?

It showed up in the openapi docs as a parameter you can set.
Sep Dehpour

On Nov 26, 2020, at 5:15 AM, Elliana May<EMAIL_ADDRESS>wrote:

Why do you think it will be accessible as a query parameter?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

If it has shown up as a query parameter, that means you have implemented it incorrectly - perhaps you'd like to show us some code that demonstrates your issue?

Here is the actual code:
@app.post(
    "/projects/",
    response_model=ProjectSchemaFull,
    response_model_exclude_unset=True)
def patch_project(
        item: ProjectSchemaOptional,
        session: Session = Depends(get_session_for_fastapi)):

What does your get_session_for_fastapi function look like? This code alone won't cause the issue you describe

session_factory = sessionmaker(bind=engine)
Session = scoped_session(session_factory)

def get_session_for_fastapi(session=None):
    """
    A session context manager.

    Example usage:

    with get_session_for_fastapi() as session:
        ...
    """
    if session:
        yield session
    else:
        try:
            session = session_factory()
            yield session
        except Exception:
            session.rollback()
            raise
        else:
            if settings.TESTING:
                session.flush()
            else:
                session.commit()
        finally:
            session.close()

I'm going to stick only on the previous message.
settings.TESTING is not necessary. You can override your dependency: https://fastapi.tiangolo.com/advanced/testing-database/#create-the-new-database-session
Besides, based on your docstrings, you want this: https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/?h=+context+manager#using-context-managers-in-dependencies-with-yield

@Kludex is correct with all of the above.
Additionally, in your code sample, you have declared a query parameter, session. This isn't a bug.

I found the lines that cause the issue.
def get_session_for_mause_and_kludex(session=None):
    """
    Note: this is not a context manager.
    """
    if session:  # <---- THIS LINE
        yield session  # <---- AND THIS LINE
    try:
        session = session_factory()
        yield session
    except Exception:
        session.rollback()
        raise
    else:
        session.commit()
    finally:
        session.close()

With those 2 lines, the session (what is called in the FastAPI tutorial as "db") can be set as a URL parameter. Why?
If I comment those 2 lines, everything works fine. Please ignore the settings.TESTING and the mention of Context manager in the previous example. Those are not related to this bug.

Those two lines aren't your issue - the session=None parameter you have declared is.
That is how you declare URL parameters in FastAPI, even in subdependencies - this is not a bug

I see. It was not clear to me that the dependencies' parameters will end up as URL params. Is it mentioned in the docs? Perhaps I missed it. Thanks for the clarification.

It's the first example in the dependencies section of the documentation: https://fastapi.tiangolo.com/tutorial/dependencies/#create-a-dependency-or-dependable

Thanks for the help here everyone! :clap: :bow:
Thanks for reporting back and closing the issue :+1:


Download buttons should work

[ ] #17
[ ] #18
[ ] Download kicad zip should work
[ ] Download kicad_mod footprint should work

@seveibar By download you mean that a .tsx file should be downloaded and similarly a .json for circuit?

@imrishabh18 thinking about this more, I don't think we should support that as a feature because snippets will eventually be able to have multiple files and people can literally just ctrl-c/cmd-c in the short term. I removed that checklist item

Yeah, I thought by download you mean't to download the file. Which is not required as you can copy paste

@seveibar  Im going to fix this issue to be clear no .tsx file because people can just copy and paste right ?

Yep!