Be able to generate pacts when consumer client code fails

My team would like to use our pact tests to verify that our client code is correct, but we would also like to be able to generate and publish the pacts before we have finished implementing the client code.  During the period where our client code does not work, we currently aren't able to publish the pacts because our client code sends the incorrect body to the mockServer.
We are currently able to accomplish this in our Ruby code as described in the documentation here: https://docs.pact.io/documentation/usage_ruby.html -- at Step 5, we have a spec that runs our client code & generates the pact file -- even though the spec fails because we have not finished implementing the client code.
Is it possible to have this feature introduced into the pact-jvm-consumer-junit module?

I've had a chat to the maintainer of the Ruby version, and it seems that that behavior is a defect. If the spec fails, the pact should not be written. This may be changed in a future version of Pact-Ruby.
I could add a property that can be set to enable this behavior.

I don't understand how the pacts can be written. I've just created a build that shows that they aren't https://travis-ci.org/pact-foundation/pact-ruby-e2e-example/builds/343266614

I believe the passing interactions are written, but not the failing ones. Could this be what you are talking about?

You can see the passing interactions written to the pact file here, but the failing ones are not https://travis-ci.org/pact-foundation/pact-ruby-e2e-example/builds/343267328
I think this may be a case of misused terminology. A "pact" is a file made up of many "interactions" (request/response pairs). You want the passing interactions to be written to the pact file.

I would suggest that you just disable your failing tests and then the pact should be written.

Hmm.  Maybe I'm not understanding the intended use of these tests.  We are trying to have the tests both verify our client code is doing the correct thing as well as generate the pacts to facilitate independent development for the provider & consumer.
We generally try to work out the pacts as early as possible in our development workflow, which is typically before either the provider or consumer has begun to implement their code.  We had imagined we could set up the pact tests to generate the documentation & have them linked to stubs of the client code, so that they would also serve as acceptance tests of sorts for that code...
It seems like in order to accomplish these two things, we'll need to run the tests for each interaction twice -- once with the in-progress client code (expected to fail until we implement correctly), and then once with posting the expected request for that interaction so that the pacts will be generated.  Then as we implement consumer code for interactions, we can remove the extra test as the consumer code itself will generate the pact.
It seems like our workflow/use case doesn't quite fit the paradigm?

We are trying to have the tests both verify our client code is doing the correct thing as well as generate the pacts to facilitate independent development for the provider & consumer.

This is exactly what pact is designed for, no misunderstanding there.
When you say "client code" what do you mean exactly? Generally, we'd recommend creating a client class for the service (eg. AnimalServiceClient) and using pact to unit test just that client class. That means there is barely any code that needs to be written in the client to get the pact created. Is this what you are already doing? Or are you trying to test the full consumer stack in your pact tests?

Ah, that makes sense.  We were imagining writing more than just the client class for the service, and I do see that if you just make that class, it's a fairly trivial amount of code to get the pact created.  Thanks for the explanation!

What you've written above helps makes clearer how the pact tests should fit in your application.  I think the part that confused us was Step 5:

Running the AnimalServiceClient spec will generate a pact file in the configured pact dir (spec/pacts by default). Logs will be output to the configured log dir (log by default) that can be useful when diagnosing problems.
Of course, the above specs will fail because the Animal Service client method is not implemented, so next, implement your provider client methods.

We assumed from the first sentence that the pacts would be written regardless of whether the spec fails/passes -- maybe something could be tweaked there to make that clearer?

Ah! You are right, that statement is a LIE. I shall correct it.

I have removed the lie! https://github.com/pact-foundation/pact.io/commit/d86d21cbd2844a36a7534492a490f1aee4ec4d7d
Please have a read when you have a moment and let me know if that is clearer.

Much clearer!
On Wed, Feb 21, 2018 at 8:24 PM Beth Skurrie<EMAIL_ADDRESS>wrote:

I have removed the lie! pact-foundation/pact.io@d86d21c
https://github.com/pact-foundation/pact.io/commit/d86d21cbd2844a36a7534492a490f1aee4ec4d7d
Please have a read when you have a moment and let me know if that is
clearer.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/DiUS/pact-jvm/issues/640#issuecomment-367535983, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGQtMirvf09ToBkcn6YgNw3OEsJBufEeks5tXMHVgaJpZM4SHX0U
.

no longer a desirable feature from our end


[Documentation] Wrong links in docs

Have you searched existing issues?  🔎

[X] I have searched and found no existing issues.

Please describe a documentation issue.
The Model - Overview page has outdated links. (Models and losses page)
Is there any alternative or fix suggestion to make it better?
Fix them to point to the markdown files instead.
Additional context.
No response
Will you help us by submitting a PR?

[X] I will submit a PR about this issue.

@aychun Thank you for your report. 👍
Can you more specifically explain what is outdated links?

I used the term outdated assuming there was a change in the file hierarchy in the past. I believe the models and losses page in the model - overview file are supposed to mean docs/models/overview.md and docs/components/model/losses.md correspondingly.

@illian01
I thought the links are meant to point to the markdown files in the repository, my apologies for the confusion.


ci(jenkins): disable stages for only docs

What

Any builds for any branch or PR that only contains changes related to the asciidoc then it will skip all the stages but the checkout

Checklist

[x] My code follows the style guidelines of this project
[x] I have rebased my changes on top of the latest master branch

[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes

[ ] I have updated CHANGELOG.asciidoc
[ ] I have updated supported-technologies.asciidoc
[ ] Added an API method or config option? Document in which version this will be introduced
[ ] Added an instrumentation plugin? How did you make sure that old, non-supported versions are not instrumented by accident?

Author's Checklist
N/A
Related issues
Use cases
Docs validation happens with the elasticsearch-ci/docs therefore there is no need to validate anything in our end.
Screenshots
<!-- _(Optional)_
Add here screenshots about how the project will be changed after the PR is applied. They could be related to web pages, terminal, etc, or any other image you consider important to be shared with the team.

Codecov Report

Merging #1100 into master will increase coverage by 10.82%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             master    #1100       +/-   ##
=============================================
+ Coverage     59.96%   70.78%   +10.82%
- Complexity       87     2273     +2186
=============================================
  Files           327      226      -101
  Lines         14768     9908     -4860
  Branches       2059     1304      -755
=============================================
- Hits           8855     7013     -1842
+ Misses         5316     2457     -2859
+ Partials        597      438      -159

Impacted Files
Coverage Δ
Complexity Δ

...ic/apm/agent/servlet/ServletTransactionHelper.java

...stic/apm/agent/kafka/BaseKafkaInstrumentation.java

...t/kafka/helper/KafkaInstrumentationHelperImpl.java

...co/elastic/apm/agent/profiler/SystemNanoClock.java

...t/urlconnection/UrlConnectionPropertyAccessor.java

...gent/opentracing/impl/ApmScopeInstrumentation.java

...g/webmvc/SpringTransactionNameInstrumentation.java

...co/elastic/apm/agent/grpc/BaseInstrumentation.java

.../opentracing/impl/ScopeManagerInstrumentation.java

...java/co/elastic/apm/attach/ElasticApmAttacher.java

... and 97 more

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 4319f99...a59894a. Read the comment docs.


Possible to configure cppcheck to use c++20 instead of c++2b?

Hello!
When running analysis on my project, I get this error:
Analyzing Section.test.cxx with cppcheck  failed!
cppcheck: error: unrecognized command line option: "--std=c++2b".

This is because cppcheck only supports up to C++20 currently.
Is there a way to configure the standard for cppcheck to be C++20?
I am trying to use --analyzer-config, but I get Analyzer option in wrong format: "cppcheck:std=c++20":
// .codechecker.json
{
    "analyzer": ["--analyzer-config=\"cppcheck:std=c++20\""] // Also tried -std=c++20, --std=c++20
}

Hi @Eshnek ! The language standard specified with the --std flag in the compilation command is automatically translated into the proper Cppcheck language standard parameter. There is no std analyzer config for it, which you tried to use.
The following compilation-commands.json file
[
    {
        "directory": "/home/ekutgab/ws/debug/pch",
        "command": "/usr/bin/clang --std=c++20 -I ./include/header.h ./source.cpp",
        "file": "./source.cpp"
    }
]

results in the following (simplified for this comment) cppcheck invocation:
cppcheck --std=c++20 -I /ws/debug/pch/include/header.h --plist-output=/ws/debug/pch/reports/cppcheck/ /ws//debug/pch/source.cpp

Thanks @vodorok!
I was able to configure CMake to this effect.


Accessibility: two-finger scrolling on Android doesn't work as expected

I noticed a couple of issues:

While scrolling the accessibility frame disappears in Flutter apps
Sometimes, after two-finger scrolling no element is accessibility-selectable anymore (fixes itself after some more scrolling)

Issue 1 is caused by RenderIgnorePointer which is placed between the Scrollable and its content. As soon as scrolling starts, it is instructed to ignore all pointer events, which causes RenderIgnorePointer to also drop all of its children semantics on the floor. Hence, the node that was accessibility focused before scrolling started is removed from the semantics tree and can no longer be focused.

The second issue will be fixed by #11207.

Closing this and opening a separate issue for the remaining problem.


Member updates failing due to missing address

Hi,
We are seeing the following error when trying to update pools https://gist.github.com/abattye/29dffbadf1fbcdd88b293847f2a66393. It maybe related to https://github.com/F5Networks/f5-openstack-lbaasv2-driver/issues/544 because we are seeing this on pools which have corrupted nova managed port, however its may be unrelated. It appears the exception is not caught and the update to all pools related to the LB are rolled back.
We have patched to just guard against the missing address, but it would be interesting to know why the member address is missing. This is the dict, which I think is returned from the API call to the device, {'session': 'user-enabled', 'ratio': 1, 'name': u'<IP_ADDRESS>%5:443', 'partition': u'Project_b7c88763cfb944349b6ac8b0c9850f15'}
We are working with the 9.3.0 codeline.
Thanks
Andrew

We have seen this issue for other customers when IP addresses are exhausted. We will apply a fix to guard against the KeyError.


Unknown port mapping for service: sqs

Version: 0.2.7
OS: MacOS Catalina
Cloned a repo with LocalStack related SQS tests, but seeing issues with the below test:
@ExtendWith(LocalstackDockerExtension.class)
@LocalstackDockerProperties(services = {"sqs"})
@EnabledOnOs({OS.MAC})
public class SqsStreamClientTest {

    @Test
    public void it_should_get_queue_url() throws ExecutionException, InterruptedException {
        //Arrange
        SqsAsyncClient sqsAsyncClient = TestUtils.getClientSQSAsyncV2();
        String queueName = "test-queue";
        sqsAsyncClient.createQueue(CreateQueueRequest.builder().queueName(queueName).build()).get();
        SqsStreamClient target = new SqsStreamClient(sqsAsyncClient);

        //Act
        String queueUrl = target.getQueueUrl(queueName, sqsAsyncClient);

        //Assert
        assertEquals("http://localhost:4566/000000000000/test-queue", queueUrl);
    }
}

Error:
Unknown port mapping for service: sqs
java.lang.IllegalArgumentException: Unknown port mapping for service: sqs
	at cloud.localstack.Localstack.getServicePort(Localstack.java:223)
	at cloud.localstack.Localstack.endpointForService(Localstack.java:214)
	at cloud.localstack.Localstack.getEndpointSQS(Localstack.java:166)
	at cloud.localstack.awssdkv2.TestUtils.getClientSQSAsyncV2(TestUtils.java:38)
	at com.trp.dit.lux.core.infrastructure.SqsStreamClientTest.it_should_get_queue_url(SqsStreamClientTest.java:24)
       ....

Debugging into
private void loadServiceToPortMap() {
        String localStackPortConfig = localStackContainer.executeCommand(Arrays.asList("cat", PORT_CONFIG_FILENAME));

        int edgePort = getEdgePort();
        Map<String, Integer> ports = new RegexStream(DEFAULT_PORT_PATTERN.matcher(localStackPortConfig)).stream()
                .collect(Collectors.toMap(match -> match.group(1), match -> edgePort));

        serviceToPortMap = Collections.unmodifiableMap(ports);
    }

localStackPortConfig = 'cat: can't open '/opt/code/localstack/.venv/lib/python3.8/site-packages/localstack_client/config.py': No such file or directory'
When I run localStackContainer.executeCommand(Arrays.asList("ls", "/opt/code/localstack/.venv/lib")), I see "python3.7" returned - how should I fix this mismatching version?
It seems related to https://github.com/localstack/localstack/issues/2082.

Solved by upgrading version to 0.2.14


Feature Request: Shows method and property modifiers in intellisense

Currently, VSCode only shows (method) and (property) before the method name and property name, e.g.
(method) A.show(str: string): void and (property) A.text: string.
But it didn't tell whether the property or method is public, protected or private, it doesn't appear being a problem when dealing with TypeScript most of the case.
But when writing JavaScript code, especially for a user who imports a third party module. The author of that module would want to hide those protected and private properties.
One of the history version of VSCode did hide those, but it was soon removed, possibly because JavaScript always allow a user to access all properties of the class, and VSCode doesn't want to make it confused and cause troubles.
But, such a feature is still very important. Since hiding those properties isn't that appropriate, I suggest
adding modifiers before the property name and method name in the intallisense hint. e.g.
(public) A.show(str: string): void and (private) A.text: string, or (private readonly) A.text: string.
In this form, the hint text keeps short and clear, and tells the visibility of the property, so that the user knows whether the property is accessible or rewritable in his code, especially for JavaScript.
I think this feature will be very helpful both in TypeScript and JavaScript, hope it could be implemented in the next VSCode version.

This issue was moved to Microsoft/TypeScript#25701


Search tab by title for firefox

This looks very useful! Do any other browsers have this feature? As far as I can tell chrome does not have it yet except on ChromeOS, but might soon: https://www.howtogeek.com/704212/how-to-search-open-tabs-on-google-chrome/.

It would be nice if the <user.text> could be made optional, so "tab search" on its own just brought up the tab search. That would require not hitting the down key afterwards, though, since that just selects the first match, eg add the following:
tab search:
  browser.focus_address()
  insert("% ")

In fact, I'm not sure whether hitting the down key is a good idea at all here, since it means you can't add further text to the search without hitting up. (Also if there are no matches it ends up selecting a search engine, which is a bit weird although though not really a problem.) I guess it makes it easy to go to the first match, though, which is handy.

What do you think?

Bumping this, because it looks really useful and seems to have stalled — timo, are you planning on working on this PR? If not I can try and finish it up this weekend.


Clean up ruby-maven dependency

cleanup the usage of ruby maven as it's not really used here, and we also aim to not used it anymore in favor of having jars loaded within the gems.
Related to https://github.com/elastic/logstash/issues/2954

LGTM


feat: Add balancer to example

Review by commit

Merging this now so that it doesn't block my cleanup tasks. Feel free to review anyway. Fixes will be made in future (smaller) PRs.


Call to find_matching_extended_rect at vnc.c:1211 looks like a bug

https://github.com/neutrinolabs/xrdp/blob/0c605a3cc488a5ebe977dabf5d7e932a0d080696/vnc/vnc.c#L1215
the parameter response_code
    error = find_matching_extended_rect(v,
                                        rect_is_reply_to_us,
                                        NULL,
                                        &response_code,
                                        &layout);

is passed as a match_y argument to
find_matching_extended_rect(struct vnc *v,
                            int (*match)(int x, int y, int cx, int cy),
                            int *match_x,
                            int *match_y,
                            struct vnc_screen_layout *match_layout)

by quick review, it looks like a bug. Please verify the call.
The main source of the finding is compilation with -O3 that results with:
  CC       vnc.lo
  CC       vnc_clip.lo
In file included from ../common/parse.h:29,
                 from vnc.h:26,
                 from vnc.c:33:
vnc.c: In function ‘lib_data_in’:
../common/log.h:153:33: error: ‘response_code’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  153 | #define LOG(log_level, args...) log_message(log_level, args)
      |                                 ^~~~~~~~~~~
vnc.c:1211:9: note: ‘response_code’ was declared here
 1211 |     int response_code;
      |         ^~~~~~~~~~~~~
cc1: all warnings being treated as errors

Thanks for this @travnick
What platform are you on? This isn't being picked up by our CI builds at the moment.

BTW the code's fine, but the call analysis is incomplete, probably for speed reasons.

I'm running Arch Linux x86_64 with gcc 11.1.0-3.
The analysis is somehow correct - the response_code passed as match_y to find_matching_extended_rect remains uninitialized if error != 0, but probably the compiler does not see the access to the response_code is guarded by if (error == 0) in lib_framebuffer_waiting_for_resize_confirm
Anyway, it's really strange that the response_code is the same as match_y, but maybe it's just kind of tricky argument and interface matching in this code.

The guard is more complex than that - error == 0 can also be returned if no error is encountered and no matching rectangle is encountered, but in that case match_layout->s will be NULL (this is spelled out in the function header). So I'm not surprised the compiler doesn't look that deeply. The CI system uses the latest verson of cppcheck, and that's happy with the code.
In any case, I think the simplest fix is to initialise response_code to zero. I'm just updating a Manjaro VM I've got lying about which should be able to reproduce this, so when that's done I can check I can get a clean build.

Running on Manjaro, just adding an initialiser fixes the warning. I can't find any others using the configure switches used in the PKGBUILD for Arch.


Investigating possible race condition problems when starting API with Kafka

In some instances upon starting the API we get the following exception:
org.apache.kafka.common.errors.BrokerNotAvailableException: Error choosing node for listTopics: no node found.
Another example:
Error in custom provider, org.apache.kafka.streams.errors.StreamsException: There are no partitions available for topic streamsapp_site_stats-v1.42-localstore_user_data-changelog when initializing globalstore globalstore_user_data
These seem a little vague, and restarting the API seems to clear away problems, but it would be nice to deal with this possible race condition.

No more Kafka, no more problem!


Add dispatch.fusion_group op to Flow dialect

A fusion group contains all ops that form a dispatch region. Fusion
heuristics should generate fusion groups. Fusion group can then be
lowered to dispatch region, at which point the "group" becomes isolated
from above.

Nice! Don't intend to bikeshed too much, but maybe flow.dispatch.region? (we had one in the past, and it is consistent with scf.execute_region)

Yeah! Looks good. Thanks!
I am guessing the next step is splitting the dispatch region formation. Do you mind waiting for https://github.com/iree-org/iree/pull/9826 .
It is ready to go, just waiting on integrate. Would like to sequence disruptive changes

@matthias-springer please use Squash and Merge while merging (unless you are merging long running branches where individual commit entries on main are useful)


Can't Install - Errors on Packaging Exception

Errors on Packaging Exception while running ./grailsw war ROOT.war and on ./grailsw run-war
The error is: org.codehaus.groovy.grails.compiler.PackagingException: Error occurred processing message bundles: Error starting Sun's native2ascii.
All the requirements are installed. Any ideas?

Do you have a longer stacktrace or is this it? also, could you echo out your JAVA_HOME for me? echo $JAVA_HOME

also, run java -XshowSettings:properties -version and paste it here

also, I found this: http://www.morkeleb.com/2009/04/04/grails-error-starting-suns-native2ascii/   maybe you have the same issue?

Ah - I think that's it. When I've used java i the past I've always had JAVA_HOME pointing to the jre within the jdk (I think that's what maven likes). Thanks for your help!!


Unable to download the browser build

https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-3.1.3.zip - this link is posted in your readme and on the official site, and returns error 403. Where can I download the latest stable build?

see #188
correct link is https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-3.1.1.zip

that works, thanks


Using F1 Score for Model Checkpoint throws an error

Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
2.13
Custom code
Yes
OS platform and distribution
Google Colab
Mobile device
No response
Python version
3.10
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
T4 15GB
Current behavior?
Was using tf.keras.metrics.F1Score in model.compile. It works well, it will return f1_score and val_f1_score after every epoch. However, the problem arises if I also include tf.keras.callbacks.ModelCheckpoint in the model.fit, I got an error after the first epoch training.
The error are The following argument(s) are not supported with the native Keras format: ['options'] if I use monitor='val_loss' and ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() if I use monitor='val_f1_score' .
Additional context: I am training a multi-label classification model. This might be the cause.
Standalone code to reproduce the issue
import tensorflow as tf
from tensorflow.keras.applications import ResNet50
from tensorflow.keras.models import Model, Sequential
from tensorflow.keras import models, layers
from tensorflow.keras.layers import Dense, GlobalAveragePooling2D

def create_model():
	base_model = ResNet50(weights='imagenet', include_top=False, input_shape=(224, 224, 3))
	model = models.Sequential()
	model.add(base_model)
	model.add(layers.GlobalAveragePooling2D())
	model.add(layers.Dense(10, activation='sigmoid'))
	return model

model = create_model()
model_checkpoint = tf.keras.callbacks.ModelCheckpoint(
    filepath=os.path.join('v5.keras'),
    monitor='val_f1_score',
    mode='max',
    save_best_only=True
)

model.compile(
	loss='binary_crossentropy',
optimizer=tf.keras.optimizers.Adam(learning_rate=0.00003),
	metrics = [ tf.keras.metrics.F1Score(threshold=0.5)]
)

history = model.fit(
    X_train,
    y_train,
    batch_size=64,
    epochs=1,
    validation_data=(X_test, y_test),
    callbacks=[model_checkpoint]
)

Relevant log output
No response

Hi @kurkurzz ,
Please provide the complete code snippet to reproduce the issue reported. I've tried to reproduce the issue here, please let me know if i'm missing something.
Thank you!!

I am having the same issue but with tracking MSE. This is also seen by others (https://stackoverflow.com/questions/76701617/the-following-arguments-are-not-supported-with-the-native-keras-format-opti). Appears to be related to ModelCheckpoint and passing an "options" argument which should no longer be present in the latest version of Keras.

Hello,
This issue occurs when you try to use the F1Score metric with the default value for the weight argument in a multi-class or multi-label problem. This works only for binary classification problems. To make this work, you need to add 'macro' or 'weighted' depending on your data class imbalance in the F1Score instance during model compilation.
This should fix the issue.

Hi @kurkurzz ,
Since monitor = val_f1_score returns f1_score for each class when averaging=None, it is not possible to save_best_only model as it it ambiguous to compare the arrays of multiple values which is best.Hence the error but ambiguous.
For this case I am trying to propose a PR to fall back to save_best_only = False instead of raising an exception.

@kurkurzz,
I tried to execute the mentioned code with latest TensorFlow version2.17 which contains Keras 3.0,and observed that code was executing without any error/failure. Kindly find the gist here.
Thank you


Add iOS External Screen support

This is currently very WIP! This is eventually intended to implement #220.
Current status: if an external screen is connected, the VM display will be moved there. This breaks touch and cursor input to the VM, which will require separating the touch handling from the MTKView to fix. As a 'band aid' fix, I have redirected touch handling to the VM container view (VMDisplayMetalViewController+Touch.m), which enables a small portion of the screen to be used to control the VM pointer.
Help needed with mirroring mode: I have attempted to implement a display mirroring mode by introducing a second MTKView on a new VMExternalDisplayMetalViewController.swift and setting its UTMRenderer, sourceDisplay and sourceInput the same as the internal ones. The relevant code is in ExternalScreenController.swift line 126. Unfortunately with regards to the UTMRenderer and MTKView, I have no idea what I'm doing. So if you use this mode by uncommenting it, that currently results in a blank screen.

Yeah, I kinda regret this code but the way vmDisplay and vmInput are set is:

cs_display_monitors calls the delegate method spiceDisplayCreated with CSDisplayMetal and CSInput created for the new display
In UTMSpiceIO, spiceDisplayCreated sets properties on its delegate _delegate.vmDisplay and _delegate.vmInput. In order to prevent race conditions, UTMSpiceIO's setDelegate also sets those two properties.
UTMSpiceIO's delegate is VMDisplayMetalViewController. In transitionToState (called by UTMVirtualMachine) for kVMStarted, the two UTMRenderSource are passed to the renderer. In order to prevent race conditions (the kVMStarted message is dropped), this is also done in viewDidLoad.

So when you copy self.vmDisplay and self.vmInput in viewDidLoad, you are likely just copying nil at this point. You either have to re-pass them at kVMStarted or set up a KVO on those two.
If I have time, I might go through and re-arch this who procedure to be more understandable. This bad design was a result of incrementally adding code as new features were introduced.

You are right, the values are still nil when the view loads. I changed the implementation to grab the UTMRenderSource references after the VM starts, which worked. I then tried to create a second MTKView on the external view controller with the same render source as internally. However as soon as I set the delegate in the next draw call, it crashes. I now assume that a UTMRenderSource can't be used with two MTKViews. So I abandoned that idea and focused on creating an extended display mode.
I read through some of the CoreSpice code and have a gist of what happens to create the virtual display. However I don't see anywhere where I could call a function to create another display. When a new display channel is needed that seems to be signaled by Spice on "channel-new" with type display. How can I cause that signal? Am I understanding it correctly in the first place?

Not 100% sure on this but look at requestResolution in CSDisplayMetal. It's currently setting for self.monitorID which afaik is always 0 right now. But it seems like you can pass in 1,2,...,15 to configure up to 16 displays. spice_main_channel_send_monitor_config will issue the VD_AGENT_MONITORS_CONFIG request. If the guest agent responds with MONITORS_CONFIG this is seen by cs_display_monitors in CSConnection. There is already code here to setting up a new CSDisplayMetal and CSInput but I don't think it's ever been tested. Once you have those you can create a new UTMRenderer and so on.

That happens normally. libspice-gtk should automatically send the monitor config once the agent does connect (SPICE guest tools needs to be installed). Calling spice_main_channel_send_monitor_config is for the race condition where the agent is already connected before we called spice_main_channel_update_display_enabled.

Oh alright. I'll try it again with the prebuilt VM that includes the spice tools.

Just tried it with the "Debian 10.4 (LDXE) ARM" vm from the website, which includes SPICE tools. The output after the requestResolution call is now:
qemu-system: info: GSpice: channel-main.c:1131 main-1:0: sending new monitors config to guest
qemu-system: info: GSpice: channel-main.c:1148 main-1:0: monitor #0: 1366x1024+0+0 @ 32 bpp
qemu-system: info: GSpice: channel-main.c:1148 main-1:0: monitor #1: 1920x1080+0+0 @ 32 bpp
qemu-system: info: GSpice: channel-main.c:1066 #0 +0+0-1366x1024
qemu-system: info: GSpice: channel-main.c:1066 #1 +1366+0-1920x1080
qemu-system: info: Spice: reds.c:1158:reds_on_main_agent_monitors_config: monitors_config->num_of_monitors: 16

However cs_display_monitors is not called.

Do you get the log message received new monitors config from guest?

No, I don't get that message.  I tried to run xrandr -q and grander -d :1 which both gave me unable to open display.

No, I don't get that message. I tried to run xrandr -q and xrandr -d :1 which both gave me unable to open display.

sudo ?

Same with sudo

Just to be clear, auto-resolution changes do work? (i.e. rotating the screen)

No, that isn‘t working. In VM Display settings, Fit to screen is enabled, Retina mode is disabled. I‘m on iPad Pro 12.9 2nd gen, jailbroken on iOS 13.3. The VM is the "Debian 10.4 (LDXE) ARM" from the website (on the website it says that auto resolution change is not supported due to a bug, is that up to date?)
Maybe you could try this branch on one of your devices & VMs?

Still trying to figure out why the second display won't show up but I've ran into a couple of other issues:
I've gotten rare crashes in drawRegion. The cause may be that _canvasData is assumed to be locked by _drawLock. However, it is valid for libspice to return the same _canvasData to two different monitors (they could share a canvas). Therefore either the _drawLock has to be shared as well or a separate lock should be created.
Also, it seems like when I rotate the iPad (simulator) or use split view, it no longer sends the right resolution to SPICE.

Oh. Duh. We only have one VGA device.
https://people.freedesktop.org/~teuf/spice-doc/html/ch02s07.html

I tried the suggestion from the website you linked to, which was to add the GEMU argument “-vga qxl -device qxl”.
That results in the following error message when the VM starts:

Hi I am just curious. What's the current status on this? Is it working? If yes, how does it work, what are the current caveats, issues, supported VM OSes, requirements... ? A Samsung Dex like experience running a VM on my iPhone would be amazing IMO.

What's the current status on this?

It's not working and needs further development to get to a working state.

The rework in CocoaSpice on the dev branch should solve some of the issues but also require a lot of refactoring to be done.

External displays have been implemented in 4.0.0


Unexpected Behavior: S3 copy() - list of dicts not properly serializes into JSON array

Describe the bug
A clear and concise description of what the bug is.
Column contains a list of python dicts with form [{'id' : '123', 'score': '123.2' }]
My expected behavior would be that this library serializes it into a JSON array which is supported by Redshift.
Here's the error:
2021-01-11 14:58:33,579 | awswrangler.redshift | ERROR | Unsupported Redshift type: array<struct<id:string,score:string>>
2021-01-11 14:58:33,579 | __main__ | ERROR | Unsupported Redshift type: array<struct<id:string,score:string>>

To Reproduce
Steps to reproduce the behavior. Also add details about Python and Wrangler's version and how the library was installed.
P.S. Don't attach files. Please, prefer add code snippets directly in the message body.
Anywho, love this library. It's great for connecting all the pipes and saved me from writing my own version of it for internal use.

Hi @njdanielsen!
We've just added the serialize_to_json boolean argument (default False) to the function.
It is required because the SERIALIZETOJSON parameter is still in preview mode and is not accepted in regular clusters.
After this Redshift feature becomes GA we can make this argument True by default.
Do you mind to test it from our development branch  Could you give it a try?
pip uninstall awswrangler -y
pip install git+https://github.com/awslabs/aws-data-wrangler.git

Hi @njdanielsen!
We've just added the serialize_to_json boolean argument (default False) to the function.
It is required because the SERIALIZETOJSON parameter is still in preview mode and is not accepted in regular clusters.
After this Redshift feature becomes GA we can make this argument True by default.
Do you mind to test it from our development branch  Could you give it a try?
pip uninstall awswrangler -y
pip install git+https://github.com/awslabs/aws-data-wrangler.git

@igorborgest just took a look. I don't have this parameter in my cluster, but the implementation seems okay.
Thanks for the quick action!

@igorborgest just took a look. I don't have this parameter in my cluster, but the implementation seems okay.
Thanks for the quick action!

Released on version 2.4.0.


add animated slider image in front page

I have added slider image. please check my PR #17
If any changes more required please let me know @SahityaRoy

hey @tanwi1234 can you please send the screenshot what type of changes u made

hey @tanwi1234 can you please send the screenshot what type of changes u made

here is the link of screen record of changes.
https://drive.google.com/file/d/1ZOZwPOUhnlqHHuowzXguZx14640fybLJ/view?usp=sharing

hey @tanwi1234 can you please send the screenshot what type of changes u made

@SahityaRoy Here is the link of screen recording of changes that i made. https://drive.google.com/file/d/1ZOZwPOUhnlqHHuowzXguZx14640fybLJ/view?usp=sharing

Great but need some modification in this

hey @tanwi1234 can you please send the screenshot what type of changes u made

@SahityaRoy Here is the link of screen recording of changes that i made. https://drive.google.com/file/d/1ZOZwPOUhnlqHHuowzXguZx14640fybLJ/view?usp=sharing

Great but need some modification in this

yeah please let me know what modification do you need?


Add median operator

Which issue does this PR close?
Closes #1486 .
Rationale for this change
Add the median operator, this should close #1486 and unblock the perf test work.
The current implementation uses approx_percentile_cont under the hood. We can look into implement the "exact" version later. More discussions around this can be found in the issue.
What changes are included in this PR?

Are there any user-facing changes?
No change to existing APIs. New median operator added.

@matthewmturner This should close #1486

@realno this is great, thank you.  im excited to be able to refresh the db-benchmarks results with this and your other work.  just a couple questions.
I believe all the tests currently have the array data sorted already.  Do you think we should have some where it is not sorted?  i'm assuming that the Median function and approx_percentile_cont dont require input data to be sorted in order to use (sry if thats wrong assumption, i havent had chance to look into implementation of approx_percentile_cont).
Can you also provide more color on the intended handling of nulls?  It would help me to understand the below test.
#[test]
    fn median_i32_with_nulls() -> Result<()> {
        let a: ArrayRef = Arc::new(Int32Array::from(vec![
            Some(1),
            None,
            Some(3),
            Some(4),
            Some(5),
        ]));
        generic_test_op!(
            a,
            DataType::Int32,
            Median,
            ScalarValue::from(3),
            DataType::Int32
        )
    }

I left some suggestions about how we might be able to reuse some more of the ApproxQuantile code to avoid repetition

@alamb Am I missing something by any chance?

@matthewmturner Great questions. approx_percentile_cont is based on tdigest to calculate the statistics of the input online, so it does not require the data set to be sorted. This is also the reason that exact median is a bit tricky to be calculated efficiently.
To clarifu I added a new test case hopefully can make it more clear
    fn approx_median_i32_with_nulls_2() -> Result<()> {         let a: ArrayRef = Arc::new(Int32Array::from(vec![             Some(5),             Some(1),             None,             None,             Some(3),             Some(4),         ]));         generic_test_op!(             a,             DataType::Int32,             ApproxMedian,             ScalarValue::from(2),             DataType::Int32         )     }
It also demonstrates how null values are handled. They are included in the result, that is, the median is the value (may be Interpolation) positioned in the center of sorted inputs.

@alamb Am I missing something by any chance?

I had a thought this morning: what if we didn't introduce an Aggregate function at all, and instead simply rewrote queries
so a query that has
select approx_median(x) from foo;

could be rewritten to
select approx_percentile(x, 5.0) as "approx_median(x)" from foo;

Similar to how we transform SELECT count(distinct x) from foo to select count(*) from (select x from foo group by x) in https://github.com/realno/arrow-datafusion/blob/add-median-operator/datafusion/src/optimizer/single_distinct_to_groupby.rs#L44
this may be a silly idea, but I wanted to write it down

@realno thank you for the explanation and added test - it makes sense.

@alamb I add another version using optimizer, I think it works too. It is a little cleaner, it does introduced a bit complexity but should run a little faster too. Please take another look and we can decide which version to merge.

@realno Thanks.
I agree that rewriting the query to use the percentile function is conceptually a bit easier.
So a +1 on the optimizer rule approach.

Sounds good - will proceed with the optimizer route.
@alamb

In terms of the planning overhead, I agree it isn't ideal, though I think we can improve things over time by consolidating several of the optimizer passes together

There are a few things I noticed that are not ideal, I will update the PR later we can discuss in more details. I think it is a good idea to have a plan to improve over time - I will create the issues after discussion. Here are the things I noticed for now:

For at least aggregate functions some traits/structs from use crate::physical_plan::aggregates are leaked into the logical planning phase, e.g. fun in this code block

 match expr {
        Expr::AggregateFunction {
            fun,
            args,
            distinct,
        } => {
            let mut new_args = args.clone();
            let mut new_func = fun.clone();
            if fun == &aggregates::AggregateFunction::ApproxMedian {
                new_args.push(Expr::Literal(ScalarValue::Float64(Some(0.5_f64))));
                new_func = aggregates::AggregateFunction::ApproxPercentileCont;
            }

Changing functions also includes rewriting Projections and Aliases, this is very tedious especially some util functions are not public and it replicates part of the work for building the plan. Also it may potentially have conflicts with other optimize rules if not super careful. Ideally these kind of of rewrites could happen before building the logical plan, maybe we can introduce a pre-build phase?  I am working the part handling Projection and Alias, it'll be more clear looking at the code - I am using string replacement.

If we need more drastic performance improvements I have wanted to make a LogicalPlanRewriter (like ExprRewriter) for a while now that would avoid so many copies -- it is a fair amount of work but all pretty mechanical.

I like this idea, it may also help with the issues I mentioned above.

@alamb @realno do you think that this could be finished in time for inclusion in the 7.0 release? I was hoping it would so we could use in the python bindings for refreshing benchmarks.

Functionality-wise I think I can make it happen. There is a part for dealing with Projection and Alias (will push the code soon) can be a bit controversial, we'll see if we are comfortable with merging as-is.
Or if we really want to make it happen, another option is to merge with the wrapper implementation first while working on the optimizer rule.
Let me push the code first then we can discuss again with @alamb .

🤔  I am not sure about how the DF 7.0.0 release is going to to go down (as in if we should wait for specific things or just cut the release "when we are ready") 🤔

The PR is ready for final review before merge.
FYI, I decided not to add the changes for handling Projection and Alias because the change became quite cumbersome to handle all the corner cases - it needs to traverse the plan twice in order to properly register expression names and schemas; it also does a lot of copies along the way. With the existing approach, the only caveat is ToApproxPerc must be applied last. Considering it is simple and relatively efficient I decided to go with this approach.


AceTalon21s Ban Appeal

YO LET ME BACK ON

Yeah no. Some sort of composure is needed for a ban appeal and this is exactly not that. Your appeal has been denied. Feel free to continue and i'll make your ban a permanent one.

Yeah no. Some sort of composure is needed for a ban appeal and this is exactly not that. Your appeal has been denied. Feel free to continue and i'll make your ban a permanent one.

 LET ME ON!

 LET ME ON!

And theres your permaban.

And theres your permaban.


REVEALED PAST LOGS END HERE appears before the error is displayed

Hello,
For the package lib-2, the "revealed end logs" line appears before the error is displayed :
> oao bootstrap -s ./packages/*/

2017-02-21T08:06:48.363Z           storyboard INFO  ┌── ROOT STORY: Node.js 7.5.0 on Win32 64-bit, SB 3.0.0 [CREATED]
2017-02-21T08:06:48.364Z           storyboard INFO  Log filter: *:DEBUG
2017-02-21T08:06:48.549Z                 main INFO  Reading all package.json files...
2017-02-21T08:06:48.551Z                 main INFO  PASS 1: processing @bamaa/lib-1...
2017-02-21T08:06:48.552Z                 main INFO    - Registering...
2017-02-21T08:06:48.924Z                 main INFO    - Installing external dependencies...
2017-02-21T08:06:49.320Z                 main INFO  PASS 1: processing @bamaa/lib-2...
2017-02-21T08:06:49.321Z                 main INFO    - Registering...
2017-02-21T08:06:49.681Z                 main INFO    - Installing external dependencies...
2017-02-21T08:06:50.176Z           storyboard WARN  ┌── REVEALED PAST LOGS BEGIN HERE (due to warning/error)
2017-02-21T08:06:49.682Z                 main TRACE ┌── Run cmd yarn install at ./packages/lib-2/ [CREATED]
2017-02-21T08:06:49.970Z                 yarn INFO  | yarn install v0.20.3
2017-02-21T08:06:50.040Z                 yarn INFO  | [1/4] Resolving packages...
2017-02-21T08:06:50.141Z                 yarn INFO  | [2/4] Fetching packages...
2017-02-21T08:06:50.175Z                 yarn INFO  | [3/4] Linking dependencies...
2017-02-21T08:06:50.178Z           storyboard WARN  └── REVEALED PAST LOGS END HERE
2017-02-21T08:06:50.176Z                 yarn ERROR | warning<EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2017-02-21T08:06:50.178Z                 yarn ERROR | warning<EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>2017-02-21T08:06:50.288Z                 yarn INFO  | [4/4] Building fresh packages...
2017-02-21T08:06:50.297Z                 yarn INFO  | Done in 0.34s.
2017-02-21T08:06:50.315Z                 yarn INFO  |
2017-02-21T08:06:50.317Z                 main TRACE └── Run cmd yarn install at ./packages/lib-2/ [CLOSED]
2017-02-21T08:06:50.318Z                 main INFO  PASS 1: processing @bamaa/lib-3...
2017-02-21T08:06:50.318Z                 main INFO    - Registering...
2017-02-21T08:06:50.680Z                 main INFO    - Installing external dependencies...
2017-02-21T08:06:51.061Z                 main INFO  PASS 2: installing internal deps for @bamaa/lib-1...
2017-02-21T08:06:51.061Z                 main INFO  PASS 2: installing internal deps for @bamaa/lib-2...
2017-02-21T08:06:51.062Z                 main INFO  PASS 2: installing internal deps for @bamaa/lib-3...
2017-02-21T08:06:51.062Z                 main INFO    - Linking to @bamaa/lib-1...
2017-02-21T08:06:51.425Z                 main INFO    - Linking to @bamaa/lib-2...
2017-02-21T08:06:51.803Z           storyboard INFO  └── ROOT STORY: Node.js 7.5.0 on Win32 64-bit, SB 3.0.0 [CLOSED]

That's normal behaviour. Storyboard detects that a hidden story (notice the TRACE level at the Run cmd yarn install...) should be revealed since a warning has occurred. It then shows all past logs, and after that the error/warnings themselves. This way you can see the logs leading to the error/warning condition.


Wide text like W3.CSS w3-wide

It would be great if we have a class for adding spaces between text. It looks good in some places. I saw this in w3.css. Another CSS library. Here is the demo https://www.w3schools.com/w3css/tryit.asp?filename=tryw3css_text_wide

This is letter-spacing and word-spacing. I don't think we add something for this in our core since it's not so common — but it's pretty easy to add on the Sass side using our utilities API.

Yup, closing as a won't fix/implement.


crash on startup

minecraft: 1.12.2
forge: 2758
embers: 0.230
crafttweaker 2: 4.1.9
MTlib: 3.0.5
game crashes on startup, not even letting the game window open, looking at the log it seems to have to do with crafttweaker as well
log is here

oh i didn't realize there was two different versions of the mod now. Things have really changed since elucent left i guess


build with python 3.12 not working

Recently updated my mac to 14.1.1 and needed to rebuild this library.
Had python 3.12 as default and got a "ModuleNotFoundError: No module named 'distutils'" error.
https://docs.python.org/3.12/whatsnew/3.12.html
-> seems distutils is has gone away

pyenv global 3.11
installed fine

Side note:
Any thoughts on shipping a Web Assembly version of this library, and we could avoid all these build issues?

this could be fixed w the new node-gyp upgrade?

should be fixed w latest, let me know if you still have issues


Power cycle simulation

Dear Sir,
I am trying to run a power interpolant drive cycle simulation for 8760 data points. The battery is getting overcharged at particular point and simulation stops. Is there any possibility to overcome this or operate battery between particular SOC i.e 80% to 30%.
Battery size = 170 series 500 parallel,
Chen2020 Li-ion battery properties.
The battery should work between 80 -20%, the extra power is considered as dump power.
For reference I can share my .csv data file.
If there any suggestions to overcome this problem kindly let me know.
power_ba.csv
Regards,
Manjunath

You can find an example of how to bring custom drive cycles in this script. For the particular battery of 170 cells in series and 500 in parallel, I think you will need to use our sister project liionpack. Alternatively, you can rescale the drive cycle so it works with a single cell.
For the overcharge, not sure how you can prevent it. You can define the initial state of charge in a simulation by passing an extra argument initial_soc to the solve method.


Let !vt and !vtct take optional parameters

Is your feature request related to a problem? Please describe.
As a member of a server with many banned words, I sometime want to know the remaining cooldown or record for a specific banned word.
Describe the solution you'd like
It would be nice to be able to submit a command like !vt asdf to find out how long we have gone without saying the word "asdf" specifically. If the word isn't part of the banned words for the server, it should reply saying so.
In addition, it should be able to take a list of such words, and not including anything should still function as currently.
Describe alternatives you've considered
Perhaps an index should be used instead of the banned word itself?

This has been done, currently using an index for ease of parsing. There's potential to add the second method later.


[Bug]: Attempt to read property "value" on null error

What happened?
hello, I installed the plugin and opened 2fa, then when I tried to log in, I got an error like this:
Attempt to read property “value” on null
In order to resolve this error
vendor\vormkracht10\filament-2fa\src\Http\Livewire\Auth\LoginTwoFactor.php
In line 44 $this->twoFactorType = $this->challengedUser->two_factor_type->value;
It worked when I removed the value from the code, what is this caused by? can you check?
Translated with DeepL.com (free version)
How to reproduce the bug
Bu hatayı çözmek içinde
vendor\vormkracht10\filament-2fa\src\Http\Livewire\Auth\LoginTwoFactor.php
44. satırdaki $this->twoFactorType = $this->challengedUser->two_factor_type->value;
kodundan valueyi kaldırınca çalıştı bu neyden kaynaklanıyor? kontrol edermisiniz?
Package Version
1.6^
PHP Version
8.2.4
Laravel Version
11.0.0
Which operating systems does with happen with?
Windows
Notes
No response

Did you follow all the installation steps from the readme? @enessvg

@Baspa Yes

Can you provide me a reproduction repository? Then I'll be happy to help @enessvg

I can't provide it right now, but I can leave photos like this:

Deleted value code:
$this->twoFactorType = $this->challengedUser->two_factor_type;

@Baspa

Did you run migrations? Can you show me your user model and did you setup 2FA for the user? @enessvg

Did you run migrations? Can you show me your user model and did you setup 2FA for the user? @enessvg

Yes, I've run migrations.
User.php:
use Laravel\Fortify\TwoFactorAuthenticatable;
use Vormkracht10\TwoFactorAuth\Enums\TwoFactorType;
use HasFactory, Notifiable, HasRoles, HasPanelShield, TwoFactorAuthenticatable;
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
'two_factor_type' => TwoFactorType::class,
];
}

I just did a fresh installation here and got no errors: https://github.com/Baspa/reproduction-repo
you can check my latest commit @enessvg

OK, I will try to reinstall and try again, thanks.

I just did a fresh installation here and got no errors: https://github.com/Baspa/reproduction-repo
you can check my latest commit @enessvg

Any updates on this issue? @enessvg

@Baspa Sorry for not replying, I still haven't tried it, I will try it as soon as possible and write here

I looked at using this package and got the same error, it would appear the casting doesn't cast null/empty two_factor_types. Ideally there should be either a default, or login if 2fa type is not set.

Thanks for checking both, will try to look for a fix later today @enessvg / @tonypartridge

Yep! Using jetsream
Many thanks
Tony
On Wed, 2 Oct 2024 at 10:15, Bas van Dinther @.***>
wrote:

Did you guys install this package after already using Laravel Fortify?
I guess this issue might happen when the user already has set the 2FA on
their user but didn't use this package yet. Then the 2FA might be
"enabled", which causes the user to be redirected to the 2FA login page,
but there is no 2FA type set.
If that's the case I might need to change the documentation.
@enessvg https://github.com/enessvg / @tonypartridge
https://github.com/tonypartridge
—
Reply to this email directly, view it on GitHub
https://github.com/vormkracht10/filament-2fa/issues/47#issuecomment-2388001135,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAKWBFS7ABHW6OE3HLVOFK3ZZO2S7AVCNFSM6AAAAABPBS6SUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBYGAYDCMJTGU
.
You are receiving this because you were mentioned.Message ID:
@.***>

Did you guys install this package after already using Laravel Fortify? I guess this issue might happen when the user already has set the 2FA on their user but didn't use this package yet. Then the 2FA might be "enabled", which causes the user to be redirected to the 2FA login page, but there is no 2FA type set.
If that's the case I might need to change the documentation.
@enessvg / @tonypartridge

https://filamentphp.com/plugins/vormkracht10-2fa#installation
I followed what was said here and got that error

@enessvg / @tonypartridge after I merge #49 in a few minutes you should update the package and re-run php artisan filament-two-factor-auth:install.
Remove previous migration from this package before running the install command. When you run the migrations through the install command again it will now prompt if you want to update existing users to set their missing two_factor_type. It will default to authenticator.

@Baspa Thank you, I'm glad I wrote this error here

Good stuff, will review.

only thoughts are:
Would you like us to set the two factor type to "authenticator" for existing users? (yes/no)
should be
Would you like us to set the two factor type to "authenticator" for users that previously used 2FA in fortify? (yes/no)

I tried this and disabled normal 2fa and then tried email but never got the email even with queue working.

only thoughts are:
Would you like us to set the two factor type to "authenticator" for existing users? (yes/no)
should be
Would you like us to set the two factor type to "authenticator" for users that previously used 2FA in fortify? (yes/no)

Feel free to submit a PR! @tonypartridge

I tried this and disabled normal 2fa and then tried email but never got the email even with queue working.

What are the exact steps you did? Have you set a two_factor_type on the user? Does it has its email set?


Replacement for TokenInfo Endpoint

Description
Apart from just re-implementing the tokeninfo logic for sharing-ng, we could try to find a cleaner way to get the same functionality.  After some some discussion we came up with this, which should not need a tokeninfo endpoint at all and could purely work with webdav. It is still somewhat rough and we would have to prove that it does actually work:
The client should basically always sent a PROPFIND to /dav/public-files/{sharetoken}

authenticated clients accessing an internal link are redirected to the "real" resource (`/dav/spaces/{target-resource-id}
authenticated clients accessing a pubic link (password protected or not) for a resource they already have access to are also redirected to the "real" resource. (and always need to supply the password)
unauthenticated clients accessing an internal link get a 401 returned with  WWW-Authenticate set to Bearer (so that the client knows that it need to get a token via the IDP login page.
unauthenticated clients accessing a password protected link get a 401 returned with WWW-Authenticate set to Basic to indicate the requirement for needing the link's password.

This would however require some changes our ocdav service (it does not handled the above request on the publicstorageids yet) and AFAICS also in the way we handle authentication for ocdav. So it requires some more research.
User Stories

As a client, i want to understand the context of my link (internal, public, password-protected) to give my users the best User Experience

Value
UX
Acceptance Criteria

[ ] The requirements from above are fulfillable with WebDAV

Definition of ready

[ ] Everybody needs to understand the value written in the user story
[ ] Acceptance criteria have to be defined
[ ] All dependencies of the user story need to be identified
[ ] Feature should be seen from an end user perspective
[ ] Story has to be estimated
[ ] Story points need to be less than 20

Definition of done

Functional requirements

[ ] Functionality described in the user story works
[ ] Acceptance criteria are fulfilled

Quality

[ ] Code review happened
[ ] CI is green (that includes new and existing automated tests)
[ ] Critical code received unit tests by the developer

Non-functional requirements

[ ] No sonar cloud issues

Configuration changes

[ ] The next branch of the ocis charts is compatible

I've adjusted the initial description a bit. In the discussion in #8617 we agreed on the initial WebDAV endpoint for public links being /dav/public-files/{sharetoken} to avoid more usage of hardcoded server uuid's. (See https://github.com/owncloud/ocis/issues/8617#issuecomment-2034610431)

@micbar @rhafer @kobergj Please have a look at the POC.
It still needs to change the response format for the internal link PROPFIND request.
<d:multistatus xmlns:s="http://sabredav.org/ns" xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">     <d:response>         <d:href>/remote.php/dav/public-files/spaces/storage-users-1$some-admin-user-id-0000-000000000000%21b0985455-4a74-4a90-98b0-e8e153e45f51/</d:href>         <d:propstat>             <d:prop>                 <oc:permissions>S</oc:permissions>                 <oc:favorite>0</oc:favorite>                 <oc:fileid>storage-users-1$some-admin-user-id-0000-000000000000!b0985455-4a74-4a90-98b0-e8e153e45f51</oc:fileid>                 <oc:file-parent>storage-users-1$some-admin-user-id-0000-000000000000!some-admin-user-id-0000-000000000000</oc:file-parent>                 <oc:name>f2</oc:name>                 <oc:share-types>                     <oc:share-type>0</oc:share-type>                 </oc:share-types>                 <oc:privatelink>https://localhost:9200/f/storage-users-1$some-admin-user-id-0000-000000000000%21b0985455-4a74-4a90-98b0-e8e153e45f51</oc:privatelink>                 <oc:size>0</oc:size>                 <d:getlastmodified>Mon, 22 Apr 2024 16:26:09 GMT</d:getlastmodified>                 <d:getetag>"0b708c66b247127357ecefdd6aadecf0"</d:getetag>                 <d:resourcetype>                     <d:collection/>                 </d:resourcetype>                 <oc:tags></oc:tags>             </d:prop>             <d:status>HTTP/1.1 200 OK</d:status>         </d:propstat>         <d:propstat>             <d:prop>                 <oc:owner-id></oc:owner-id>                 <oc:owner-display-name></oc:owner-display-name>                 <oc:shareroot></oc:shareroot>                 <d:getcontentlength></d:getcontentlength>                 <d:getcontenttype></d:getcontenttype>                 <oc:downloadURL></oc:downloadURL>             </d:prop>             <d:status>HTTP/1.1 404 Not Found</d:status>         </d:propstat>     </d:response>     <d:response>         <d:href>/remote.php/dav/public-files/spaces/storage-users-1$some-admin-user-id-0000-000000000000%21b0985455-4a74-4a90-98b0-e8e153e45f51/f2fl1.txt/</d:href>         <d:propstat>             <d:prop>                 <oc:permissions></oc:permissions>                 <oc:favorite>0</oc:favorite>                 <oc:fileid>storage-users-1$some-admin-user-id-0000-000000000000!6e14bcfc-a997-410a-889c-fbb7ab52dd97</oc:fileid>                 <oc:file-parent>storage-users-1$some-admin-user-id-0000-000000000000!b0985455-4a74-4a90-98b0-e8e153e45f51</oc:file-parent>                 <oc:name>f2fl1.txt</oc:name>                 <oc:privatelink>https://localhost:9200/f/storage-users-1$some-admin-user-id-0000-000000000000%216e14bcfc-a997-410a-889c-fbb7ab52dd97</oc:privatelink>                 <oc:size>0</oc:size>                 <d:getlastmodified>Mon, 22 Apr 2024 16:26:09 GMT</d:getlastmodified>                 <d:getetag>"3c9d1b04a808215002b85c56c81d5356"</d:getetag>                 <d:resourcetype>                     <d:collection/>                 </d:resourcetype>                 <oc:tags></oc:tags>             </d:prop>             <d:status>HTTP/1.1 200 OK</d:status>         </d:propstat>         <d:propstat>             <d:prop>                 <oc:owner-id></oc:owner-id>                 <oc:owner-display-name></oc:owner-display-name>                 <oc:shareroot></oc:shareroot>                 <oc:share-types></oc:share-types>                 <d:getcontentlength></d:getcontentlength>                 <d:getcontenttype></d:getcontenttype>                 <oc:downloadURL></oc:downloadURL>             </d:prop>             <d:status>HTTP/1.1 404 Not Found</d:status>         </d:propstat>     </d:response> </d:multistatus>
Against the public link response:
<d:multistatus xmlns:s="http://sabredav.org/ns" xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">     <d:response>         <d:href>/remote.php/dav/public-files/csgVsREiAOeCxAa/</d:href>         <d:propstat>             <d:prop>                 <oc:permissions>Z</oc:permissions>                 <oc:fileid>storage-users-1$some-admin-user-id-0000-000000000000!ad0788f4-abbc-4adb-9de3-c3729e26ea3a</oc:fileid>                 <oc:file-parent>storage-users-1$some-admin-user-id-0000-000000000000!some-admin-user-id-0000-000000000000</oc:file-parent>                 <oc:name>csgVsREiAOeCxAa</oc:name>                 <oc:owner-id>admin</oc:owner-id>                 <oc:owner-display-name>Admin</oc:owner-display-name>                 <oc:privatelink>https://localhost:9200/f/storage-users-1$some-admin-user-id-0000-000000000000%21ad0788f4-abbc-4adb-9de3-c3729e26ea3a</oc:privatelink>                 <d:getlastmodified>Wed, 17 Apr 2024 10:32:32 GMT</d:getlastmodified>                 <d:getetag>"9139088991bbebbd3e762394a48a0b3c"</d:getetag>                 <d:resourcetype>                     <d:collection/>                 </d:resourcetype>                 <oc:tags></oc:tags>             </d:prop>             <d:status>HTTP/1.1 200 OK</d:status>         </d:propstat>         <d:propstat>             <d:prop>                 <oc:favorite></oc:favorite>                 <oc:shareroot></oc:shareroot>                 <oc:share-types></oc:share-types>                 <d:getcontentlength></d:getcontentlength>                 <oc:size></oc:size>                 <d:getcontenttype></d:getcontenttype>                 <oc:downloadURL></oc:downloadURL>             </d:prop>             <d:status>HTTP/1.1 404 Not Found</d:status>         </d:propstat>     </d:response> </d:multistatus>

It still needs to change the response format for the internal link PROPFIND request.

I think the intention for internal links was to have the /dav/public-files/ endpoint reply with a HTTP redirect (Status code 301 or 302) pointing the client to the correct location at /dav/files/<resourceid>.

It still needs to change the response format for the internal link PROPFIND request.

I think the intention for internal links was to have the /dav/public-files/ endpoint reply with a HTTP redirect (Status code 301 or 302) pointing the client to the correct location at /dav/files/<resourceid>.

Do you mean the redirect to the /dav/spaces/<resourceid> ?

Ok, fine for me.

https://github.com/owncloud/ocis/pull/8926 was merged


tests: Fix (and split) ExecutedUnrecordedCBs test

We were passing RENDER_PASS_CONTINUE_BIT in the begin info for the
primary CB, but not continuing a renderpass. This is nonsense, and
crashes some drivers.

Split up the test and use helpers to make the subtests concise.

This alleviates one of the three failures (so far) on our skylake system.  Will let you know when other platforms finish testing.


Connection Xiaomi MiBand with Dart Language (Flutter)

Good afternoon, I need to integrate the xiaomi smart bracelet (miband 3) in the Dart language (Flutter), but I am having difficulty, there is very little support material regarding this integration specifically.
I found only one repository on GitHub that makes this call, I was able to connect via bluetooth with the bracelet but I can't receive and send alert data for example. The services are listed, but when I click on read or write nothing happens. Can anyone help me with this?
I used the plugin flutter_blue and the code of the example is here: https://github.com/pauldemarco/flutter_blue/blob/master/example/lib/main.dart

I was able to read some service codes. But no meaningfull data yet. Did you make any progress ?

I would suggest it's probably easier to use something like NRF Connect to figure out how to use the services and characteristics on the device and then move onto using Flutter Blue to communicate with it.
Doing even the most basic research finds theres already documentation regarding the need to do authentication with the miband over BLE
so I would suggest closing this issue @claytonsands unless there is something specific regarding flutter blue that does not work with that device.

Have you finished this app??

hi guys , i  created a app for read a data from mi band ,i m getting the services but i cant able to read the heart and stepcount , is anyone worked on this can you help me

Have anyone sort it out?

@Refaydeen could you tell me how did u buit the app where you getting data from the mi band .

Hi guys any update on getting data from mi band


Delay function

This delays a series by a number of time steps.  The delay method is the same as in derivative (Nones appended to the beginning).
Our immediate use case is computing a derivative using divideSeries, to find the percent difference from the previous data point.

@andrewbaxter Just curious, is the thinking here (vs using timeShift()) that with delay() you don't have to think about the step (interval units)?

The goal was really to be able to reimplement derivative on the fly, so that's probably correct for the same reason this method was used in derivative itself.  There may have been other uses for which that property was important as well, but it's been a while.

P.S. I know it's completely wrong but your name keeps triggering this for me...

No relation :horse:

http://adventuretime.wikia.com/wiki/James_Baxter_the_Horse

Yeah, I'm fairly certain we're not related.

It may be a good way to participate in future github discussions though.

Apologies in advance, the curl patching method is breaking on the first conflict so I'm going to have to re-commit the changes anew. There may be a better way to do this (command-line rebasing with git am) but I'm a little inexperienced with these.

Closing in favor of #1658.


Dynamic connection definition

Hi,
is there a way to dynamically define the DB connection instead of having a fixed connection string in default-env.json. I would like to run the CAP app with PostgreSQL in GCP environment - specifically using Cloud SQL and Cloud Run service. I already have it running from local environment using cloud_sql_proxy.  In case of Cloud Run instance, the environment provides a local UNIX socket that creates an encrypted connection between Cloud Run and Cloud SQL. The socket name is provided in an environment variable. It's all document here https://cloud.google.com/sql/docs/postgres/connect-run.
Here's an example of code for connecting from Node.js
const dbSocketPath = process.env.DB_SOCKET_PATH || '/cloudsql';
connection: {
user: process.env.DB_USER, // e.g. 'my-user'
password: process.env.DB_PASS, // e.g. 'my-user-password'
database: process.env.DB_NAME, // e.g. 'my-database'
host: ${dbSocketPath}/${process.env.INSTANCE_CONNECTION_NAME},
},
I checked node package pg and it should be supported to connect via Unix socket as described here https://node-postgres.com/features/connecting. Here's a code example:
const { Client } = require('pg');
client = new Client({
host: '/cloudsql/myproject:zone:mydb',
user: 'username',
password: 'password',
database: 'database_name',
});
So where should this dynamic connection definition be done? It would be also beneficial for consuming other secrets such as username and password from Secret Manager.
Thanks

Hi @mvoros,
it would be great if you could contribute your solution to the sample project pg-beerhsop -> Run on Google Cloud Platform (GCP). I didn't came far with GCP when I tried it a long time ago.
Best Regards
Gregor

Hi @gregorwolf
I actually used that repo for testing. But there is not much to add. I did not use AppEngine as I used Cloud Run instead.
The only change I made was in server.js to overwrite some DB credentials from env variables. Code like this:
const dbSocketPath = process.env.DB_SOCKET_PATH || '/cloudsql';
if (process.env.DB_CONNECTION) {
cds.env.requires.db.credentials.host = ${dbSocketPath}/${process.env.DB_CONNECTION};
}
Afterwards, it was just:
docker build -t <DOCKER_TAG> .
docker push <DOCKER_TAG>
and then deploy with something like this:
gcloud run deploy shop
--image=<DOCKER_TAG>
--set-cloudsql-instances=<CLOUD_SQL_INSTANCE>
--set-secrets=DB_PASS=shop_db_pass:latest
--region=europe-west3
--project=<GCP_PROJECT>
&& gcloud run services update-traffic shop --to-latest
Reading the examples, the correct way is to inject env var VCAP_SERVICES from Secret Manager. With this, no changes are needed in the app. Rest is really about fiddling with GCP.


c/c++ version?

first, thanks for the code, which helps a lot.And Is there any c/c++ version, for cython?with no offense, this version's speed may be too slow.

No cython code is avaliable! But it would be great if you could convert a few parts into cython

here is a blog in which you can find the code write in cpp:
http://blog.csdn.net/charwing/article/details/27180421


Remove testSuiteName and calculate test suite names automatically

We need to delete TestSuiteName
Calculate testSuite name based on the relative path from the root of test repo (root save.toml) to the directory
TestName should NOT contain full path and should be relative to it's test suite

Example:

We have excludedTest in save.toml and it expects a full path from root. can be changed to relative path\name after implementation of this issue

Another idea for cleanup of save.toml, as suggested by @sanyavertolet, is to filter distinct tags, because currently tags can be repeated.


C-0078 - container_image_repository rule support docker.io

Updated rule to support cases in which docker.io image is implicitly defined.

Added support in docker.io implicit image - an image without a host (i.e. without "/") is considered as a docker hub image, therefore "docker.io/" host is concatenated to the image.
Limit registry search to hostname - extracting the host from the image to be the searched string. Adding "$" to the registry to make sure it doesn't search anywhere in the host.
Supports both regex and/or regular string.


Collect audio for farm reviews.

Motivation
Audio is not added to our Nuke reviews.
Implementation
The collection will search for a subset called "audioMain" by default but this is a plugin attribute, so can be configured per studio.
On the subset a representation is hardcoded to "wav", which is more universally compliant, but we could make this a plugin attribute if a use-case is found.
If version, representation or file is not found, it'll only warn the user rather than fail.

This seems quite dangerous and should probably be limited to solely nuke. As it is written now, it might overwrite scene collected audio from other hosts, which should take precedence.
I'd say, let's give it a host limit, so it can operate on any hosts, that don't hold audio directly inside. @tokejepsen what do you think?

Sure we could limit by host, but as it'll only ever warn users instead of failing where do you recon issues will arise?

where do you recon issues will arise

daily support tickets from all the artists who it doesn't apply to, but still warns them. We've had it on multiple occasions with pretty much each artist going to support when they get orange colour, half panicked what went wrong. The warning system in general doesn't work very well in this GUI to be honest.

Ready to merge now.

we§ll need to port this to 3.0