Using the directives and providers globally

Just wondering, if there is a way to include the angular material 2 directives and provides within a whole project, instead of including them in each component. Also, would this be a correct approach?

Ended up using this approach:
bootstrap(AppComponent, [
  provide(PLATFORM_DIRECTIVES, {
    useValue: [
      MdToolbar, MdButton, MD_SIDENAV_DIRECTIVES,
      MD_LIST_DIRECTIVES, MD_CARD_DIRECTIVES, MdInput,
      MdCheckbox, MdRadioButton, MdRadioGroup,
      MdIcon
    ], multi: true
  }),
  MdIconRegistry
]);

Is this correct? :)

@gelidus Please only file github issues for bugs / feature requests and direct questions to the mailing list or gitter.


Storing CSV without index column

P.S. Don't attach files. Please, prefer add code snippets directly in the message body.
How do we specify the data frame without index in csv format

Hi @JanuaryThomas, thanks for reaching out!
Besides it's own parameters wr.s3.to_csv()  also accepts any pandas' to_csv() parameter.
So you just need to pass wr.s3.to_csv(..., index=False).

Closing for lack of activity

Hi @igorborgest,
Using wr.s3.to_csv(..., index=False) still leaves an unnamed index column in the CSV file.
Any idea why?


Support for RZ models

I’m fairly new to homebridge and automations. I have this setup using the default model. My receiver is a TX-RZ810. When I connect to it via the eve app, the input selection is very flaky. Is there a better model to select or something I can do to improve compatibility?

Any updates? I have not been able to update the file myself.

Not something I have had a chance to look at.
Sent from my iPhone

On May 4, 2018, at 9:10 AM, VanillaXtract<EMAIL_ADDRESS>wrote:
Any updates? I have not been able to update the file myself.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

stale


feat: module attributes

Description
Problem
Resolves #5495
Summary
Pending:

[ ] Decide whether to keep attributes as String or SecondaryAttribute in ModuleData
[ ] Parsing of module attributes is not ideal (it errors on non-secondary attributes, but I think not all secondary attributes are valid for modules... but maybe it's fine because struct attributes work the same way)

Additional Context
Documentation*
Check one:

[ ] No documentation needed.
[ ] Documentation included in this PR.
[ ] [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

[ ] I have tested the changes locally.
[ ] I have formatted the changes with Prettier and/or cargo fmt on default settings.

I asked for a review but I'm sure there are still many things to do here.
For example, I couldn't make a function attached to a module attribute to create new functions (but this seems to also happen with function attributes 🤔).


[HOLD for payment 2023-06-01] Android - Threads -  Date is not truncated and very close to screen border

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Navigate to a group conversation where a 99+ thread has taken place

Expected Result:
Conversation content should not be almost in contact with screen border. If the screen is small, the content should be truncated
Actual Result:
Date of the latest message in thread is in contact with the screen border
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[ ] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: 1.3.15-5
Reproducible in staging?: Yes
Reproducible in production?: Unknown
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal team
Slack conversation: N/A
View all open jobs on GitHub
Found while executing QA for https://github.com/Expensify/App/pull/18876 - CC @grgia
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~0188f09b53362835dd
Upwork Job ID:<PHONE_NUMBER>113516032
Last Price Increase: 2023-05-18

@grgia I have a vague memory of you raising a discussion for this. Is this something that you're already working on addressing?

@Milos213 Thank you for your proposal! However, we intended to take this issue Internally as I already knew the solution and this bug was caused by my PR.
That said, we have tons of issues that are actively accepting proposals. You can always look out for the Help Wanted label to indicate that we are currently accepting proposals. You can find open jobs here, thanks!

The PR that introduced the bug has been identified: This existed since day one https://github.com/Expensify/App/pull/18274
The offending PR has been commented on: https://github.com/Expensify/App/pull/18274#issuecomment-1562554698
A discussion in #expensify-bugs has been started: https://expensify.slack.com/archives/C049HHMV9SM/p1685006794560419
Determine if we should create a regression test for this bug: No

@puneetlath I reassigned you as you were selected by puller bear originally. Would you mind helping out with the $1000 C+ review  payment for @s77rt ?

@puneetlath Accepted!

Paid!


Allow for soft cleanup (use deleted_at instead of deleting the row) for info for admins later on

Hi,
can you elaborate? I don't really understand what it requires


CSS  menu page changes if scrolling is changed in components

Describe the bug (actual behavior)

Adding another scrolling menu (or removing the scrolling from the scrolling menu that's there) to the top of the menu.html file negatively affects some of the components (namely the skeleton and the header examples). It causes some of the parts to be misaligned and no longer centered. This may also affect the added components so that they may be off-centered also.

This occurs on the html page itself, not just the test images, but as it's difficult to see I included the test images.
Expected behavior
Changing the number of components with scrolling should not affect components that come after it, or the components themselves.
Reproduction
Steps to reproduce

Open a local version of the iTwinUI project.
Either copy and paste the scroll demo or remove options 9-14 from the scroll demo. If you do both the error won't occur.
Run css visual tests (cd .\packages\itwinui-css\ and yarn test --filter=menu for faster tests) and look at backstop JS report to see differences.
Differences can also be seen on the menu.html page in the browser.

Additional information
Is this a problem with only the html page or is it an issue with the css components?

Should be fixed by #1106 as I've added display: block to the label/description (previously was inline which has a tendency to shift vertically depending on surroundings and line-height).


Fix params docstring of embedding_lookup

The first parameter of embedding_lookup actually accept a single tensor.
  if not isinstance(params, list):
    params = [params]

However, in the docstring it requires a list which is confusing.
This PR fix and unify the doc.

Can one of the admins verify this patch?

Thanks!


API - Start Workflow with variables

Hi @aelassas,
I had done 2 test on Local Variables.
First test with setup the variable value at designer (hardcoded the value). When run the workflow and it works as expected.

Second test I was trying to use API - Start Workflow with Variables. However, I get file not found error.

I am not sure what caused this error. Is it due to the incorrect JSON format?

@clvnong No, it is not due to invalid JSON. You must remove the local variables from the workflow settings panel if you want to use REST variables. Once you remove them, it should work as expected.

Hi @aelassas,
Yes, it is working as described. Thanks


feat: override application config

Which problem does the PR fix?
This PR introduces 2 new Configuration options for optimize. The options are configuration and log4j2Configuration. configuration is intended to allow a user to override the application.yaml within optimize. Meanwhile, the log4j2Configuration option allows a user to override the environment-logback.yaml in optimize.
These new options are named using bitnami's methodology for overriding application configuration files. In bitnami's postgresql helm chart, there is a configuration option that lets you override the postgresql.conf and pgHbaConfiguration that lets you override the pg_hba.conf file.
The benefit of this patch is that everything that's possible in an application's configuration should now be possible in the helm chart without any added patches to the helm chart.  And we are hoping to provide similar PRs for the rest of the components (zeebe, tasklist, operate, ...).  The other benefit is that much of our documentation is heavily focused on the application.yaml configuration options for each component, rather than the specific helm options or corresponding env vars.
Task: https://github.com/camunda/distribution/issues/188
Epic: https://github.com/camunda/distribution/issues/181

What's in this PR?
The PR adds a couple lines to the configmap to passthrough some direct strings from values.yaml.   A test environment can be spun up with the following values.yaml:
optimize:
  configuration: |-
    es:
      settings:
        index:
          number_of_shards: 3
  log4j2Configuration: |-
    <configuration>
      <if condition='property("JSON_LOGGING").contains("true")'>
        <then>
          <appender name="UPGRADE_JSON" class="ch.qos.logback.core.ConsoleAppender">
            <encoder class="net.logstash.logback.encoder.LogstashEncoder">
            </encoder>
          </appender>
          <appender name="RUNTIME_JSON" class="ch.qos.logback.core.ConsoleAppender">
            <encoder class="net.logstash.logback.encoder.LogstashEncoder">
            </encoder>
          </appender>
          <!-- Change the log level for the upgrade here. If provided, the environment variable will take precedence -->
          <logger name="org.camunda.optimize" level="${OPTIMIZE_LOG_LEVEL:-info}"/>
          <logger name="org.elasticsearch" level="${ES_LOG_LEVEL:-warn}"/>
          <logger name="org.camunda.optimize.upgrade" level="${UPGRADE_LOG_LEVEL:-info}" additivity="false">
            <appender-ref ref="UPGRADE_JSON"/>
          </logger>
          <root level="warn">
            <appender-ref ref="RUNTIME_JSON"/>
          </root>
        </then>
        <else>
          <appender name="UPGRADE" class="ch.qos.logback.core.ConsoleAppender">
            <encoder>
              <pattern>%d{HH:mm:ss.SSS} - %msg%n</pattern>
            </encoder>
          </appender>
          <appender name="RUNTIME" class="ch.qos.logback.core.ConsoleAppender">
            <encoder>
              <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
            </encoder>
          </appender>
          <!-- Change the log level for the upgrade here. If provided, the environment variable will take precedence -->
          <logger name="org.camunda.optimize" level="${OPTIMIZE_LOG_LEVEL:-debug}"/>
          <logger name="org.elasticsearch" level="${ES_LOG_LEVEL:-warn}"/>
          <logger name="org.camunda.optimize.upgrade" level="${UPGRADE_LOG_LEVEL:-info}" additivity="false">
            <appender-ref ref="UPGRADE"/>
          </logger>
          <root level="warn">
            <appender-ref ref="RUNTIME"/>
          </root>
        </else>
      </if>
    </configuration>

There is also a unit test to ensure that the volumeMount gets added properly.

Checklist
Please make sure to follow our Contributing Guide.

Before opening the PR:

[x] In the repo's root dir, run make go.update-golden-only.
[x] There is no other open pull request for the same update/change.
[x] Tests for charts are added (if needed).
[x] In-repo documentation are updated (if needed).

After opening the PR:

[x] Did you sign our CLA (Contributor License Agreement)? It will show once you open the PR.
[ ] Did all checks/tests pass in the PR?

We need that feature for all components in the same PR since it's considered a single feature (it will be easy to track, and also show in the changelog as a single entry instead of 8 entries).

pieces of feedback I've gotten from Ahmed:
Instead of having configuration and log4j2Configuration, which would require us needing to write features to add more config files in the future,  we want to have something generic in case there are more configuration files added in the future. The result would look like this:
optimize:
  configuration: |
    ...
  extraConfiguration:
    log4j2.yaml: |
      ...
    futureUnpredictableConfigFile: |
      ...

Bug we were looking at is fixed

We need to add checksums in statefulset + deployments to ensure that a helm upgrade with configmap changes will also trigger a deployment/statefulset update.


Remove stable rapidsai conda channel (non-release jobs)

This PR tests the removal of the rapidsai conda channel. PR should not be merged.

Closing, see https://github.com/rapidsai/gha-tools/pull/102#issuecomment-2048005971


Editor opens internal typeshed file instead of real file in venv with Jedi Language Server

Type: Bug
Behaviour
Expected vs. Actual
Expected:
When Ctrl-clicking on a function from a given package, the editor opens the actual file in which the function definition is found in the virtual environment.
Actual:
When Ctrl-clicking on a function from a given package, the editor opens the typeshed file matching the definition installed within the extension itself.
Steps to

Create a new folder/workspace and open vscode;
Create a new Python file with eg.:

import flask
flask.Response().from_app()

(Using Flask here as an example)

Create a new venv: python -mvenv env && source env/bin/activate
Install flask: pip install flask
Mouse hover over from_app and click.

The editor will bring up the typeshed in the extension directory, ~/.vscode-oss/extensions/ms-python.python-2023.4.1-universal/pythonFiles/lib/jedilsp/jedi/third_party/typeshed/third_party/2and3/werkzeug/wrappers.pyi instead of opening env/lib64/python3.X/site-packages/werkzeug/wrappers/response.py, which is what eg. mypy will use to check the project against.
Diagnostic data

Python version (& distribution if applicable, e.g. Anaconda): 3.10.
Type of virtual environment used (e.g. conda, venv, virtualenv, etc.):
Value of the python.languageServer setting: Jedi

Note: I am specifically using Jedi. Also I wanted to reopen the original issue  #20779 but it is "locked as resolved and limited conversation to collaborators".

I forwarded the bug in jedi-language-server as the completion when I invoke jedi myself is showing me the up-to-date Flask information.
Thank you for the feedback.


installer hangs on Linageos 17.1/Android10

Describe the bug
Installation hangs on Android10/Linageos17.1
Expected behaviour
Install or at least display an error message
Steps to reproduce the issue
LinageOS 17.1 on Samsung S5NeoLTE
Technical details
Android 10, Linageos 17.1

It works fine on a ONEPLUS A3003 with LineageOS 17.1 (June 4, 2020).
Have you tried different things like rebooting the phone before trying to install it?

We officially only support Android versions with installed Google Play services and installation via Google Play Store (see FAQ). Please refer to #75 for a community driven initiative for removing that dependency.
Best regards,
TK
Corona-Warn-App Open Source Team

I can also confirm that the App installs perfectly from Google Play Store on LineageOS 16 and 17. As noted already you need Google Play Services, but that's what Lineage's option to install Gapps are for.


Dashboard: empty "family details" page

http://<IP_ADDRESS>/details/Zeyada/
http://<IP_ADDRESS>/details/Diplomata/

Got it!
That was bad handling of dev_font=None when a corresponding upstream repo is not registered in the fontprojects.csv config file.


[Enhancement] Add rate limit macro to limit too much log print

What type of PR is this：

[ ] BugFix
[ ] Feature
[x] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Which issues of this PR fixes ：
Fixes #11754
Problem Summary(Required) ：
Too much log print when required version not exist in version graph, this log is useful so we can't just remove it, but too much print will cause performance issue. So I add a macro RATE_LIMIT，that we can use it to limit the log print rate.
Usage, e.g
// limit that do_something() can only be called one time per second max.
RATE_LIMIT(do_something(), 1000);

Checklist:

[x] I have added test cases for my bug fix or my new feature
[ ] I have added user document for my new feature or new function

consider make RATE_LIMITE log only, and add some var like google::COUNTER to notice user how many logs are skipped. Like example in LOG_EVERY_N:
The "Got lots of cookies" message is logged only when the variable num_cookies exceeds 10. If a line of code is executed many times, it may be useful to only log a message at certain intervals. This kind of logging is most useful for informational messages.

LOG_EVERY_N(INFO, 10) << "Got the " << google::COUNTER << "th cookie";

Also, looks like glog has similar
Other times, it is desired to only log a message periodically based on a time. So for example, to log a message every 10ms:

LOG_EVERY_T(INFO, 0.01) << "Got a cookie";
Or every 2.35s:

LOG_EVERY_T(INFO, 2.35) << "Got a cookie";

It seems that LOG_EVERY_T isn't included in our glog current version... Add macro counter RATE_LIMIT_SKIP_CNT.

run starrocks_fe_unittest

use RATE_LIMIT_SKIP_CNT in log? e.g.
xxx << "log_count=" << RATE_LIMIT_SKIP_CNT

Used in RATE_LIMIT, RATE_LIMIT_BY_TAG not support RATE_LIMIT_SKIP_CNT.

run starrocks_admit_test

run starrocks_admit_test

run starrocks_tscancode

I've received your email and will will reply to you as soon as possible after the vacation.————————————This is an auto reply email from QQ Mail.


Can't run on Desktop: cannot find class com.badlogic.gdx.ApplicationListener

Issue details
There appears to be a bug on IntelliJ Idea which prevents the app from launching on Desktop from both IntelliJ and Android Studio on a Mac (still to confirm if it affects Windows as well). A Reddit post was created on /r/libgdx as well as an issue created on Jetbrains issue tracker (see https://www.reddit.com/r/libgdx/comments/612c7d/can_run_on_android_cannot_run_on_desktop/ for details).
Even if it's no a libGDX bug I believe it is helpful to keep track on the progess of this as many users will see this crash when trying to launch on desktop using their IDE, feel free to close it otherwise.
Reproduction steps/code
Try to launch on Desktop a libGDX project using Intelli J version 2017.2.1 or Android Studio 2.3.3 on a Mac.
Version of LibGDX and/or relevant dependencies
1.9.6
Stacktrace
java.lang.ClassNotFoundException: cannot find class com.badlogic.gdx.ApplicationListener

Please select the affected platforms

[ ] Android
[ ] iOS (robovm)
[ ] iOS (MOE)
[ ] HTML/GWT
[ ] Windows
[ ] Linux
[x] MacOS

How are you importing the project?

Ok, I've been trying different stuff and it may be an issue with my specific IDE and not related to the Reddit post. If I import a new project on Android Studio (File -> New -> Import Project) it runs on Desktop through the IDE Ok for a while and then starts failing (with the described error) and never recovers. On several attempts the trigger to start failing has been different so either I try to find out what caused it or I may create a fresh new environment in case it's gone corrupt. I'll close this issue for the moment.

Found the issue (it's not related to the Reddit post described in Issue Details). Setting Gradle wrapper to version 3.3 fixes it (it took me a bit to find out because Gradle version changes were not being applied immediately). On Gradle 3.5.1 or 4.0.2 the game doesn't launch on Desktop from the IDE neither on Android Studio nor Idea both on Windows and Mac even if it does from gradlew using console.

I'm facing the same issue right now... Is downgrading really a fix?  Moreover, on the latest Android Studio, you're forced to use the updated version of Gradle plugin and this problem cannot be fixed with this workaround.
I believe the problem should be fixed on a deeper level.

This is something discussed here: https://github.com/libgdx/libgdx/issues/4946
Android Studio 3.0 uses Gradle 4.+
Unfortunately LibGDX is not compatible (for now). it will be some day according to https://github.com/libgdx/libgdx/issues/4698
You can use another IDE or an older version of Android Studio using on of the links provided in the issue above.
and yes, it is a work around for now.

I got it to work with a minor hack and some user intervention required. Change task run(...) to task runAndroid(...) in the android build.gradle. I believe the issue is that the desktopbuild.gradle also has a task called run. Android studio appears to be blending and/or calling both causing the error.
The only issue is that it doesn't stop the running task when you exit the application. To stop the running process just ctrl-c or hit stop in Android Studio. This isn't ideal, but it allows running. Debug doesn't work, but I will continue to pick away at this to get a work-around while waiting on them to update Intellij.

Debugging still doesn't work yet, but that will be next.

Ok that was much more painful than it needed to be. Turns out you can just tell Android Studio to run a JAR application and execute gradle :desktop:dist before hand.
For this approach set Path to JAR to PROJECT_ROOT\desktop\build\libs\desktop-1.0.jar and Working Directory that same as you would for running an application. Lastly in the Before launch at the bottom I added a gradle task for :desktop:dist.

Just for clarity, you need to add a new run configuration, you can't modify your existing one since it isn't the proper type.

Open the Run/Debug Configurations page.
Create a new Configuration of type JAR Application.
Set the Path to JAR and Working directory as above.
Add the Before launch gradle task as above.

See #4698 my last comment it is now fixed using normal Application configuration.

You must be using at least gradle 4.6 to run on newest IDEA and AS.

So 4.6 Gradle, 3.12 AS and what version of Build tools?
Desktop, Android and iOS work fine on this?

see snapshot versions declared here: https://libgdx.badlogicgames.com/versions.html

Updating I get Program type already present: com.badlogic.gdx.sql.Database
Message{kind=ERROR, text=Program type already present: com.badlogic.gdx.sql.Database, sources=[Unknown source file], tool name=Optional.of(D8)}

Invalidate caches, and run a gradle sync then a full rebuild

So I had to remove the sql libs for this to compile for Android.
Desktop still does not run, it errors with (All I did is right click run DesktopLauncher)
java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203)
at com.android.build.gradle.BasePlugin.lambda$configureProject$1(BasePlugin.java:436)
at sun.reflect.GeneratedMethodAccessor369.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230)
at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234)
at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140)
at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy124.graphPopulated(Unknown Source)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:128)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:46)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
at org.gradle.initialization.DefaultGradleLauncher$ExecuteTasks.run(DefaultGradleLauncher.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.initialization.DefaultGradleLauncher.runTasks(DefaultGradleLauncher.java:210)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:140)
at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:115)
at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:78)
at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:75)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152)
at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:100)
at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:75)
at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:53)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$1.run(RunAsBuildOperationBuildActionRunner.java:43)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:40)
at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:49)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:32)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:57)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:32)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:64)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:29)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:45)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745)

I'll repost the solution of @adam4813 that is mentioned in #4698 because it also took me a while to stumble upon it.

I changed the Before Launch to Build Project instead of Build when using an Application configuration. To do this, in the Before launch box at the bottom of the Run/Debug Configuration dialog, for an Application configuration, click the green + and add Build Project and then select the Build line and click the red - to remove it.

I'm struggling with the same error, but for iOS target (RoboVM).

Exception in thread "main" java.lang.NoClassDefFoundError: ru/serdjuk/m3l/game/M3lMain
at ru.serdjuk.m3l.game.desktop.DesktopLauncher.main(DesktopLauncher.java:13)
Caused by: java.lang.ClassNotFoundException: ru.serdjuk.m3l.game.M3lMain
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more
result of SHIFT+10 (Desktop)
gradlew desktop:run  -  is working, but it's uncomfortable
I moved the contents of the project's root folder to a new project without updating the gradle, but the error remained
how to fix this error ?
AS 3.1.3
com.android.tools.build:gradle:3.1.0
gradle-4.6-bin.zip

Please provide the full instructions to reproduce your issue, from setting up a new project, what configurations you are choosing and how you are importing. If you can reproduce with a new project please open a new issue and we will resolve it.

can I send you an e-mail to my project for verification?
I do not remember all the operations that I did with the project, but all were related to the replacement of the gradle versions and the plugin.
... and I have bad English.

The problem was in Convert Java file to Kotlin file
When the main class in the project core is the Kotlin file, this error occurs.

I had the same Problem.
I just created a new gradle configuration named Desktop, set the Gradle project to the project's path and in Tasks I entered:
desktop:run

@burf2000 >  I was getting your last error with gradle 4.5.1 and google's gradle android plugin 3.1.0.
Updating to gradle 4.6 and gradle android 3.2.0 fixed the issue, as suggested in https://issuetracker.google.com/issues/77605097.

Still having thes issue, any fix?

Any fix for gradle 8.4 or 7.5.1?

Any fix for gradle 8.4 or 7.5.1?

@ImMedved I kinda doubt this is the same bug, 6 years later, with no reports of the issue occurring for almost 5 years. Can you tell us what you're trying (what IDE you use, what version is it, what are you clicking...) and any error/warning output that you can find when it isn't working? Usually this sort of thing is resolved by invalidating caches and importing the project again. In some cases you may find closing IDEA/AS, deleting or moving the .idea and/or .gradle folders (both with a dot at the start!) and reopening the project can help. If the error messages aren't the same or similar to the initial post, this may belong in a new issue, where hopefully people can take a fresh look. This sort of error happens pretty often with IDEs in general, and isn't specific to libGDX.


Added CSS Animation

Worked On issue Number #466
Issue Type: Feature Addition
#466 Fixed : Added CSS Animation of Two Planets Revolving.
Made this by seeing the tutorial.
The video link is:
https://youtu.be/ib8AYFCZtdk

Please Check and Review it.

https://deploy-preview-488--amazing-css-effects.netlify.app/css animation of planet revolving/

I see. I will see what can I do.

Just mention the credits(reference video/article/site) in the PR description if you have refereed any

Added ma'am

@VidhiBhatt01


Limit retrieveAll results

:tada: This issue has been resolved in version 2.2.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Overflow menu displaying too low and first item not focused on open

In the below screenshot, note that:

the overflow menu in the first row has been opened, yet it displays in the 2nd row.
the focus has not been placed on the first item in the menu. Because there is no focus placed,
the (escape, home, end, arrows) aren't usable for the open menu.
These two issues seem to have been introduced in the last 2 or 3 versions.

Is this a feature request (new component, new icon), a bug, or a general issue?

bug

Is this issue related to a specific component?

Overflow Menu

What did you expect to happen? What happened instead? What would you like to see changed?

The Overflow Menu should be displayed directly under the Overflow Menu button on mouse-click, mouse-enter or keyboard-space of the button.
The first row of the Overflow Menu should be focused on open.
After an item in the menu is selected, the menu should close and the focus should return to the overflow menu button.

What browser are you working in?

FF, Chrome

What version of the Carbon Design System are you using?

"carbon-components": "^9.53.2",
"carbon-components-angular": "^2.0.8",

What offering/product do you work on? Any pressing ship or release dates we should be aware of?

IWR

I'm having trouble reproducing this (the item displaying too low) in the storybook ... if anything it's displaying a touch too high

It seems like something's changed recently because I was able to remove some extra positioning code ... it's possible updating carbon-components will fix the positioning issue


Benchmark exactly how much weight on-chian seq-phragmen takes.

https://github.com/paritytech/substrate/pull/8167 will add an interface where election providers must return the amount of weight that they consume. Currently, the on-chain sequential phragmen simply takes the whole block. This needs to change and become more accurate. We need to measure exactly how much is the runtime of seq-phragmen, excluding any storage operations.
Note that pallet-elections-phragmen does this, but the benchmarks there do include storage operations, as well. Nonetheless, this is a good source of inspiration.
Lastly, note that this code currently lives in frame-election-providers-support, and is not a pallet exactly. I am not sure if our benchmarking machinery is capable of dealing with this or not. cc @shawntabrizi

We don't do onchain phragmen anymore, bye bye.


The evaluation results appear to be abnormal

Thank you for the wonderful work! However, after successfully running the evaluation code, the outputs shown below appear to be abnormal. Could you help me identify the problem? Additionally, could you provide the inference code that takes camera intrinsics and images as inputs and outputs the 3D Gaussians? This would allow me to visualize the scene freely with any rendering tools.

Hi, could you please provide more details on how to run the code, such as the evaluate command? I will provide the script of saving 3D Gaussians soon.

Thank you for the reply. I ran the code as follows:
python -m src.main +experiment=re10k
mode=test wandb.name=re10k
<EMAIL_ADDRESS>dataset.re10k.view_sampler.index_path=assets/evaluation_index_re10k_subset.json
checkpointing.load=./checkpoints/re10k.ckpt
test.save_image=true
evaluation_index_re10k_subset.json is the subset extracted from the evaluation_index_re10k.json
one sample is： "5aca87f95a9412c6": {"context": [58, 138], "target": [66, 104, 113], "overlap": 0.51419}

Hi, the command seems to be correct. I double-checked the code and there is no problem. So there are several possible causes:

Check if you have modified any part of the code, if so, maybe you can try to use the official code first and check if the result is correct.
Check that the dataset is formatted correctly. pixelSplat provides test data that also works for us.

Hello, I'm going to close it as long term inactivity, if you still have questions please feel free to let me know.


Core web

Merged Core branch into Core-Web and updated the rest of Core-Web to ASP.NET Core RC2.

Cripes your Git does some odd stuff! It's difficult to see the relevant changes amongst all that.

I used the GitHub desktop app this time so I'm not sure what exactly you mean. I started by bringing the ImageProcessorCore project in the Core-Web branch up to date with the ImageProcessorCore project in the Core branch. The GitHub desktop app just did whatever it did for me when I clicked "Update from JimBobSquarePants/Core". So there were a lot of your older commits that got merged in.
I'm willing to rework this but I honestly don't know what I should have done differently, it seemed pretty straight forward at the time. Let me know if you think I did something fundamentally wrong.

Och I don't know what might of happened. Git has a mind of its own sometimes. :smile:
I'll get this merged in now anyway so we can get started on nailing a really  great solution.
Thanks again, I really appreciate it!


⚠ Bofrost.nl has degraded performance

In 78f75f0, Bofrost.nl (https://www.bofrost.nl) experienced degraded performance:

HTTP code: 200
Response time: 1167 ms

Resolved: Bofrost.nl performance has improved in 72cc31a after 14 minutes.


wanna contribute to this project in a special way

Actually this is not a message reporting issue.
I found comma.ai is a great project. But it would be not easy for users to build the platform. As I am a hardware guy, I want to build the platform and sell it at low price. So those who are good at software but poor at hardware could easily work on this project.
Not sure if it could be helpful.

Just mention geohot and magically he might appear
On Tue, May 9, 2017 at 6:15 PM, wilson-elechouse<EMAIL_ADDRESS>wrote:

Actually this is not a message reporting issue.
I found comma.ai is a great project. But it would be not easy for users
to build the platform. As I am a hardware guy, I want to build the platform
and sell it at low price. So those who are good at software but poor at
hardware could easily work on this project.
Not sure if it could be helpful.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/commaai/neo/issues/17, or mute the thread
https://github.com/notifications/unsubscribe-auth/AE9Ev-urFO_3us69_aBWGQwRwsMoD95wks5r4CCwgaJpZM4NU96k
.

@geohot
What do you think of my suggestion?

I love this！

We encourage this!


Where is the documentation repository?

I'm sorry if I managed to miss an obvious location.   I would like to propose edits to pages such as https://dev.yathit.com/ydn-db/doc/query/cmpidx.html.  In which gitHub repository should I search?

Hi @merriam website content are in https://github.com/yathit/ydndb-website-content The page is in https://github.com/yathit/ydndb-website-content/blob/master/ydn-db/doc/query/cmpidx.markdown
Feel free to edit. I will update after your edition. Thanks.


Advanced validation

I need to validate fields before process query/mutation. For example, I need to check is email have correct format, and is password strong enough.
Seems that is not possible for now, I can't find any examples in documentation and source code.
I suggest to create generic method Validate in ArgumentDescriptor that accepts validation function. This function must return validation result. Validation result contains flag, that indicates validation success, and optionally contains error message, if validation was failed.
Here is an example of Validate function usage:
descriptor
    .Field(t => t.RegisterUser(default, default))
    .Type<NonNullType<UserType>>()
    .Argument("email", a => a
        .Type<NonNullType<StringType>>())
        .Validate<string>(x => ValidationUtility.IsValidEmail(x))
    .Argument("password", a => a
        .Type<NonNullType<StringType>>())
        .Validate<string>(x => ValidationUtility.IsPasswordStrong(x));

Also, I think this method can have more wide application, we can create it in FieldDescriptor and use for check user permissions on mutation or query.

@Dolfik1: This looks promising. The resolver function would than have to call those validators and throw a FieldError which than would manifest in the result error collection.
With the current version you are able to throw a QueryException:

if(!ValidationUtility.IsValidEmail(x))
{
    throw new QueryException(new FieldError("The message is not valid",  context.FieldSelection));
}

Is it possible to allow developers create custom extension methods for Argument/Field Descriptor? This feature will make HotChocolate very flexible library. It is something like attributes in classic web api.
I can create extension methods right now, but seems that it is not possible to influence the processing of the request.
    public static class Extensions
    {
        public static IObjectFieldDescriptor AllowUnauthorized(
            this IObjectFieldDescriptor descriptor)
        {
            return descriptor;
        }
    }

The spec allows for directives which can be use for this. We are currently only supporting the built-in directives. We do have custom directives on our roadmap. I want first to finish work on subscriptions before doing this.
With directives you basically can annotate schema and query elements and use it to change the default execution behaviour.
{
    person {
        firstname @skip(if: true)
        lastname
    }
}

Once we have implemented these for custom use you could use the descriptors in code-first and annotate this:
public static class Extensions
    {
        public static IObjectFieldDescriptor AllowUnauthorized(
            this IObjectFieldDescriptor descriptor)
        {
            descriptor.Directive(new AuthDirective());
            return descriptor;
        }
    }

I think we could do custom schema directives very quickly. I am currently solving some issues with the query directives so that it is easy to manipulate the execution behaviour and feels nice to use.

Once we have implemented these for custom use you could use the descriptors in code-first and annotate this:

Seems you have a typo in your code. Extension method should have name Authorized.
In my example, I would like add AuthDerective to all queries/mutations, and remove it by using AllowUnauthorized method.
It is like AuthorizedFilter in Web API, that makes all methods required authorization by default, and AllowUnauthorized attribute, that allows to execute method without authentication.

I think we could do custom schema directives very quickly. I am currently solving some issues with the query directives so that it is easy to manipulate the execution behaviour and feels nice to use.

Thank you! This is a great news!

This issue is related to #57.

@Dolfik1: Could you have a look at #57 if that would be sufficient for your use cases?

@michaelstaib yes, this is seems what I need to. But I have some questions:
How can I use dependency injection in OnBeforeInvoke and OnAfterInvoke methods?
What is resolverResult in OnAfterInvoke method?
What should return OnAfterInvoke method?

OnAfterInvoke is called after the field resolver is called. The resolver result is the .net object that was returned by the field resolver. It is not yet completed, means that it was not yet serialized.
The OnAfterInvoke method returns the result that shall be passed into the value completion.
This opens up some nice scenarios where you could implement a sort directive which gets the resolver result, lets say a list of strings which is than sorted. The sorted list is that returned and will be used instead of the original one. I mean sort is not the best example since you would sort in-place and return the same list that was passed in.  But it might give you an idea what it is for.
I am thinking about breaking that interface into two interfaces, so that one has not to implement both when you do not need to implement both. In the case off a validation you might just want to implement OnBeforeInvoke.
Regarding your question about dependency injection I am still not quite sure what to do. You can always access all services via the resolver context. This is a service-locator-pattern way which I personally do not favour to much. Constructor injection feels better for me. So, the directive might not directly implement the interface but register its implementation.
What I mean with that is something like the following:

public class MyValidationDirective
    : Directive
{
    protected override void Configure(IDirectiveDescriptor descriptor)
    {
        descriptor.Middleware<ValidatorMiddleware>();
    }
}

public class MyValidatorMiddleware
    : IResolverMiddleware
{
    public MyValidatorMiddleware(MyDependency foo)
    {

    }

}

With that we could also allow to just use a delegate as middleware:

public class MyValidationDirective
    : Directive
{
    protected override void Configure(IDirectiveDescriptor descriptor)
    {
        descriptor.OnBeforeInvoke(c => { /* code */ })
    }
}

#268

@Dolfik1 With preview 3 you should be able to implement the validation scenario.

@Dolfik1: I have started the preview 3 build. Could you have a look at the following integration test that shows how a validation could be implemented with executable directives. I am still adding more functionality to this feature like directives on schema etc. But you can now implement your use case. Please give me some feedback.

Hi @Dolfik1,
what du you think? Can I close this issue or do you have change requests?

Hi. Can you wait few days? I check it during the weekend.

Sure, I will wait for your feedback.

I have some questions:

Can I add directive to all queries/mutations by default, and remove it via IObjectFieldDescriptor extension method for specified queries and mutations? I want make authorize directive required by default for all queries and mutations.
Can I use bitwise operations for DirectiveLocation to specify Location?
For example:

descriptor.Location(DirectiveLocation.Mutation | DirectiveLocation.Query);

ReSharper shows warning: Bitwise operation on enum which is not marked by [Flags] attribute

Can I add directive to all queries/mutations by default, and remove it via IObjectFieldDescriptor extension method for specified queries and mutations? I want make authorize directive required by default for all queries and mutations.

Not by default exactly, but if you put the directive on the query type than all query fields will inherit it if it is an executable directive.

Can I use bitwise operations for DirectiveLocation to specify Location?

You can call location multiple times and add multiple locations. But we could also mark DirectiveLocation to be flags. The descriptor would have to be reworked though.
Moreover, I have been thinking this weekend to seperate directives and middleware and go a way that is more in line how asp.net works. So, we could change the implementation that you would have to register a middleware, almost the same like in asp.net. Each middleware then can use directives in order to change the execution behaviour.
There are some drawbacks here. The current implementation supports pipelining where the resolver value can be transformed during the execution.
Lets say we just have a GraphQL SDL like the following:
type Query {
  person: Person
}

type Person {
 ...
}

we could now add our executable directives and make this schema executable without writing any code.
type Query {
  person: Person @httpGet(url: http://someUrl) @json(path: "persons.person")
}

type Person {
 ...
}

Since with the current implementation the resolvers are chained the resolver result flows to each resolver. So, httpGet fetches some web content and json takes the content and gets some part of the json and throws it back into the execution pipeline.
Since middlewares are currently bound to directives this world quite well.
I am currently in Germany and on my way back to Zurich. I will elaborate on this a bit more once I am back tomorrow.

 Moreover, executable directives are inherited. So, executable directives on a type flow onto all the fields by default. The directives on a field flow onto the field selection in a query.
Directives on interfaces flow onto objects and so on....

Not by default exactly, but if you put the directive on the query type than all query fields will inherit it if it is an executable directive.

OK, thanks. I am little bit figured out, and have an idea how to implement what I want.

You can call location multiple times and add multiple locations. But we could also mark DirectiveLocation to be flags. The descriptor would have to be reworked though.

That's would be great. Bitwise operations is most obviously for me to specify multiple locations.

Moreover, I have been thinking this weekend to seperate directives and middleware and go a way that is more in line how asp.net works. So, we could change the implementation that you would have to register a middleware, almost the same like in asp.net. Each middleware then can use directives in order to change the execution behaviour.

Sounds good, but I do not totally understand how it will be implemented.

Is it correct behaviour? I can try to fix it and make PR, if this behaviour wrong.

Is the directive associated with the type? Can you post your directive code?

Is it correct behaviour? I can try to fix it and make PR, if this behaviour wrong.

Is the directive associated with the type? Can you post your directive code?

I have not access to code right now, but you can try to change this code to generic way, and integration test must be failed. I used the same code to reproduce the behavior.

Ah, now I understand. No, in this case the behaviour is correct. So, let me explain this example in more detail.
I have two directives, one acting just as a middleware. This directive has no arguments and is not associated with a .net type.
public class ExecuteArgumentValidationDirectiveType
        : DirectiveType
    {
        protected override void Configure(IDirectiveTypeDescriptor descriptor)
        {
            descriptor.Name("executeValidation");
            descriptor.Location(Types.DirectiveLocation.Object);
            descriptor.OnBeforeInvokeResolver<ExecuteArgumentValidationMiddleware>(
                t => t.Validate(default));
        }
    }

The type ExecuteArgumentValidationMiddleware just contains the middleware logic. So in our case it has the validation logic.
Since this type has no .net representation you can only use the name or the ast node to associate the directive with your type.
The second directive type...
public class ArgumentValidationDirectiveType
        : DirectiveType<ArgumentValidationDirective>
    {
        protected override void Configure(
            IDirectiveTypeDescriptor<ArgumentValidationDirective> descriptor)
        {
            descriptor.Name("validate");
            descriptor.Location(Types.DirectiveLocation.ArgumentDefinition);
            descriptor.BindArguments(BindingBehavior.Explicit);
        }
    }

... has a .net type representation ArgumentValidationDirective.

But if you want you can add the flags functionality so that location can be defined bitwise. The descriptor will still have to have a list of directive location underneath. Do you want to create a PR for that?

Yes, sure. Please check my PR.

I think we need throw exception on startup if wrong directive name setted.

Yes, there should be a schema exception on Schema.Create.
So, I think we should report this error during schema creation. In the directive type class is a method called OnRegisterDependencies. The type of the graphql schema has 3 initialisation phases.

Creation -> This is when the descriptors are executed and the actual type object is created.
RegisterDependencies -> This is called by the type initialization flow and allows the type object to report their dependencies on other types in the schema.
CompleteType -> The type can now request all its dependencies from the schema and finalize itself. After all types are completed the schema and its types become immutable.

An error can be reported during phase 2 and 3 via the initialisation context.
Just as a little background for you how the types work.
Regarding the non-generic DirectiveType:
The untyped (non-generic) variant of Directive is useful when we build a schema from the graphql sdl (Schema First). So, basically you can soon provide Hot Chocolate with a schema and add some directives and the schema automatically maps a database without any code needed.

So, what we need to do next to get this feature finally out:

[ ] Report Type Validation Issues (Name is missing or invalid). -> context.ReportError()
[ ] Write some more integration tests that show a view directive use-cases
[ ] Write tests that show the execution engine error behaviour is correct (I am currently working on this one)
Documentation

Do you have anything else that you think has to be done to get this feature finished?

#278

Do you have anything else that you think has to be done to get this feature finished?

I have some ideas about InvokeResolver. We can make interface IInvokeResolver:
interface IInvokeResolver
{
    void Invoke(IResolverContext context);
}

And inherit it in our resolver:
class ExecuteArgumentValidationMiddleware : IInvokeResolver
{
    void Invoke(IResolverContext context)
    {
        ...
    }
}

and then use it in directive configuration:
descriptor.OnBeforeInvokeResolver<ExecuteArgumentValidationMiddleware();

This is classic OOP way, this way is more explicit and obvious to people previously working with other frameworks. Dependencies can be injected in ExecuteArgumentValidationMiddleware  constructor.
What do you think about this?
Few days ago you said about splitting directives and middleware, did you have any progress in this?

Few days ago you said about splitting directives and middleware, did you have any progress in this?

No, the current solution still feels better at the moment.

void Invoke(IResolverContext context)

I originally started with an interface but have abandoned the idea because of the following issues:

The delegate has less overhead.
Member bindings allow strongly typed middleware methods:

public Task<string> MyResolverFunc(Person previousResolverResult [DataLoader]SomeDataLoader loader)

With the interface one would be stuck fetching everything from the context. Feels like using some kind of service locator pattern.
We still could introduce an interface to provide another way to specify a middleware.
I just have looked up how AspNetCore Is implementing that. So, they provide an extension methods that lets you use interfaces.
see here:
https://github.com/aspnet/HttpAbstractions/blob/07d115400e4f8c7a66ba239f230805f03a14ee3d/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/UseMiddlewareExtensions.cs
We could introduce it this way. The delegates and member bindings would execute faster but you could use an interface to specify a middleware.
What are your thoughts on that?

But maybe we should get rid of OnBeforeInvoke and OnAfterInvoke and just have the OnInvoke.... This would make the execution pipeline cleaner.

The delegate has less overhead.

It depends. How you do method invoke?
We can try to use struct in middleware, and instantiate it on stack. That should be very fast, and with zero allocation. We can allocate memory for struct manually, but I have no idea how to inject dependencies fast enough.

But maybe we should get rid of OnBeforeInvoke and OnAfterInvoke and just have the OnInvoke.... This would make the execution pipeline cleaner.

Is there any case, when Before/After might be useful?

Regarding the interfaces lets implement the interface support like Microsoft did it with their extension method. This way one can use it however one prefers it.
Moreover, I have reviewed how they do their middleware and I think I will redesign our base delegate to work similar. Let me do some foundational work and then if you like we could split the work.

Let me do some foundational work and then if you like we could split the work.

OK, let me know when you finish your work.

@michaelstaib I wrote small benchmark to measure method call:
                          Method |     Mean |    Error |    StdDev | Allocated |
-------------------------------- |---------:|---------:|----------:|----------:|
 ExpressionWayDirectMethodInvoke | 134.7 ms | 4.119 ms | 11.883 ms |       0 B |
             ExpressionWayStruct | 136.3 ms | 3.625 ms | 10.458 ms |       0 B |
        NativeDirectMethodInvoke | 128.6 ms | 2.604 ms |  7.128 ms |       0 B |
                    NativeStruct | 134.9 ms | 4.197 ms | 12.308 ms |       0 B |

here is code: https://gist.github.com/Dolfik1/d94b75ceb555c662c5da057d2813761d
each test method call OnInvoke method 100000 times, but:
ExpressionWayDirectMethodInvoke - makes method call via generated expression for exist object.
ExpressionWayStruct  - makes method call via generated expression, but new struct instance created per call.
NativeDirectMethodInvoke - same as 1, but without generate expression.
NativeStruct  - same as 2, but without generate expression.
As you see, overhead with new object per call very small. I used struct to make all memory allocations on stack, so GC also does not make any overhead.

I will upload the benchmarks tomorrow there were some issues with your implementation since you used var x = new Class() which than optimises quite differently. Moreover, when the invocations return real data instead of calling console.writeline the result changes again.
Last but not least when results are generated it is important to return those to the benchmark engine so that the jit does not optimise those away.

But what I also checked by studying the asp.net core implementation is that they have a convention based middleware. Meaning, that event without interface you can do something like the following:
app.Use<MyMiddlewareClass>();

So, no need to mark the actual method that shall be used.

I think I will get the middlewares refactored by tomorrow. You could then start integrating the interface support if you like.

@Dolfik1: I was a little bit lazy on the weekend so I have only now finished my work on the middleware.
It feels now a lot more like asp.net.
Regarding the interface. The interface would look something like the following now:
public class IFieldMiddleware
{
    Task InvokeAsync(IDirectiveContext context);
}

The delegate works almost the same like in asp.net core:
desc.Middleware(next => context =>
{
   context.Result = "Foo";
   next.Invoke();
});

The nice thing about this delegate is that basically you provide a factory that returns a delegate that represents the real invocation. This way you can short-circuit the pipeline.
With the interface short-circuiting the pipeline can be done by injecting the next pipeline into the constructor.
With the convention based approach in cases you do not want to bother about the next delegate the generator will take care of that. In cases where you inject the next delegate you as a developer are responsible for calling it.
I will write some more tonight on how to use the middleware.

@Dolfik1: I have started work on the documentation but will not manage to write everything today.
We should create a slack channel to have another way to communicate.

The documentation is here.... but I am still working on it:
https://github.com/ChilliCream/hotchocolate-docs/blob/master/docs/directive-middleware.md

I check middleware implementation later.

@Dolfik1: I have started work on the documentation but will not manage to write everything today.
We should create a slack channel to have another way to communicate.

It would be a good idea.
I am possibly found a bug. GraphiQL does not show directives, that declared in fields.

I have opened a slack channel https://join.slack.com/t/hotchocolategraphql/shared_invite/enQtNDUyMjIxOTc1MTU3LWNlN2ViMGM5YTVhMWI3MzcwNDdjOTVkYWQ5ODZkMjJiODIwZjY5MzYzODc1Zjg5NDE5ZDQ4Zjk0MGExZWMzZGY

I will close this issue and create follow up issues for interface support and so on....


Downloading cache larger than 2gb hangs

No longer seeing #205, but downloading the cache did mysteriously hang around 2gb:
2022-04-15T03:51:02.5325121Z Received 570425344 of<PHONE_NUMBER> (19.6%), 67.9 MBs/sec
2022-04-15T03:51:03.5324262Z Received 662700032 of<PHONE_NUMBER> (22.8%), 70.1 MBs/sec
2022-04-15T03:51:04.5325439Z Received 754974720 of<PHONE_NUMBER> (26.0%), 71.9 MBs/sec
2022-04-15T03:51:05.5321477Z Received 838860800 of<PHONE_NUMBER> (28.9%), 72.6 MBs/sec
2022-04-15T03:51:06.5322190Z Received 922746880 of<PHONE_NUMBER> (31.7%), 73.3 MBs/sec
2022-04-15T03:51:07.5329462Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (34.9%), 74.4 MBs/sec
2022-04-15T03:51:08.5332008Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (37.8%), 74.8 MBs/sec
2022-04-15T03:51:09.5327952Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (40.8%), 75.4 MBs/sec
2022-04-15T03:51:10.5336991Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (43.7%), 75.7 MBs/sec
2022-04-15T03:51:11.5330673Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (46.3%), 75.5 MBs/sec
2022-04-15T03:51:12.5339727Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (48.9%), 75.3 MBs/sec
2022-04-15T03:51:13.5340839Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (51.4%), 74.9 MBs/sec
2022-04-15T03:51:14.5341299Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (54.2%), 75.1 MBs/sec
2022-04-15T03:51:15.5344468Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (56.8%), 75.0 MBs/sec
2022-04-15T03:51:16.5337950Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (59.4%), 74.9 MBs/sec
2022-04-15T03:51:17.5340312Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (62.2%), 74.9 MBs/sec
2022-04-15T03:51:18.5338627Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (64.8%), 74.8 MBs/sec
2022-04-15T03:51:19.5337911Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (67.2%), 74.5 MBs/sec
2022-04-15T03:51:20.5346200Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (69.8%), 74.4 MBs/sec
2022-04-15T03:51:21.5342739Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (72.4%), 74.3 MBs/sec
2022-04-15T03:51:22.5347765Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (73.7%), 73.0 MBs/sec
2022-04-15T03:51:23.5359714Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (73.7%), 70.4 MBs/sec
2022-04-15T03:51:24.5374917Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (73.7%), 68.1 MBs/sec
2022-04-15T03:51:25.5388428Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (73.7%), 65.9 MBs/sec
2022-04-15T03:51:26.5400687Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (73.7%), 63.8 MBs/sec
2022-04-15T03:51:27.5412803Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (73.7%), 61.9 MBs/sec
2022-04-15T03:51:28.5426203Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (73.7%), 60.1 MBs/sec
2022-04-15T03:51:29.5431849Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (73.7%), 58.4 MBs/sec
2022-04-15T03:51:30.5446431Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (73.7%), 56.7 MBs/sec
2022-04-15T03:51:31.5460876Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (73.7%), 55.2 MBs/sec
2022-04-15T03:51:32.5472849Z Received<PHONE_NUMBER> of<PHONE_NUMBER> (73.7%), 53.7 MBs/sec
...

full log file

Does this related? @serventara

@trask Is this issue still impacting you? If so, is it consistent or sporadic?

I've occasionally seen it happen to one of my repos, it's sporadic and fairly rare for me.
I think it was late last week when it last happened for me and the workflow is generally executed 10-20 times a day for various PRs/branches.
Cancelling and rerunning the workflow generally fixes it for me.
When I get to my computer I might be able to find one of the recent stalls if it would help

This looks to be an issue with the Github Actions Cache in general. There are numerous reports of cache download taking a long time or hanging (eg https://github.com/actions/cache/issues/810)
I can't see anything we can do to prevent this happening, but I like the idea of aborting the cache fetch and continuing the build when this happens (#369). Not sure how feasible this is: I can imagine some strange interactions if we kick off a Gradle build and then the cache restore succeeds mid-process.

I'm closing this issue since it's not something we can fix directly.

@trask Is this issue still impacting you? If so, is it consistent or sporadic?

sorry for late reply, haven't been seeing this one lately, but have been seeing #369 a lot

@trask I've spiked a solution to handle the GitHub Actions cache hanging on restore. See here for more details.
If you are test this out by using gradle/gradle-build-action@dd/cache-timeout I'd really appreciate any feedback.


working on three dialog translation

Issue number
#629

Working to Resolve #629

Please check the following

[✅ ] Do the tests still pass? (see Run the Tests)
[ ] Is the code formatted properly? (see Linting (Formatting))
For New Features:

[ ] Have tests been added to cover any new features or fixes?
[ ] Has the documentation been updated accordingly?

Please describe additional details for testing this change
I want to look at what I've added but am not sure where to access it. I'll have to find out where it lives and check that it works as intended.

Any feedback on this? I'm not sure why the e2e install isn't working correctly

It looks like cypress is failing to parse the json in the en.json file, likely due to a syntax error

Do I need to rebase? I keep getting this when I try to push the right changes and I pulled in the latest changes I think:
! [rejected]        ThreeDialog-translation -> ThreeDialog-translation (non-fast-forward)
error: failed to push some refs to 'https://github.com/AlexVCS/cuttle.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

My branches say up to date when I do
git pull https://github.com/cuttle-cards/cuttle.git main

@AlexVCS that indicates that you need to git pull. It's possible that your previous pull was rejected due to local changes that aren't pushed yet. So you could try resolving this with git pull --rebase before pushing.
If you're unable to pull with a rebase, we can hash out the details of the git error in discord


bring back bound check and add debug asserts

 Enable GDAL source to read up-side-down rasters

bors merge


Create refactored functions for DB handling for client side for security

All functions have been moved into methods such that client can read and server can only wirte assuming it is already in the BlockChain


File Picker v8 in iframe - Content Security Policy sporadic issue

Category

[ ] Question
[ ] Documentation issue
[x] Bug

Expected or Desired Behavior
Not have CSP and X-Frame-Options headers in the response
Observed Behavior
Hi!
I'm working with the File Picker v8 in an iframe, and sometimes when initiating the picker by making a request to https://<TENANT_NAME>-my.sharepoint.com/_layouts/15/FilePicker.aspx the server returns the CSP and the X-Frame-Options headers, which result in the error
Refused to frame 'https://<TENANT_NAME>-my.sharepoint.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com *.powerapps.com *.yammer.com *.officeapps.live.com *.office.com *.stream.azure-test.net *.microsoftstream.com *.dynamics.com *.microsoft.com onedrive.live.com *.onedrive.live.com securebroker.sharepointonline.com".
After reading this issue - https://github.com/OneDrive/onedrive-api-docs/issues/1621 , I made sure that my audience in the token is indeed correct, and in fact, sometimes I can get valid response (with no CSP header) and sometimes I get an invalid response (with the CSP header) using the very same access token.
Not sure what to do on this one
Steps to Reproduce
I don't have a way to always reproduce it. It just sometimes happens to me. If you try to load the file picker in an iframe enoough times it should be reproduced.
Thank you.
[ ]: http://aka.ms/onedrive-api-issues
[x]: http://aka.ms/onedrive-api-issues

We experience the exact same issue. Feels like somekind of race condition

Using Incognito mode in Chrome will result in CSP errors

We're also experiencing this same problem

Hi, anything new?

We're also experiencing this same problem

We are also experiencing this. Is there any solution?

@idan-weiss (or anyone else in this thread actually): You said "After reading this issue - https://github.com/OneDrive/onedrive-api-docs/issues/1621 , I made sure that my audience in the token is indeed correct".
Did you have to do anything when retrieving the token (e.g. in the call to msal's acquireTokenSilent or loginPopup) to set the audience value? I'm unclear how this is set.


feat: provide support for primary/secondary annpouncement

Implements #1508

Don't forget to link the PR and move the card to the correct status.


How can I get the current zoom value?

Im loading in a pdf to the Webview and wish to get the zoom value is there a handler for this?

Did anybody find a way?


[rai] drm check and fix

Before submitting a pull request make sure you have:

[x] Searched the bugtracker for similar pull requests
[x] Read adding new extractor tutorial
[x] Read youtube-dl coding conventions and adjusted the code to meet them
[x] Covered the code with tests (note that PRs without tests will be REJECTED)
[x] Checked the code with flake8

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[x] I am the original author of this code and I am willing to release it under Unlicense

What is the purpose of your pull request?

[x] Bug fix
[x] Improvement

Description of your pull request and other information

Add DRM check support that raises an error instead of extractor outputting an encrypted dash manifest
Fix for #12652

Read coding conventions.

Read coding conventions.

Is this still relevant?

no, it can be closed.

Thx

@dirkf sorry, my mistake.
I thought I was looking at yt-dlp PRs and not the original youtube-dl. This PR should be re-opened and merged.
Sorry again.

The linked issue was marked as fixed in https://github.com/ytdl-org/youtube-dl/commit/fcd90d258305cdafa5bd23c50443229205fcb9ed (your #27673) but Sergey didn't merge this change.
I distilled it to this:
--- a/youtube_dl/extractor/rai.py
+++ b/youtube_dl/extractor/rai.py
@@ -158,6 +158,10 @@ class RaiPlayIE(RaiBaseIE):
         # subtitles at 'subtitlesArray' key (see #27698)
         'url': 'https://www.raiplay.it/video/2020/12/Report---04-01-2021-2e90f1de-8eee-4de4-ac0e-78d21db5b600.html',
         'only_matching': True,
+    }, {
+        # DRM protected
+        'url': 'https://www.raiplay.it/video/2020/09/Lo-straordinario-mondo-di-Zoey-S1E1-Lo-straordinario-potere-di-Zoey-ed493918-1d32-44b7-8454-862e473d00ff.html',
+        'only_matching': True,
     }]

     def _real_extract(self, url):
@@ -166,6 +170,13 @@ class RaiPlayIE(RaiBaseIE):
         media = self._download_json(
             base + '.json', video_id, 'Downloading video JSON')

+        if try_get(
+                media,
+                (lambda x: x['rights_management']['rights']['drm'],
+                 lambda x: x['program_info']['rights_management']['rights']['drm']),
+                dict):
+             raise ExtractorError('This video is DRM protected.', expected=True)
+
         title = media['name']

         video = media['video']

dstftw asked me to split the PR in 2 because it fixed two different problems (see here: https://github.com/ytdl-org/youtube-dl/pull/27657#discussion_r551657747) and so I did (#27657 #27673) but then he only merged one leaving this one un-merged.


Extension mechanism

Problem
ddtrace-asgi being framework agnostic, it is currently of limited use in downstream frameworks such as Starlette or FastAPI because it's not easy to extend. See also #27 for the
To facilitate the integration of ddtrace-asgi with these frameworks, we'd need the following:

Anything that doesn't depend on HTTP semantics should be kept the same. Eg general processing logic, application of global tags, etc.
Users should be able to partially or completely override the processing of a request span, and have access to the ASGI scope so that they can inject their own information into the span.
Users should be able to do additional processing when the response is sent (http.response.start event).

Proposed solution
Introduce a notion of TraceBackend, which users can swap out when applying the middleware. It would provide the following hooks:
from ddtrace import Span
from starlette.types import Scope, Message

class TraceBackend:
    def on_http_request(self, span: Span, scope: Scope) -> None:
        """Called just before dispatching an incoming HTTP request to the underlying ASGI app."""

    def on_http_response(self, span: Span, scope: Scope, message: Message) -> None:
        """Called just before sending the HTTP response returned by the underlying ASGI app."""

TraceBackend would provide a default implementation, which users can override via subclassing.
Eg #27 could be implemented as:
from ddtrace import Span
from ddtrace_asgi import TraceBackend
from starlette.applications import Starlette
from starlette.routing import Route
from starlette.types import Message, Scope

class StarletteTraceBackend(TraceBackend):
    def _find_matching_route(self, scope: Scope, router) -> Optional[Route]:
        for route in router.routes:
            if isinstance(route, Route):
                continue
            match, child_scope = route.matches(scope)
            if match == Match.FULL or match == Match.PARTIAL:
                return route
        return None

    def on_http_request(self, span: Span, scope: Scope) -> None:
        super().on_http_request(span, scope)

        app: Starlette = scope["app"]
        route = self._find_matching_route(scope, router=app.router)
        if route is None:
            return  # Keep default 'resource'.

        # Override 'resource' with the route's URL path eg '/users/{id:int}'.
        method = scope["method"]
        span.resource = f"{method} {route.path}"

With https://github.com/encode/starlette/pull/804 this could be reduced to:
from ddtrace import Span
from ddtrace_asgi import TraceBackend
from starlette.applications import Starlette
from starlette.routing import Route
from starlette.types import Message, Scope

class StarletteTraceBackend(TraceBackend):
    def on_http_response(self, span: Span, scope: Scope, message: Message) -> None:
        super().on_http_response(span, scope, message)

        routes = scope["routes"]
        route = next(route for route in routes if isinstance(route, Route), None)
        if route is None:
            return

        method = scope["method"]
        span.resource = f"{method} {route.path}"

Usage:
middleware = [Middleware(TraceMiddleware, backend=StarletteTraceBackend())]

app = Starlette(routes=..., middleware=middleware)

Updated issue description to account for the possibility of https://github.com/encode/starlette/pull/804 being merged — required adding scope as a parameter of .on_http_response_start().

Hey Florimond 👋, anything I can do to help out with this? Is this still work you're interested in doing?
We're running into #27 with some of our Starlette/FastAPI apps.

Hi,
I laid out some ideas above but I’m not currently working on this project.
If this is something you’re interested in we can bounce off ideas and see what would make sense, or you can jump in and submit a proof of concept PR, etc. :-)
Reading again the « trace backend abstraction » ideas above, it seems a bit over engineered and there are most likely other API options that might be more flexible. Checking that the chosen API would make sense for both Starlette and FastAPI would be an interesting item too.


Configure Custom Identity provider

I'm pretty sure I had this working at one time, but now I cannot get the custom Identity Provider to work. I have IdentityServer running in an app service. This is the token it generates:
{
  "nbf":<PHONE_NUMBER>,
  "exp":<PHONE_NUMBER>,
  "iss": "https://[redacted].azurewebsites.net",
  "aud": "api-m2m",
  "client_id": "3f53a72a-32ab-4e40-9ae5-08dc8c4d08cd",
  "appid": "sandbox-ls",
  "roles": "smartUser",
  "scp": "system/*.read",
  "jti": "565DA07050D5AB8058057609519D4BE5",
  "iat":<PHONE_NUMBER>,
  "scope": "system/*.read"
}

I checked the fields a hundred times:

Authority Field: https://[redacted].azurewebsites.net

Client ID: sandbox-ls (the appid claim)
Audience: api-m2m (the aud claim)

And I get the following answer from the FHIR service:
HTTP/1.1 403 Forbidden

{
  "resourceType": "OperationOutcome",
  "id": "28294463e393a1ffdcfc1c203d370539",
  "meta": {
    "lastUpdated": "2024-06-14T13:11:01.8220825+00:00"
  },
  "issue": [
    {
      "severity": "error",
      "code": "forbidden",
      "diagnostics": "Authorization failed."
    }
  ]
}

Which means that my settings are correct, otherwise I would have gotten a 401.
Why am I getting Forbidden? How can I troubleshoot this?

@LodewijkSioen - Have you assigned the SMART user role ?

As you can see in my JWT, I've put "roles": "smartUser" in there.
Mind that I'm using my own Identity Provider and EntraID as specified in the documentation.

You are correct that the token is valid, and that is why you see a 403 instead of a 401.  Perhaps you have App Insights configured for your app service? It should have more details about why the 403 was returned.

The 403 comes from the fhir service on Azure. I don't seem to be able to configure App Insights for that.
I tried to configure it locally, but there is no appsetting for the additional Identity Provides.
(I need both Entra and another provider)
Groeten,
Lodewijk Sioen

From: Jared Erwin @.>
Sent: Monday, June 17, 2024 7:20:15 PM
To: microsoft/fhir-server @.>
Cc: Lodewijk Sioen @.>; Mention @.>
Subject: Re: [microsoft/fhir-server] Configure Custom Identity provider (Issue #3921)
You are correct that the token is valid, and that is why you see a 403 instead of a 401. Perhaps you have App Insights configured for your app service? It should have more details about why the 403 was returned.
—
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/fhir-server/issues/3921#issuecomment-2173937755, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAA56XUBEYURHYMZY3VLTHDZH4LE7AVCNFSM6AAAAABJKLPP2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZTHEZTONZVGU.
You are receiving this because you were mentioned.Message ID: @.***>

I made a minimal demo project to show you what I've done: https://github.com/LodewijkSioen/fhir-samples/tree/main/identity-provider

@feordin - can you please review the demo project and help ?

I will take a look at the sample and see if I can repro the issue.

I downloaded the sample (thank you for that!)  and I was able to get tokens that were validated and functioning.
I did make one update to the Identity Provider to include the "roles" claim:
    public Task ValidateAsync(CustomTokenRequestValidationContext context)
    {
        if (context.Result.ValidatedRequest.RequestedScopes.Contains(Constants.Userscope))
        {
            context.Result.ValidatedRequest.ClientClaims.Add(new Claim("fhirUser", "https://example.org/Practitioner/123456798"));
        }

        context.Result.ValidatedRequest.ClientClaims.Add(new Claim("roles", "smartUser"));

With that change I get a token like this for system scope:
{
  "alg": "RS256",
  "kid": "B699F4C1E63E8F38012738C00B738BE5",
  "typ": "JWT"
}.{
  "nbf":<PHONE_NUMBER>,
  "exp":<PHONE_NUMBER>,
  "iss": "https://localhost:7023",
  "aud": "smart-fhir-test-audience",
  "client_id": "test",
  "azp": "smart-fhir-test-clientid",
  "roles": "smartUser",
  "scp": "system/*.read",
  "jti": "2DD4592B05BB4663EF983374144A31AD",
  "iat":<PHONE_NUMBER>
}.[Signature]

or for user scope I get this token:
{
  "alg": "RS256",
  "kid": "B699F4C1E63E8F38012738C00B738BE5",
  "typ": "JWT"
}.{
  "nbf":<PHONE_NUMBER>,
  "exp":<PHONE_NUMBER>,
  "iss": "https://localhost:7023",
  "aud": "smart-fhir-test-audience",
  "client_id": "test",
  "azp": "smart-fhir-test-clientid",
  "fhirUser": "https://example.org/Practitioner/123456798",
  "roles": "smartUser",
  "scp": "user/*.read",
  "jti": "2A2A5BD7D8F83023F39AB3E580908C49",
  "iat":<PHONE_NUMBER>
}.[Signature]

either of those tokens succeed with a 200.
To match the tokens my appsettings.json for the FHIR service has the following security configuration:
    "FhirServer": {
        "Security": {
            "Enabled": true,
            "EnableAadSmartOnFhirProxy": true,
            "Authentication": {
                "Audience": "smart-fhir-test-audience",
                "Authority": "https://localhost:7023"
            },

You can see that the Audience matches the "aud" claim in the token, and the Authority matches the "iss" claim in the token.  The role matches "smartUser" which is defined in roles.jon in the FHIR service code.  That will result in the proper data actions being returned by the CheckAccess method that you already mentioned.
I hope this helps!

Thank you for looking into this. I already had it working against the OSS version of the Fhir Server, but it's against the Azure PaaS version that I cannot get it working.

@feordin I dug deeper and I suspect that the Azure FHIR Service is configured to either:

Use a different claim to identify the role via RolesClaim
Use a different name for the smartUser role via roles.json

But there is no way for me to know of investigate this. Also the fact that a specific role is needed is missing from the documentation.

@LodewijkSioen is the issue resolved or are you looking for any further inputs?

The issue is not resolved. If you us the instructions in my repo, then you'll see that it does not work.
Groeten,
Lodewijk Sioen

From: ketki @.>
Sent: Monday, July 8, 2024 1:59:23 PM
To: microsoft/fhir-server @.>
Cc: Lodewijk Sioen @.>; Mention @.>
Subject: Re: [microsoft/fhir-server] Configure Custom Identity provider (Issue #3921)
@LodewijkSioenhttps://github.com/LodewijkSioen is the issue resolved or are you looking for any further inputs?
—
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/fhir-server/issues/3921#issuecomment-2214839138, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAA56XTDZUDIOUWLSF4BRUTZLLHPXAVCNFSM6AAAAABJKLPP2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJUHAZTSMJTHA.
You are receiving this because you were mentioned.Message ID: @.***>

@LodewijkSioen  I have tried the scenario again for the Azure PaaS version.  the configuration is a bit different, and it does not use the roles.json file.  When using Azure Entra ID as the identity propvider we would read role infomration via Azure RBAC.  For 3rd party IDPs we limit the user to only the "smart" role, and role membership is assumed.  We validate the token using the appId and issuer to ensure those values match the entries in the portal.  Then we check the fhirUserClaim to ensure it matches a resource in the FHIR server and determine the compartment of resources that should be made available to be read.
I published the sample identity provider code in fhir-samples repo you mentioned to an app service.  Then I configured my PaaS instance with the following values:

I made a change to the identity provider so that it would populate the fhirUserClaim token with a valid url of a practitioner in the FHIR server:
    if (context.Result.ValidatedRequest.RequestedScopes.Contains(Constants.Userscope))
    {
        context.Result.ValidatedRequest.ClientClaims.Add(new Claim("fhirUser", "https://jaerwin-identitytest.fhir.azurehealthcareapis.com/Practitioner/123456798"));
    }

It then generated a token like this:
{
"alg": "RS256",
"kid": "E95C1005887923B229629BDB6D5A0557",
"typ": "JWT"
}.{
"nbf":<PHONE_NUMBER>,
"exp":<PHONE_NUMBER>,
"iss": "https://identityserver20240722190056.azurewebsites.net",
"aud": "smart-fhir-test-audience",
"client_id": "test",
"azp": "smart-fhir-test-clientid",
"fhirUser": "https://jaerwin-identitytest.fhir.azurehealthcareapis.com/Practitioner/123456798",
"roles": "smartUser",
"scp": "user/*.read",
"jti": "F2F7D6AA44F05FF070D3FF5A6B2FF818",
"iat":<PHONE_NUMBER>
}.[Signature]
With that token I was able to successfully read resources within the practitioner compartment.

Ah yes, so for the user scope, you need the full url including the domain in the fhirUser claim. This is annoying since we don't want to expose the internal azure url, but I can work around that. I'de rather not leak the internal URL to a client, but at least it's hidden in inside an encoded token.
A more pressing issue is that I cannot get the system scopes to work (eg system/*.read). Are these not supported on external ID providers?

@LodewijkSioen system scopes are not supported on external ID providers.

That's too bad because the system scopes are what we wanted to use in our system :(


Update logback-classic, logback-core to 1.4.7

About this PR
📦 Updates

ch.qos.logback:logback-classic
ch.qos.logback:logback-core

from 1.4.6 to 1.4.7
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "ch.qos.logback" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "ch.qos.logback" }
}]

labels: library-update, early-semver-patch, semver-spec-patch, commit-count:1

Codecov Report

Merging #2543 (e76738b) into main (5306084) will decrease coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2543      +/-   ##
==========================================
- Coverage   78.54%   78.50%   -0.04%
==========================================
  Files         441      441
  Lines       15546    15546
  Branches     2544     2560      +16
==========================================
- Hits        12211    12205       -6
- Misses       3335     3341       +6

see 3 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Declaring specific class as response_model in FastAPI produces RecursionError

Describe the bug
I get a RecursionError if the Quiz from below is set as the response_model in a FasAPI route-decorator.
from uuid import uuid4 as uuid
from datetime import datetime
from typing import Optional
from pydantic import BaseModel, Json
from . import metadata, database
import ormar

class User(ormar.Model):
    """
    The user model
    """
    id: uuid = ormar.UUID(primary_key=True, default=uuid)
    email: str = ormar.String(unique=True, max_length=100)
    username: str = ormar.String(unique=True, max_length=100)
    password: str = ormar.String(unique=True, max_length=100)
    verified: bool = ormar.Boolean(default=False)
    verify_key: str = ormar.String(unique=True, max_length=100, nullable=True)
    created_at: datetime = ormar.DateTime(default=datetime.now())

    class Meta:
        tablename = 'users'
        metadata = metadata
        database = database

class UserSession(ormar.Model):
    """
    The user session model
    """
    id: uuid = ormar.UUID(primary_key=True, default=uuid)
    user: uuid = ormar.ForeignKey(User)
    session_key: str = ormar.String(unique=True, max_length=64)
    created_at: datetime = ormar.DateTime(default=datetime.now())

    class Meta:
        tablename = 'user_sessions'
        metadata = metadata
        database = database
class QuizAnswer(BaseModel):
    right: bool
    answer: str

class QuizQuestion(BaseModel):
    question: str
    answers: list[QuizAnswer]

class QuizInput(BaseModel):
    title: str
    description: str
    questions: list[QuizQuestion]

class Quiz(ormar.Model):
    id: uuid = ormar.UUID(primary_key=True, default=uuid)
    title: str = ormar.String(max_length=100)
    description: str = ormar.String(max_length=300, nullable=True)
    created_at: datetime = ormar.DateTime(default=datetime.now())
    updated_at: datetime = ormar.DateTime(default=datetime.now())
    user_id: uuid = ormar.UUID(foreign_key=User.id)
    questions: Json[list[QuizQuestion]] = ormar.JSON(nullable=False)

    class Meta:
        tablename = 'quiz'
        metadata = metadata
        database = database

Like this:
from fastapi import APIRouter
router = APIRouter()

The example **doesn't** run "as is"

@router.post("/create", response_model=Quiz)
async def create_quiz_lol(quiz_input: QuizInput):
    quiz = Quiz(**quiz_input.dict(), user_id=user.id)
    return await quiz.save()

Versions (please complete the following information):

Database backend used (mysql/sqlite/postgress)
Python 3.10.2
ormar 0.10.25
pydantic 1.9.0
FastAPI 0.74.1

Can you check with an older release i.e. 0.10.24? Want to know if this is something new

Can you check with an older release i.e. 0.10.24? Want to know if this is something new

It also occurs on 0.10.24. Thank you for the fast response!

Thanks for checking, can you also post a sample payload you are using to call this API endpoint, will be easier to test. See that you are using python 3.10 which is not yet fully supported, which database and driver are you using?

I am using sqlite (aiosqlite 0.17.0)
{
   "public":false,
   "title":"Some test question",
   "description":"A description",
   "questions":[
      {
         "question":"Is ClassQuiz cool?",
         "answers":[
            {
               "right":true,
               "answer":"Yes"
            },
            {
               "right":false,
               "answer":"No"
            }
         ]
      },
      {
         "question":"Do you like open source?",
         "answers":[
            {
               "right":true,
               "answer":"Yes"
            },
            {
               "right":false,
               "answer":"No"
            },
            {
               "right":false,
               "answer":"Maybe"
            }
         ]
      }
   ]
}

Hmmm, from what I've seen, if you set response_model, then you should return this model from the view? When I set a response_model to be a model inheriting from pydantic.BaseModal, and then returned this model from the view, the payload would be transformed twice: once by me in the view, and then again by the model provided in response_model?

Hmmm, from what I've seen, if you set response_model, then you should not return this model instance from the view? When I set a response_model to be a model inheriting from pydantic.BaseModel, and then returned this model from the view, the payload would be transformed twice: once by me in the view, and then again by the model provided in response_model?

I don't know, but it displays the return model in the openapi schema, so that's enough for me.

Fixed in 0.11.0 - please update and check.

Fixed in 0.11.0 - please update and check.

Yes, the RecursionError is gone, but now, I get the following ValueError:
ValueError: [TypeError("'ModelField' object is not iterable"), TypeError('vars() argument must have __dict__ attribute')]

Can you provide some code behind this? Cause i used your code for a test case that passes so need something more to reproduce.

Can you provide some code behind this? Cause i used your code for a test case that passes so need something more to reproduce.

Oh, I should have added that this error only occurs if you try to access the /openapi.json-route.


Node error running frontend

Description
After getting my local development environment running with Minikube, I am trying to get the frontend to start. I am using the provided script:
$ ./run_dev_client.sh
yarn run v1.22.19
$ next dev
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/parser' is not defined by "exports" in /home/steshaw/Code/tweag/chainsail/app/client/node_modules/next/node_modules/postcss/package.json
    at new NodeError (node:internal/errors:399:5)
    at exportsNotFound (node:internal/modules/esm/resolve:361:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:697:9)
    at resolveExports (node:internal/modules/cjs/loader:565:36)
    at Module._findPath (node:internal/modules/cjs/loader:634:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1061:27)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at 552 (/home/steshaw/Code/tweag/chainsail/app/client/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11590)
    at __webpack_require__ (/home/steshaw/Code/tweag/chainsail/app/client/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11735)
    at 270 (/home/steshaw/Code/tweag/chainsail/app/client/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:400)
    at __webpack_require__ (/home/steshaw/Code/tweag/chainsail/app/client/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11735)
    at 327 (/home/steshaw/Code/tweag/chainsail/app/client/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:260)
    at __webpack_require__ (/home/steshaw/Code/tweag/chainsail/app/client/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11735)
    at 845 (/home/steshaw/Code/tweag/chainsail/app/client/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:3733) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

To Reproduce

Get the service running in Minikube via https://github.com/tweag/chainsail/blob/main/docs/deployment.md#initial-setup.
cd ./app/client
yarn
./run_dev_client.sh

Expected behavior
The frontend starts.
Environment

OS: Ubuntu 22.04.2 LTS
Version of the code: Branch main at 2d26ae0ee4f9565917a2f3fd795eca3f63c0226a.

Additional context
Nothing.

See #449 :wink: but I didn't remember either that I had opened an issue about that.

Snap 😄! Closing as duplicate.