Mask has problem with headers with conditional fields (like VXLAN)

Example (truncated paths to files):
> from ptf.mask import Mask
Using packet manipulation module: ptf.packet_scapy
> from scapy.all import VXLAN, hexdump
> pkt = VXLAN(flags=0x80, gpflags=0x23, gpid=0x1234, vni=0x1337)
> hexdump(pkt)
0000  80 23 12 34 00 13 37 00                          .#.4..7.
> pkt2 = VXLAN(flags=0x80, gpflags=0x23, gpid=0x5678, vni=0x1337)
> hexdump(pkt2)
0000  80 23 56 78 00 13 37 00                          .#Vx..7.
> m = Mask(pkt)
> m.set_do_not_care_packet(VXLAN, "gpid")
Traceback (most recent call last):
  File "...\Python36_64\lib\site-packages\IPython\core\interactiveshell.py", line 2878, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-17-3b392d872fb8>", line 1, in <module>
    m.set_do_not_care_packet(VXLAN, "gpid")
  File "...\ptf\src\ptf\mask.py", line 47, in set_do_not_care_packet
    self.set_do_not_care(hdr_offset * 8 + offset, bitwidth)
  File "...\ptf\src\ptf\mask.py", line 22, in set_do_not_care
    self.mask[offsetB] = self.mask[offsetB] & (~(1 << (7 - offsetb)))
IndexError: list index out of range

This happens, because I am setting here flags field in a way, that a few first conditional fields will not be included in a header.
The definition of VXLAN from Scapy: https://github.com/secdev/scapy/blob/dcd54d59c94b83632b74e268e8b14026cbcd67c8/scapy/layers/vxlan.py#L28
As the flag NextProtocol is not set, first 3 fields won't be included, only gpflags and gpid will be.
Now, in set_do_not_care_packet method of Mask we are looking into fields_desc definitions and there are present all conditional fields, despite their conditions and whether they are met. Thus, we are getting in this example "out of range" problem.

I'm not quite sure about this issue, but the potential fix for it is ready with #163
Can you confirm, that this resolves your issue?
If yes, can I ask you for additional mask tests?


Phone mask placeholder is changing after onincomplete checking

If field incomplete, and not try to fill, phone mask placeholder is changing - characters 441 appear in the operator code instead of underlines.
Windows 8.1 pro 64bit
Google Chrome 67.0.3396.99 64bit
Inputmask Version: 4.0.1-beta.23
Using via data-inputmask attributes
Using standart phone mask data-inputmask="'alias': 'phone'"
a little video in attach
phone mask.zip

A similar problem https://codepen.io/mupic/pen/zLWLWa

Remove Phone alias #1981


You will need to generate a Personal Access Token (PAT) within your source (Azure DevOps or GitHub). The following scopes are required:

Sure, here are the steps to generate a Personal Access Token (PAT) in GitHub:

Log in to your GitHub account.
Click on your profile picture in the top right corner and select "Settings".
In the left sidebar, click on "Developer settings".
Click on "Personal access tokens".
Click on "Generate new token".
Give your token a name and select the scopes required for the tool to function properly. In this case, the required scopes are "repo" and "admin:org". You can select these scopes by checking the corresponding checkboxes.
Click on "Generate token".
Copy the generated token and store it in a safe place.
Note: Make sure to keep your token secure and do not share it with anyone. Also, make sure to revoke the token when you no longer need it.

What Custom scopes do I need to use for an ADO PAT?


Selenium2 option field selector fix

This fixes issue #193. You can now select form option fields that don't have values set.
Sorry for the previous two pull requests. I was having trouble getting the git and github processes right.

Is there any news on merging this pull request? We'd like to move back to using the authoritative repo when possible.
Regards,
Tim

@pete-otaqui can you take a look at it ?


Infinite redirect for page revision link

Links like this
/entity/repository/compare/[repoId]/[revisionId]
are redirected to
/[revisionId]/[pageTitle]
instead of
/[repoId]/[pageTitle]
and therefore cause an infinite loop.
CSR in the frontend works fine so it's probably a CF-worker issue.

Superseaded by https://github.com/serlo/serlo.org-database-layer/issues/325


Always load the config file using the API

This PR is a prerequisite for using the prehooks. As we want to have the init step as a prehook, and that would happen before the checkout, we cannot rely on looking for the file locally.
Merge / deployment checklist

[x] Confirm this change is backwards compatible with existing workflows.
[ ] Confirm the readme has been updated if necessary.

This PR is a prerequisite for using the prehooks. As we want to have the init step as a prehook, and that would happen before the checkout, we cannot rely on looking for the file locally.
Merge / deployment checklist

[x]  Confirm this change is backwards compatible with existing workflows.
[ ]  Confirm the readme has been updated if necessary.

Bantu say

This PR would allow us to improve setup by migrating towards a state where users would only need to insert a single action into their workflows.  However it would involve making an extra API call, which may put some users over the API limit.  Since we haven't observed many problems with workflow setup, but we have observed problems with users going over the API limit, we don't plan to pick up this work in the foreseeable future, so I'll close this PR.


Phoenix instrumentation library is using an incorrect tracer

Describe the bug
opentelemetry_phoenix does not include tags otel.library.name and otel.library.version.
I'm using latest opentelemetry libraries:

opentelemetry & opentelemetry_api: latest commit in main branch 590d87f
opentelemetry_phoenix: 1.0.0-rc.5

Expected behavior
Spans generated by opentelemetry_phoenix must include otel.library.name and otel.library.version.
Additional context
This problem was previously also present on ecto library but the commit on opentelemetry_api repository fixed that.
As far as I can tell, this is because the phoenix instrumentation library is using opentelemetry_telemetry which uses get_tracer call, but the tracer isn't registered (properly).
I also did some debugging inside the start_telemetry_span function:
    erlang:display(opentelemetry:get_application_tracer(opentelemetry_phoenix))
    -- returns default tracer

    erlang:display(opentelemetry:get_application_tracer('Elixir.OpentelemetryPhoenix'))
    -- returns CORRECT tracer

    erlang:display(opentelemetry:get_tracer('opentelemetry_phoenix'))
    -- returns default tracer (current code)

    erlang:display(opentelemetry:get_tracer('Elixir.OpentelemetryPhoenix'))
    -- returns default tracer

I would fix this myself but I'm unsure what's the correct solution here.

Yup, thanks, I thought there was already a fix merged for this but I guess not, @bryannaegele ?

Oh right, nevermind, the fix is in the Elixir otel api, not particular to the phoenix integration.
So this is fixed in main of opentelemetry-erlang but has to be released so the integrations can update their deps and be published.

So this is fixed in main of opentelemetry-erlang but has to be released so the integrations can update their deps and be published.

I don't think so. I'm locally using the main branch with an override. That fixed the ecto instrumentation. But Phoenix is still broken. I think this is something different. Though maybe I'm wrong.

No, you are right, it was 2 issues, only 1 fixed in the api, the other is the name of the tracer the Phoenix lib uses is wrong.

One solution that locally works:
In opentelemetry_telemetry:
diff --git a/src/otel_telemetry.erl b/src/otel_telemetry.erl
index 58762e6..ae7e564 100644
--- a/src/otel_telemetry.erl
+++ b/src/otel_telemetry.erl
@@ -38,7 +38,7 @@ trace_application(Application, _Opts) ->
 -spec start_telemetry_span(atom(), opentelemetry:span_name(), telemetry:event_metadata(), otel_span:start_opts()) -> opentelemetry:span_ctx().
 start_telemetry_span(TracerId, SpanName, EventMetadata, Opts) ->
     ParentCtx = otel_tracer:current_span_ctx(),
-    Tracer = opentelemetry:get_tracer(TracerId),
+    Tracer = opentelemetry:get_application_tracer(TracerId),
     Ctx = otel_tracer:start_span(Tracer, SpanName, Opts),
     otel_tracer:set_current_span(Ctx),
     _ = store_ctx({ParentCtx, Ctx}, TracerId, EventMetadata),

and in opentelemetry_phoenix:
diff --git a/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex b/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex
index 717fdbd..b83f9da 100644
--- a/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex
+++ b/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex
@@ -27,7 +27,7 @@ defmodule OpentelemetryPhoenix do
   alias OpenTelemetry.Span
   alias OpentelemetryPhoenix.Reason

-  @tracer_id :opentelemetry_phoenix
+  @tracer_id __MODULE__

   @typedoc "Setup options"
   @type opts :: [endpoint_prefix()]

but I don't know if this would be a good solution or not.

This seems to be fine with the latest versions. Closing this.


Update Program.cs for Entity Framework

Improvement:
Hi,
I was using dotnet new angular to generate a dotnet core angular template with SPA-templates version 2.
The layout of Programs.cs was the following:
    public class Program
    {
        public static void Main(string[] args)
        {
            CreateWebHostBuilder(args).Build().Run();
        }

        public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
            WebHost.CreateDefaultBuilder(args)
                .UseStartup<Startup>();
    }

I added Entity Framework to this solution and got the following error when running any dotnet ef [command]
Unable to create an object of type 'DataContext'. Add an implementation of 'IDesignTimeDbContextFactory<DataContext>' to the project, or see https://go.microsoft.com/fwlink/?linkid=851728 for additional patterns supported at design time.

It took me a really long time to figure out what was wrong, but just changing Program.cs to the following (according to https://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/?view=aspnetcore-2.1#update-main-method-in-programcs):
    public class Program
    {
        public static void Main(string[] args)
        {
            BuildWebHost(args).Run();
        }

        public static IWebHost BuildWebHost(string[] args) =>
            WebHost.CreateDefaultBuilder(args)
                .UseStartup<Startup>()
                .Build();
    }

solved that problem

Thanks for suggesting this. However, the existing format of BuildWebHost, i.e.,
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
    WebHost.CreateDefaultBuilder(args)
        .UseStartup<Startup>();

... is the same for all the SPA templates as it is for the regular ASP.NET server-only projects ("Web Application" and "Web Application (Model-View-Controller)"). So it is by design for it to be in this format: it should be consistent with the other templates.
If you believe the general pattern of Program.cs files across all the templates is correct, would you be able to report that at https://github.com/aspnet/templating/ where all the templates are managed in common? AFAICT it's already correct but if you can supply repro steps that imply there's a bug that would definitely be something we'd want to address! Thanks.


Deleting non-system objects and existing table scripts

Let me try to explain the two scripts I made:

Deleting non-system objects: When we are not authorized to delete the database but needs to reset the database, script deletes all user objects in a loop.
Getting the script of the existing table: Although it is possible to get the creation script via SSMS, it creates the table creation script in cases where SSMS is not available.

With the last addition, all user databases were set as Simple with a loop


Speedup dataset generation

Also included a small fix on the l2 norm returning negative values (hence introducing a numpy warning when computing the pow).


Make it possible to set the post visibility

We should add a config option for posting public/unlisted/follower-only etc.

Implemented in 26fe16864487c768c607b49929192eb58e891e94


POWER CAT Logo cut off on mobile device.

Describe the bug
When viewing the site on a phone screen, the Power CAT logo gets cut off.
To Reproduce
Navigate to site with a phone
Expected behavior
Power CAT logo resizes to screen width to align with responsiveness of the other content
Screenshots

No longer repros.


Supports CNI version 0.4.0

What would you like to be added?
Implements cmdCheck to support CNI version 0.4.0
What is the use case for this feature / enhancement?
Add periodic check for sriov network by implementing cmdCheck
Example from Multus CNI: https://github.com/intel/multus-cni/pull/427/files
cmdCheck spec update ref: https://github.com/containernetworking/cni/pull/579/files

Discussed in Monday's resource mgmt meeting.
Agreed that it may be worth implementing cmdCheck in sriov-cni, to check whether VF properties have been successfully applied and not changed during the pod lifecycle.


corrected mention of data.xml.dvc

You may disregard these recommendations if you used the Edit on GitHub button from dvc.org to improve a doc in place.

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

@utkarshsingh99 please fix failing CI checks. Have you installed the pre-commit hook?

Done. Had made these changes using the Edit on Github option, so couldn't check it.

thanks for this small fix @utkarshsingh99! Glad you've stayed active 🙂

made these changes using the Edit on Github option, so couldn't check it.

For future ref: the PR itself has 3 checks you should also notice after you open it. Both the CI checks and Restyled will let you know if the formatting is broken.


Add ability to watch entire directories

It would be nice if it were possible to watch an directory for changes to reload rather than having to specify individual files. This particularly comes in handy for directories of static files. My particular use case is watching multiple directories of CSS and JavaScript files so that when changed I could recompile them without having to restart the server.

But autoreload does restart the server, which makes it kind of a blunt instrument for this case.  The autoreload.watch function is intended to watch source code that doesn't make it into sys.modules, since code generally can't be reloaded easily without restarting the process.  For css/js compilation it's better to just have a PeriodicCallback that will check the relevant files and recompile them as needed.

I meant I shouldn't have to manually restart the server to recompile the CSS/JS if I make an edit. I also don't want to have to manually list all of the CSS/JS files and do a call to autoreload.watch for each. If you want to watch a file, wouldn't it make sense that you might want to watch an entire directory? For my use case a PeriodicCallback would be a waste because I'm not always editing CSS/JS. But when I am I do a lot of little edits and tests after each. Manually restarting the server so it can recompile would be a pain.

Why would PeriodicCallback be a waste but autoreload.watch is not?  autoreload is built on a PeriodicCallback.  Using autoreload for watching css/js is wasteful since it restarts the whole server when instead you could have just recompiled the appropriate files.  You could also do this on demand by just stat'ing the file (in debug mode) from the handler that returns it; this is what tornado does for templates.


Scala Common Enrich: update IP Lookups Enrichment to support non-legacy database

This is separate from #3675 because that bump doesn't itself dictate the change of behavior (merely that the new behavior is available).


Future of katacoda interactive trainings?

Question
Hi, I'm the the co-creator of play-with-kubernetes  an active open source (https://github.com/play-with-docker) tool that allows users to rapidly create clusters and have a hands on experience to play with k8s features which is listed as an alternative to Katacoda in all the official k8s tutorials (https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#before-you-begin)
Katacoda has been acquired by O'Reilly some years ago and I've recently discovered that they're planning to shut down all their public content and keep the platform for their internal usage only (https://www.oreilly.com/online-learning/leveraging-katacoda-technology.html). This is a bit  sad and surprising since all the community efforts in creating content and tutorials for katacoda will be usless any time soon.
I've seen some issues like https://github.com/kubernetes/website/pull/34005 and https://github.com/kubernetes/website/issues/33918 (cc @sftim @Sea-n) which already mention this and I was also a bit surprised that PWK wasn't mentioned there. I've been supporting the platform for ~6 years and it currently has more than ~300k registed users.
I'd like to see if there's any interest in talking about how we could leverage more on PWK to keep adding value to the k8s community. Happy to chat about future ideas and collaborations.
Note: I'm also one of the people behind https://play-with-go.dev/ which leverages on the same tech that PWK but the Go community did some investment into creating that custom UI (which is also open source) to give a more friendly walk-through experience

The best place to raise this is in the #sig-docs channel on Kubernetes Slack. Would you be willing to contribute to that discussion there @marcosnils? If you're not already in that Slack workspace, visit https://slack.k8s.io/ for an invitation.
/remove-kind support

The katacoda trainings remain in place past the shutdown of katacoda.com
/close

@sftim would it be proper to reopen given the latest announcements? https://kubernetes.io/blog/2023/02/14/kubernetes-katacoda-tutorials-stop-from-2023-03-31/

@sftim would it be proper to reopen given the latest announcements? https://kubernetes.io/blog/2023/02/14/kubernetes-katacoda-tutorials-stop-from-2023-03-31/

No. Please use discussion https://github.com/kubernetes/website/discussions/38878 for discussions, or the existing tracking issue.


Add exports test

What's the purpose of this test exactly?

Just to test that I can call something other than call. In this case, an export called func.

is there a corresponding test in ethcore? I'm not sure that this actually needs to be merged since we already know that any export is callable.

Corresponding test exists in https://github.com/oasislabs/parity/pull/105


Export encountered errors on following paths: /(auth)/login/page: /login

i replaced nextjs version(13-canary) of this code to 14.1.3. and got the error of like title.
anyone know the reason why this error happen?

i solved this issue by wrapping all of jsx elements, which got this error, with .


HTTP Internal Server

I do not know if this is the right place but with Diabox V2020.06.05_4.0, I use the internal HTTP Server.
I'm working on the developpment of my personnal app to "track" my diabet but in the same time I learn Android development with Kotlin.
I have a problem with the internal HTTP Server, I suspect that Android 10 kill regularely this server.

Sorry, here is iOS.
For android HTTP server ,you can follow how xdrip+ does


KYLIN-4836 fix CubeMigrationCLI bug

Proposed changes
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
Types of changes
What types of changes does your code introduce to Kylin?
Put an x in the boxes that apply

[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation Update (if none of the other choices apply)

Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

[ ] I have create an issue on Kylin's jira, and have described the bug/feature there in detail
[ ] Commit messages in my PR start with the related jira ID, like "KYLIN-0000 Make Kylin project open-source"
[ ] Compiling and unit tests pass locally with my changes
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] If this change need a document change, I will prepare another pr against the document branch
[ ] Any dependent changes have been merged

Further comments
If this is a relatively large or complex change, kick off the discussion at user@kylin or dev@kylin by explaining why you chose the solution you did and what alternatives you considered, etc...

Pull Request Test Coverage Report for Build 6643

0 of 8 (0.0%)  changed or added relevant lines in 1 file are covered.
8 unchanged lines in 3 files lost coverage.
Overall coverage increased (+0.01%) to 28.044%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

tool/src/main/java/org/apache/kylin/tool/CubeMigrationCLI.java
0
8
0.0%

Files with Coverage Reduction
New Missed Lines
%

tool/src/main/java/org/apache/kylin/tool/query/ProbabilityGenerator.java
1
81.58%

core-cube/src/main/java/org/apache/kylin/cube/cuboid/TreeCuboidScheduler.java
2
68.46%

core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java
5
77.81%

Totals

Change from base Build 6595:
0.01%

Covered Lines:
26257

Relevant Lines:
93628

💛  - Coveralls

Thank you @bigxiaochu .


Fix BsButtonGroup radio not triggering onChange when clicking active button

The test was actually broken,so a false positive. Refactored tests to angel brackets.
The case for a checkbox type group was not covered by tests, so not sure if I should cover that only, as this could be seen as a breaking change possible?

Do you know when this bug was introduced? Wondering if fixing could be seen as a breaking change.

No, not sure.


README.md

updated README.md files with correction in formatting and language grammer rules.

@microsoft-github-policy-service agree

@i-amrit please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
@microsoft-github-policy-service agree [company="{your company}"]

Options:

(default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
(when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.

Contributor License Agreement

@microsoft-github-policy-service agree


Add mdl-badge--overlap class (fixes #708)

Already got LGTM'd in #1233. Had to be reverted because this is for 1.1 and not for 1.0.3.

Thanks for working on this. Once we have time, let's rebase this against master.

LGTM and verified this should still be fine for the current version range.

Friendly ping about a rebase.

@addyosmani @sgomes Done :)

LGTM :+1:


Incorrect ZK data structure for topic config changes

The upgrade-to-90 branch creates invalid ZK data data structures in /config/changes. The format of these changed in 0.9 from a string to a JSON object.
https://cwiki.apache.org/confluence/display/KAFKA/Kafka+data+structures+in+Zookeeper#KafkadatastructuresinZookeeper-0.9.0
The following line will need to be updated:
https://github.com/yahoo/kafka-manager/blob/upgrade-to-90/app/kafka/manager/utils/AdminUtils.scala#L272
Expected Value: {"version":1,"entity_type":"topics","entity_name":"topicName"}
Actual value: "topicName"

Thanks for the fix and it is now pushed into master!


Cache backend: Commands cannot be stopped with Ctrl-C

rclone v1.46

os/arch: windows/amd64
go version: go1.11

I seem to have the same problem mentioned in https://github.com/ncw/rclone/issues/1946.
When I run "rclone lsd -R" against a cache backend hitting CTRL+C is ignored. If I run the same command against the underlying backend being cached (in my case "local") then CTRL+C works fine.

I managed to replicate this on linux.
It seems to happen

while there are lots of writes going into the cache
it only happens with SIGINT (CTRL-C), SIGQUIT and SIGINT work fine

...
I realised we have a fix for this in the pipeline already 12c8ee4b4b19b3e1efb86cf5ed91864a81b293f2 so I've merged that.
I've merged this to master now which means it will be in the latest beta in 15-30 mins and released in v1.47
Can you give it a test?

@ncw rclone-v1.46.0-051-gf6eb5c69-beta-windows-amd64 worked perfectly for me. Thank you.

Great - thanks for testing - I'll close this now.
This will be released in v1.47.


integrated the property bee_line_distance to the Channel class

integrated the property latency to the OracleLightningNetwork class

Hey conceptually this is exactly what will be needed to add latency as an additional feature and thanks a lot for your suggestion. I am a bit reluctant to merge at this point:

adding an additional field to the ChannelFields class breaks compatibility with c-lightning which we currently have
I would love to see tests first, that the bee line distance does actually work well to predict latency.

Once we have such results I will be very happy to merge this and integrate this into the library.

Hey conceptually this is exactly what will be needed to add latency as an additional feature and thanks a lot for your suggestion. I am a bit reluctant to merge at this point:

adding an additional field to the ChannelFields class breaks compatibility with c-lightning which we currently have
I would love to see tests first, that the bee line distance does actually work well to predict latency.

Once we have such results I will be very happy to merge this and integrate this into the library.

@renepickhardt Thanks for the feedback. These two changes are fine till now? Am I right? Now I will focus on bee_line_distance. When it will work correctly then we can move forward but before bee line distance I wanted to confirm for above these two properties that I have done correctly or not.

Yes if those Features work one could add them like this. The actual feature engineering would later Happen in the uncertainty Networks class though


Fix: Elixir 1.7+ warnings with backward compatibility for previous versions

Similar to #13 but keeps backward compatibility with previous Elixir versions, and without version bump.
Formatted source with mix format
Updated Travis checks
Closes #12

Hello everybody..
Just asking if in any case it's known whether it's this PR or the other one (https://github.com/elixir-ecto/connection/pull/13) that will be merged and when?
Thank you..

Closed in favor of #13.


Cover image does not seem to preserve aspect ratio in kf8 output

I've specified the recommended size for the cover image, and in the epub output the image does stay at a fixed aspect ratio when I resize the viewer (I'm using calibre's ebook viewer). However, in the kf8 output the cover resizes to fit the viewport, which I think isn't supposed to happen.

I tried reproducing this using bundle exec asciidoctor-epub3 -a ebook-format=kf8 data/samples/sample-book.adoc in asciidoctor-epub3 repo, but do not observe the issue you're describing in Calibre 4.9.1:


Deploy av<PHONE_NUMBER>5603-09b00b7

09b00b735b297348f047fc79d65f66262caf17e8

/promote dev-gcp

/promote dev-gcp

/promote prod-gcp

/promote dev-gcp

/promote dev-gcp


Weird window sizing error on initial startup

I installed this on my laptop (the tool is amazing btw).
I get an error that flashed only for a few seconds:

I couldn't find a setting for this in the xml so not sure what's the issue.

Can you replace Clear-Host in the script with #Clear-Host (ie comment it out), rerun and get a screenshot of the whole error?

Exception setting "WindowHeight": "The value must be less than the console's current maximum window size of 45 in that
dimension. Note that this value depends on screen resolution and the console font.
Parameter name: height
Actual value was 50."
At C:\Users\Mark\Documents\GitHub\Diablo2RLoader\D2Loader.ps1:85 char:1
+ [console]::WindowHeight=50; #Can be adjusted to preference, but not l ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], SetValueInvocationException
    + FullyQualifiedErrorId : ExceptionWhenSetting

Seems like this is a value we could adjust in the script, but maybe could be in the XML? (e.g. replace ::windowheight = 50 with something smaller)

Exception setting "WindowHeight": "The value must be less than the console's current maximum window size of 45 in that
dimension. Note that this value depends on screen resolution and the console font.
Parameter name: height
Actual value was 50."
At C:\Users\Mark\Documents\GitHub\Diablo2RLoader\D2Loader.ps1:85 char:1
+ [console]::WindowHeight=50; #Can be adjusted to preference, but not l ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], SetValueInvocationException
    + FullyQualifiedErrorId : ExceptionWhenSetting

Seems like this is a value we could adjust in the script, but maybe could be in the XML? (e.g. replace ::windowheight = 50 with something smaller)

I had considered putting it in XML but have tried to reduce complexity for end users (even editing an XML is overwhelming for some).
I'm surprised that whatever this is running on can't run it at 50 height. I had laptop users in mind when making this.
What is the screen resolution?

It seems to be an issue if you have the Scale increased in your display settings:

I confirmed it would work properly if the scale is not set. Perhaps we need to read this value from the system and adjust the values appropriately.

 As a quick fix, change the line:
[console]::WindowHeight=50  #Can be adjusted to preference, but not less than 42
to this:
$WindowHeight=50 #Can be adjusted to preference, but not less than 42
do {
	Try {
		[console]::WindowHeight=$WindowHeight;
		$HeightSuccessfullySet = $True
	}
	Catch {
		$WindowHeight --
	}
} Until ($HeightSuccessfullySet -eq $True)

This means if it fails to set the height to due resolution or scale, it'll keep trying a smaller height until it doesn't error.

The above fix will be in the next release


Issues with Touchscreen Device when onScreen keyboard is fired

Hello,
I am using this script to help me to change CKEditor's toolbars based on screen size: less buttons on XS and SM screens and normal on the others.
When I am using touchscreen device, and onscreen keyboard is fired, then the script is re-firing (reinitiate the DOM).
How can I stop the script to check screen resize to allow touch screen keyboard?
(function($, viewport){

	$(document).ready(function() {
        if ( viewport.is('xs') ) {
			ckeditor_toolbar = toolbar_SM;
		}

		if ( viewport.is('sm') ) {
		   ckeditor_toolbar = toolbar_SM;
		}

		if( viewport.is('md') ) {
			ckeditor_toolbar = toolbar_full;
		}

		if( viewport.is('lg') ) {
			ckeditor_toolbar = toolbar_full;
		}

		LoadCKEditor(ckeditor_toolbar);
    });

    $(window).resize(
        viewport.changed(function() {
            //alert(viewport.current());

			if ( viewport.is('xs') ) {
				ckeditor_toolbar = toolbar_SM;
			}

			if ( viewport.is('sm') ) {
			   ckeditor_toolbar = toolbar_SM;
			}

			if( viewport.is('md') ) {
				ckeditor_toolbar = toolbar_full;
			}

			if( viewport.is('lg') ) {
				ckeditor_toolbar = toolbar_full;
			}

			LoadCKEditor(ckeditor_toolbar);

        })
    );

})(jQuery, ResponsiveBootstrapToolkit);

It might be the easiest to store viewport.current() in a variable, and only trigger LoadCKEditor if that variable is different from viewport.current() during the next resize event. Please refer to #26.


chore(Data/Finset): subset_image_iff about finsets

State subset_image_iff for finsets, and rename the existing set/finset version to a more appropriate name. Also make the analogous change for image2

bors d+


version from the afternoon before the Cafe

@rnikutta here's my updated version of the Colab notebook for tomorrow's Cafe. Thanks very much!

Thank you for the PR.


apiVersion is interpreted as a timestamp

Describe the bug
In the config file I have:
  - id: azure:chat:gpt-4
    config:
      apiBaseUrl: "https://foo.bar"
      apiVersion: 2023-05-15

In providers.ts I added the line console.log("config:", providerOptions); and I get the following in the console:
config: {
  id: 'azure:chat:gpt-4',
  config: {
    apiBaseUrl: 'https://foo.bar',
    apiVersion: 2023-05-15T00:00:00.000Z,
    basePath: ''
  },
  env: undefined
}

Notice the timestamp format of the apiVersion value.
When the REST endpoint gets called the URL is:
https://foo.bar/openai/deployments/gpt-4/chat/completions?api-version=Sun May 14 2023 20:00:00 GMT-0400 (Eastern Daylight Time)

Notice how the apiVersion is a human-friendly timestamp converted to the local time zone.
To Reproduce
See above.
Expected behavior
Produce a correct endpoint URL.
Screenshots
N/A
System information (please complete the following information):

Promptfoo version: latest from master

Additional context
N/A

I wonder if this is some unintended magic from the yaml parser?
On Tue, Nov 19, 2024 at 4:34 PM rvernica @.***> wrote:

Describe the bug
In the config file I have:

id: azure:chat:gpt-4
config:
apiBaseUrl: "https://foo.bar"
apiVersion: "2023-05-15"

In providers.ts I added the line console.log("config:", providerOptions);
and I get the following in the console:
config: {
id: 'azure:chat:gpt-4',
config: {
apiBaseUrl: 'https://foo.bar',
apiVersion: 2023-05-15T00:00:00.000Z,
basePath: ''
},
env: undefined
}
Notice the timestamp format of the apiVersion value.
When the REST endpoint gets called the URL is:
https://foo.bar/openai/deployments/gpt-4/chat/completions?api-version=Sun May 14 2023 20:00:00 GMT-0400 (Eastern Daylight Time)
Notice how the apiVersion is a human-friendly timestamp converted to the
local time zone.
To Reproduce
See above.
Expected behavior
Produce a correct endpoint URL.
Screenshots
N/A
System information (please complete the following information):

Promptfoo version: latest from master
https://github.com/promptfoo/promptfoo/tree/17ad62ebe7f706bcf5dc2e78aa83db475f62a8f4

Additional context
N/A
—
Reply to this email directly, view it on GitHub
https://github.com/promptfoo/promptfoo/issues/2174, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACLYJTAGZTPN2NJARHDLG32BPKI7AVCNFSM6AAAAABSDLWEOWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY3TGOJXHA4TCMQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

YAML treats the value as a time stamp. Adding quotes around the value fixes the issue:
     apiVersion: "2023-05-15"


Rename deprecated pystac_client methods to get STAC items and collections

These methods were deprecated since https://github.com/stac-utils/pystac-client/pull/206 in pystac_client v0.4.0 (released Jun 2022):

get_items() -> items()
get_all_items() -> item_collection()
get_all_items_as_dict() -> item_collection_as_dict()

This helps to silence the following warnings:
/srv/conda/envs/notebook/lib/python3.10/site-packages/pystac_client/item_search.py:834: FutureWarning: get_items() is deprecated, use items() instead
  warnings.warn(

/srv/conda/envs/notebook/lib/python3.10/site-packages/pystac_client/item_search.py:849: FutureWarning: get_all_items() is deprecated, use item_collection() instead.
  warnings.warn(

/srv/conda/envs/notebook/lib/python3.10/site-packages/pystac_client/item_search.py:864: FutureWarning: get_all_items_as_dict() is deprecated, use item_collection_as_dict() instead.
  warnings.warn(

.

Thanks for that @weiji14 do you mind checking if these bounds are still valid after the change?
https://github.com/opendatacube/odc-stac/blob/34e553964f1c682e94f87a10b7e1d37ce6867061/setup.cfg#L46

The requirement on pystac>=1.0.0,<2 isn't directly related to the changes here (which are on pystac-client).
That said, using pystac>=1.0.0 means supporting STAC 1.0.x, and pystac-client=0.4.0 where this API change was introduced supports pystac>=1.4.0 according to https://github.com/stac-utils/pystac-client/blob/v0.4.0/setup.py#L36, so I think it should be fine.


Iteration #3

Tasks for Joe to do

[x] Sort grouped SNPs by their highest gene's local degree
[x] Also highlight clicked genes in subnetwork table
[x] add gene count to breadcrumbs (updates after filtering)
[x] Query the network using a list of genes instead of a term
[ ] parent attrs
[x] exporting gene tables

[x] include network parameters

Gene annotation

[ ] TBD

Been Addressed by other issues


rbd: flattern image when it has references to parent

Currently, as part of node service we add rbd flatten task for new PVC
creates. Ideally, we should add flatten task only for snapshots/cloned
PVCs as required.
Fixes: #1543
Signed-off-by: Prasanna Kumar Kalever<EMAIL_ADDRESS>

/retest all

Not sure what causes the problem, but there seems to be a component missing in the PV-created-from-snapshot:
Sep 30 05:26:36.941: INFO: At 2020-09-30 05:16:53 +0100 BST - event for csi-rbd-restore-demo-pod: {kubelet minikube} FailedMount: MountVolume.MountDevice failed for volume "pvc-8b836dd9-8b2d-49ea-91e8-a2fb02a8df83" : rpc error: code = Internal desc = rbd: map failed with error an error (exit status 6) occurred while running rbd args: [--id csi-rbd-node -m rook-ceph-mon-a.rook-ceph.svc.cluster.local:6789 --keyfile=***stripped*** map replicapool/e2e-ns/csi-vol-ba2559b8-02d3-11eb-994a-0242ac110015 --device-type krbd], rbd error output: rbd: sysfs write failed
rbd: map failed: (6) No such device or address

Not sure what causes the problem, but there seems to be a component missing in the PV-created-from-snapshot:

Yes Neils, and for me, that looked irrelevant to this change. (Or maybe I missing something)
I'm yet to look at the other logs though.

for me, that looked irrelevant to this change

For me too, but I doubt it is coincidence that the rbd e2e tests fail, whereas cephfs works.

@mergifyio rebase

/retest all


NAD(P) metabolic process terms

We currently have this arrangement:
NAD metabolic process
|__NAD biosynthetic process
|__NAD catabolic process
|__NADH metabolic process
    |__NADH oxidation
    |__NADH regeneration

NADP metabolic process
|__NADP biosynthetic process
|__NADP catabolic process
|__NADPH oxidation
|__NADPH regeneration

And here are the terms:
id: GO:0019674
name: NAD metabolic process
def: "The chemical reactions and pathways involving nicotinamide adenine dinucleotide (NAD), a coenzyme present in most living cells and derived from the B vitamin nicotinic acid." [GOC:jl, ISBN:0618254153]
intersection_of: GO:0008152 ! metabolic process
intersection_of: has_primary_input_or_output CHEBI:13389 ! NAD
property_value: term_tracker_item "https://github.com/geneontology/go-ontology/issues/21577" xsd:anyURI
property_value: term_tracker_item "https://github.com/geneontology/go-ontology/issues/23467" xsd:anyURI
id: GO:0009435
name: NAD biosynthetic process
def: "The chemical reactions and pathways resulting in the formation of nicotinamide adenine dinucleotide, a coenzyme present in most living cells and derived from the B vitamin nicotinic acid; biosynthesis may be of either the oxidized form, NAD, or the reduced form, NADH." [GOC:jl, ISBN:0618254153]
intersection_of: GO:0009058 ! biosynthetic process
intersection_of: has_primary_output CHEBI:13389 ! NAD
property_value: term_tracker_item "https://github.com/geneontology/go-ontology/issues/21577" xsd:anyURI
id: GO:0019677
name: NAD catabolic process
def: "The chemical reactions and pathways resulting in the breakdown of nicotinamide adenine dinucleotide, a coenzyme present in most living cells and derived from the B vitamin nicotinic acid; catabolism may be of either the oxidized form, NAD, or the reduced form, NADH." [GOC:jl, ISBN:0618254153]
intersection_of: GO:0009056 ! catabolic process
intersection_of: has_primary_input CHEBI:13389 ! NAD
property_value: term_tracker_item "https://github.com/geneontology/go-ontology/issues/21577" xsd:anyURI
id: GO:0006734 (28 direct EXP annotations)
name: NADH metabolic process
def: "The chemical reactions and pathways involving reduced nicotinamide adenine dinucleotide (NADH), a coenzyme present in most living cells and derived from the B vitamin nicotinic acid." [GOC:jl, ISBN:0618254153]
intersection_of: GO:0008152 ! metabolic process
intersection_of: has_primary_input_or_output CHEBI:57945 ! NADH(2-)
id: GO:0006116 (25 direct EXP annotations)
name: NADH oxidation
def: "A metabolic process that results in the oxidation of reduced nicotinamide adenine dinucleotide, NADH, to the oxidized form, NAD+." [GOC:ai]
intersection_of: GO:0008152 ! metabolic process
intersection_of: has_primary_input CHEBI:57945 ! NADH(2-)
intersection_of: has_primary_output CHEBI:57540 ! NAD(1-)
property_value: term_tracker_item "https://github.com/geneontology/go-ontology/issues/21577" xsd:anyURI
id: GO:0006735 (9 direct EXP annotations)
name: NADH regeneration
def: "A metabolic process that generates a pool of NADH by the reduction of NAD+." [GOC:mah]
intersection_of: GO:0008152 ! metabolic process
intersection_of: has_output CHEBI:57945 ! NADH(2-)
intersection_of: has_primary_input CHEBI:57540 ! NAD(1-)
intersection_of: has_primary_output CHEBI:57945 ! NADH(2-)

id: GO:0006739
name: NADP metabolic process
def: "The chemical reactions and pathways involving nicotinamide-adenine dinucleotide phosphate, a coenzyme involved in many redox and biosynthetic reactions; metabolism may be of either the oxidized form, NADP, or the reduced form, NADPH." [GOC:mah]
intersection_of: GO:0008152 ! metabolic process
intersection_of: has_primary_input_or_output CHEBI:58349 ! NADP(3-)
property_value: term_tracker_item "https://github.com/geneontology/go-ontology/issues/23467" xsd:anyURI
id: GO:0006741
name: NADP biosynthetic process
def: "The chemical reactions and pathways resulting in the formation of nicotinamide-adenine dinucleotide phosphate, a coenzyme involved in many redox and biosynthetic reactions; biosynthesis may be of either the oxidized form, NADP, or the reduced form, NADPH." [GOC:mah]
intersection_of: GO:0009058 ! biosynthetic process
intersection_of: has_primary_output CHEBI:58349 ! NADP(3-)
id: GO:0006742
name: NADP catabolic process
def: "The chemical reactions and pathways resulting in the breakdown of nicotinamide-adenine dinucleotide phosphate, a coenzyme involved in many redox and biosynthetic reactions; catabolism may be of either the oxidized form, NADP, or the reduced form, NADPH." [GOC:mah]
intersection_of: GO:0009056 ! catabolic process
intersection_of: has_primary_input CHEBI:58349 ! NADP(3-)
id: GO:0070995 (16 direct EXP annotations)
name: NADPH oxidation
def: "A metabolic process that results in the oxidation of reduced nicotinamide adenine dinucleotide, NADPH, to the oxidized form, NADP." [GOC:BHF, GOC:mah]
is_a: GO:0006739 ! NADP metabolic process
intersection_of: GO:0008152 ! metabolic process
intersection_of: has_primary_input CHEBI:57783 ! NADPH(4-)
intersection_of: has_primary_output CHEBI:58349 ! NADP(3-)
id: GO:0006740 (24 direct EXP annotations)
name: NADPH regeneration
def: "A metabolic process that generates a pool of NADPH by the reduction of NADP+." [GOC:mah]
is_a: GO:0006091 ! generation of precursor metabolites and energy
is_a: GO:0006739 ! NADP metabolic process
intersection_of: GO:0008152 ! metabolic process
intersection_of: has_primary_input CHEBI:58349 ! NADP(3-)
intersection_of: has_primary_output CHEBI:57783 ! NADPH(4-)

I think there are several issues to address here:

[ ] In all these defs, "the oxidized form" should be reported as 'NAD+' or ''NADP+' rather than just 'NAD' or 'NADP'.

[ ] For the 'NAD metabolic process' term def, should add "metabolism may be of either the oxidized form, NAD+, or the reduced form, NADH." to match the defs of the child 'NAD biosynthetic/catabolic process' terms as well as the def of the equivalent 'NADP metabolic process' term.

[ ] Implementing the point above would make the "NADH metabolic process" term redundant, so it should be obsoleted (or rather merged into the parent 'NAD metabolic process' term). Doing so would also then match how the NADP branch is already organised.

[ ] As alluded to in #27924, "NADH oxidation" and "NADPH oxidation" are just inevitable consequences of these factors acting as co-enzymes for oxidoreductase enzymes - I can't see any utility in having these terms (as defined), since they could be applied to any oxidoreductase reaction using NAD(P)H and operating in the reductase direction. Suggest these two terms are obsoleted.

[ ] Change the primary_input/output chemical on the NAD metabolic/biosynthesis/catabolic terms from 'CHEBI:13389 ! NAD' to 'CHEBI:57540 ! NAD(1-)' to be consistent with how this is reported in the other terms mentioned above. (This was meant to be fixed in #23467, but doesn't look like it actually happened.)

[ ] The LD of the 'NADH regeneration' term has the same CHEBI as both 'has_output' and 'has_primary_output' - remove the former.

[ ] The 'NADPH regeneration' term appears to have a "is_a: GO:0006739 ! NADP metabolic process" relation that is redundant with the LD - need to check and remove if so.

I found PMID:28648096 is a good general review of NAD(H) and NADP(H) biology, including synthetic pathways.
@rozaru  @deustp01  @ukemi

The NAD biosynthetic process branch will need some updating too.
NAD biosynthetic process
    |__'de novo' NAD biosynthetic process
    |   |__'de novo' NAD biosynthetic process from aspartate
    |   |__'de novo' NAD biosynthetic process from tryptophan(+ regulatory terms)
    |__NAD biosynthesis via nicotinamide riboside salvage pathway
    |__NAD salvage

This is how the GO terms fits into the various pathways known to make NAD.

There are various issues:

term definitions needs to be updated
some Xref to MetacCyc are missing
misplaced terms

For the parent:

GO:0009435 NAD biosynthetic process
def: "The chemical reactions and pathways resulting in the formation of nicotinamide adenine dinucleotide, a coenzyme present in most living cells and derived from the B vitamin nicotinic acid; biosynthesis may be of either the oxidized form, NAD, or the reduced form, NADH."

the definition is too restrictive and doesn’t mention the alternative routes
vitamin B3 would be the correct term and this term normally includes various forms including nicotinamide and nicotinic acid (nicotinate)

Proposal 1:
def:"The chemical reactions and pathways resulting in the formation of nicotinamide adenine dinucleotide (NAD), a coenzyme present in most living cells; biosynthesis may be of either the oxidized form, NAD, or the reduced form, NADH."
Proposal 2:
def:"The chemical reactions and pathways resulting in the formation of nicotinamide adenine dinucleotide (NAD), a coenzyme present in most living cells and is derived from various sources including vitamin B3; biosynthesis may be of either the oxidized form, NAD, or the reduced form, NADH."

For these 2 terms:

GO:0034628 'de novo' NAD biosynthetic process from aspartate
def: "The chemical reactions and pathways resulting in the formation of nicotinamide adenine dinucleotide (NAD), beginning with the synthesis of aspartate from simpler precursors; biosynthesis may be of either the oxidized form, NAD, or the reduced form, NADH."

GO:0034354 'de novo' NAD biosynthetic process from tryptophan
def: "The chemical reactions and pathways resulting in the formation of nicotinamide adenine dinucleotide (NAD), beginning with the synthesis of tryptophan from simpler precursors; biosynthesis may be of either the oxidized form, NAD, or the reduced form, NADH."

both definitions “beginning with the synthesis of aspartate/tryptophane”. This is incorrect as it is their catabolism that provides the precursor quinolinate for NAD biosynthesis
normally it's L-aspartate and L-tryptophan

Proposal:
GO:0034628 'de novo' NAD biosynthetic process from L-aspartate
def: "The chemical reactions and pathways resulting in the formation of nicotinamide adenine dinucleotide (NAD), beginning with the catabolism of L-aspartate into the precursor quinolinate; biosynthesis may be of either the oxidized form, NAD, or the reduced form, NADH."
GO:0034354 'de novo' NAD biosynthetic process from L-tryptophan
def: "The chemical reactions and pathways resulting in the formation of nicotinamide adenine dinucleotide (NAD), beginning with the catabolism of L-tryptophan into the precursor quinolinate; biosynthesis may be of either the oxidized form, NAD, or the reduced form, NADH."

For these terms:

GO:0034355 NAD salvage
def: "Any process that generates nicotinamide adenine dinucleotide (NAD) from derivatives of it, without de novo synthesis; salvage is usually from the degradation products nicotinic acid (Na) and nicotinamide (Nam)."

“from the degradation products...” it’s probably true but they are mostly acquired from the diet
the term name may be updated
In the literature, the production of NAD from nicotinate (nicotinic acid) is called the Preiss-Handler pathway, some authors include it in the salvage pathway other not. For the moment the NAD salvage GO term includes it.

Proposal:
GO:0034355 NAD salvage biosynthetic process
Def: Any process that generates nicotinamide adenine dinucleotide (NAD) from vitamin B3 derivatives including nicotinic acid (NA) and nicotinamide (NAM), without de novo synthesis. NAD can also be produced from beta-nicotinamide D-ribonucleotide (NMN) or beta-nicotinamide D-riboside (NR).

GO:0034356 NAD biosynthesis via nicotinamide riboside salvage pathway
def: "The chemical reactions and pathways resulting in the formation of nicotinamide adenine dinucleotide (NAD) from the vitamin precursor nicotinamide riboside."

it should be a child of GO:0034355 NAD salvage
Should this term be kept or merged to NAD salvage?
If the term is kept the name and the definition will need to be updated and the other compounds would need their own GO term

Hi @rozaru
Maybe GO:0034355 NAD biosynthetic process by/via (the) salvage pathway sounds less GO-speak?

@pgaudet
I like your suggestion "NAD biosynthetic process via the salvage pathway", it works better.


Integrate instagram to show (own) photos on a map

Instagram API allows us to get the photos posted by the user.The response type contains the information about the location of the Media too.A example response type looks like
{
    "data": [{
        "comments": {
            "data": [],
            "count": 0
        },
        "caption": {
            "created_time": "1296710352",
            "text": "Inside le truc #foodtruck",
            "from": {
                "username": "kevin",
                "full_name": "Kevin Systrom",
                "type": "user",
                "id": "3"
            },
            "id": "26621408"
        },
        "likes": {
            "count": 15,
            "data": [{
                "username": "mikeyk",
                "full_name": "Mike Krieger",
                "id": "4",
                "profile_picture": "..."
            }, {...subset of likers...}]
        },
        "link": "http://instagr.am/p/BWrVZ/",
        "user": {
            "username": "kevin",
            "profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg",
            "id": "3"
        },
        "created_time": "1296710327",
        "images": {
            "low_resolution": {
                "url": "http://distillery.s3.amazonaws.com/media/2011/02/02/6ea7baea55774c5e81e7e3e1f6e791a7_6.jpg",
                "width": 306,
                "height": 306
            },
"type": "image",
        "users_in_photo": [],
        "filter": "Earlybird",
        "tags": ["foodtruck"],
        "id": "22721881",
        "location": {
            "latitude": 37.778720183610183,
            "longitude": -122.3962783813477,
            "id": "520640",
            "street_address": "",
            "name": "Le Truc"

Currently I am planning to show latest 100 photos posted by a user on the map.
The flow of the process will be like
Then on clicking Add App user will be taken to Instagram site for oAuth then, from there to loklak.net/istagram where the map will show the instagram photos

This should be implemented as a crawler first: https://github.com/loklak/loklak_server/issues/343


✨ support configuration of the agent priorityclass

Summary
Related issue(s)
Fixes #

/hold

/unhold


Site home page

Complete the design and construction of the site home page.

[x] FeaturedArticle component
[x] ArticleList component
[x] HomePage context to include queries for featured and article list
[x] Constrain HomePage to only exist at top level of tree

Basic HomePage functionality complete


Admin settings page does not display on IIAB

Per iiab/iiab#1830:

Steps to reproduce the problem.

Install lokole as part of IIAB install
Login as administrator with Admin/changeme
Access the Settings tab
You get Unexpected error. Please contact your administrator.  message
Output of systemctl status lokole is below

● lokole.service - Provides the Lokole Server
   Loaded: loaded (/etc/systemd/system/lokole.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-07-06 13:40:11 IST; 24h ago
 Main PID: 1144 (bash)
    Tasks: 6 (limit: 4915)
   CGroup: /system.slice/lokole.service
           ├─1144 /bin/bash /home/lokole/state/webapp.sh
           ├─1202 /library/lokole/venv/bin/python3 /library/lokole/venv/bin/gunicorn --timeout=300 --workers=4 --bind=unix:/home/lokole/state/lokole_gunicorn.sock --log-level=error opwen_email_client.webapp:app
           ├─2020 /library/lokole/venv/bin/python3 /library/lokole/venv/bin/gunicorn --timeout=300 --workers=4 --bind=unix:/home/lokole/state/lokole_gunicorn.sock --log-level=error opwen_email_client.webapp:app
           ├─2034 /library/lokole/venv/bin/python3 /library/lokole/venv/bin/gunicorn --timeout=300 --workers=4 --bind=unix:/home/lokole/state/lokole_gunicorn.sock --log-level=error opwen_email_client.webapp:app
           ├─2042 /library/lokole/venv/bin/python3 /library/lokole/venv/bin/gunicorn --timeout=300 --workers=4 --bind=unix:/home/lokole/state/lokole_gunicorn.sock --log-level=error opwen_email_client.webapp:app
           └─2155 /library/lokole/venv/bin/python3 /library/lokole/venv/bin/gunicorn --timeout=300 --workers=4 --bind=unix:/home/lokole/state/lokole_gunicorn.sock --log-level=error opwen_email_client.webapp:app

Jul 06 13:40:11 box systemd[1]: Started Provides the Lokole Server.
Jul 07 14:05:19 box bash[1144]: [2019-07-07 14:05:19 +0530] [2020] [ERROR] TypeError: expected str, bytes or os.PathLike object, not NoneType
Jul 07 14:05:24 box bash[1144]: [2019-07-07 14:05:24 +0530] [2042] [ERROR] TypeError: expected str, bytes or os.PathLike object, not NoneType
Jul 07 14:05:52 box bash[1144]: [2019-07-07 14:05:52 +0530] [2042] [ERROR] TypeError: expected str, bytes or os.PathLike object, not NoneType
Jul 07 14:06:03 box bash[1144]: [2019-07-07 14:06:03 +0530] [2034] [ERROR] TypeError: expected str, bytes or os.PathLike object, not NoneType

This failure happens in version 0.4.2 and possibly earlier. We should git bisect for the commit that caused the failure, revert it, and then fix it.

The settings page consists entirely of network-related settings and should not be visible on offline instances of Lokole. We should disable it for offline instances.

We should also decide what happens if someone tries to navigate to /admin/settings on an offline Lokole instance. I suggest designing an empty state that replaces the settings page in local-only mode.


Choco install ssis-vs2019 error

hi, we are having issues with this command:
  - task: CmdLine@2
    displayName: Install ssis-vs2019 (18mins)
    inputs:
      script: 'choco install -Y ssis-vs2019 --no-progress'

De build process gives us this error:

This is the full log:
2021-02-19T07:15:54.2589434Z ##[section]Starting: Install ssis-vs2019 (18mins)
2021-02-19T07:15:54.2849177Z ==============================================================================
2021-02-19T07:15:54.2849525Z Task         : Command line
2021-02-19T07:15:54.2849839Z Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2021-02-19T07:15:54.2851125Z Version      : 2.182.0
2021-02-19T07:15:54.2851363Z Author       : Microsoft Corporation
2021-02-19T07:15:54.2851711Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2021-02-19T07:15:54.2852081Z ==============================================================================
2021-02-19T07:15:55.6820191Z Generating script.
2021-02-19T07:15:55.7089820Z Script contents:
2021-02-19T07:15:55.7103682Z choco install -Y ssis-vs2019 --no-progress
2021-02-19T07:15:55.7690551Z ========================== Starting Command Output ===========================
2021-02-19T07:15:55.8237308Z ##[command]"C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a\_temp\b3d08b75-6734-4155-bab0-96a7a43a6c60.cmd""
2021-02-19T07:15:57.2645198Z Chocolatey v0.10.15
2021-02-19T07:16:14.7671139Z Installing the following packages:
2021-02-19T07:16:14.7680629Z ssis-vs2019
2021-02-19T07:16:14.7763834Z By installing you accept licenses for the packages.
2021-02-19T07:16:19.3868002Z
2021-02-19T07:16:19.3868965Z DotNet4.6 v4.6.00081.20150925 [Approved]
2021-02-19T07:16:19.4019181Z dotnet4.6 package files install completed. Performing other installation steps.
2021-02-19T07:16:21.1489685Z Microsoft .NET Framework 4.6 or later is already installed
2021-02-19T07:16:22.2347952Z  The install of dotnet4.6 was successful.
2021-02-19T07:16:22.2355158Z   Software install location not explicitly set, could be in package or
2021-02-19T07:16:22.2355626Z   default install location if installer.
2021-02-19T07:16:22.6362376Z
2021-02-19T07:16:22.6363417Z DotNet4.6-TargetPack v4.6.00081.20150925 [Approved] - Possibly broken
2021-02-19T07:16:22.6376037Z dotnet4.6-targetpack package files install completed. Performing other installation steps.
2021-02-19T07:16:23.7003075Z WARNING: Url has SSL/TLS available, switching to HTTPS for download
2021-02-19T07:16:23.8558272Z Downloading DotNet46-TargetPack
2021-02-19T07:16:23.8611070Z   from 'https://download.microsoft.com/download/8/2/F/82FF2034-83E6-4F93-900D-F88C7AD9F3EE/NDP46-TargetingPack-KB3045566.exe'
2021-02-19T07:16:24.4435549Z
2021-02-19T07:16:24.4449880Z Download of NDP46-TargetingPack-KB3045566.exe (12.91 MB) completed.
2021-02-19T07:16:27.5146637Z Installing DotNet46-TargetPack...
2021-02-19T07:16:38.1545585Z DotNet46-TargetPack has been installed.
2021-02-19T07:16:38.2288486Z WARNING: Url has SSL/TLS available, switching to HTTPS for download
2021-02-19T07:16:38.2973885Z Downloading DotNet46-TargetPack-enu
2021-02-19T07:16:38.2974515Z   from 'https://download.microsoft.com/download/8/2/F/82FF2034-83E6-4F93-900D-F88C7AD9F3EE/NDP46-TargetingPack-KB3045566-ENU.exe'
2021-02-19T07:16:38.5488673Z
2021-02-19T07:16:38.5499176Z Download of NDP46-TargetingPack-KB3045566-ENU.exe (6.68 MB) completed.
2021-02-19T07:16:41.5589302Z Installing DotNet46-TargetPack-enu...
2021-02-19T07:16:50.8041096Z DotNet46-TargetPack-enu has been installed.
2021-02-19T07:16:51.2608643Z   dotnet4.6-targetpack may be able to be automatically uninstalled.
2021-02-19T07:16:51.3468175Z  The install of dotnet4.6-targetpack was successful.
2021-02-19T07:16:51.3473236Z   Software installed as 'exe', install location is likely default.
2021-02-19T07:16:51.5796078Z
2021-02-19T07:16:51.5797157Z ssis-vs2019 v3.12 [Approved]
2021-02-19T07:16:51.5801876Z ssis-vs2019 package files install completed. Performing other installation steps.
2021-02-19T07:16:54.6812435Z Attempt to get headers for https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/3.12/vspackage failed.
2021-02-19T07:16:54.6814703Z   The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/3.12/vspackage'. Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (429)."
2021-02-19T07:16:54.6829216Z Downloading ssis-vs2019
2021-02-19T07:16:54.6830044Z   from 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/3.12/vspackage'
2021-02-19T07:16:56.9032864Z ERROR: The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/3.12/vspackage'. Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (429)."
2021-02-19T07:16:56.9034637Z This package is likely not broken for licensed users - see https://chocolatey.org/docs/features-private-cdn.
2021-02-19T07:16:57.2655969Z The install of ssis-vs2019 was NOT successful.
2021-02-19T07:16:57.2690658Z Error while running 'C:\ProgramData\chocolatey\lib\ssis-vs2019\tools\ChocolateyInstall.ps1'.
2021-02-19T07:16:57.2691724Z  See log for details.
2021-02-19T07:16:59.4524481Z
2021-02-19T07:16:59.4525504Z Chocolatey installed 2/3 packages. 1 packages failed.
2021-02-19T07:16:59.4525979Z  See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2021-02-19T07:16:59.4532875Z
2021-02-19T07:16:59.4538584Z Failures
2021-02-19T07:16:59.4545644Z  - ssis-vs2019 (exited 404) - Error while running 'C:\ProgramData\chocolatey\lib\ssis-vs2019\tools\ChocolateyInstall.ps1'.
2021-02-19T07:16:59.4546537Z  See log for details.
2021-02-19T07:16:59.9420080Z ##[error]Cmd.exe exited with code '404'.
2021-02-19T07:16:59.9930516Z ##[section]Finishing: Install ssis-vs2019 (18mins)

Looks like MS is rejecting the connection when trying to download the package.
¿Has anyone exprecience this?
Regards.

@SOLVIATECH-DEVOPS this is not the correct location for asking these sorts of questions.  Best advice would be to reach out in the Gitter chat room, to see if anyone has seen an issue like this.


Dockerfile in the parent directory

Can we have the dockerfile in the parent directory?
I want to build a docker image for recent changes in the source
There is a dockerfile in ci directory which build docker image from a tarball.
I want donot want to build a tarball instead i copy the directory to the docker image and install it by pip.
I

@sameer1046 I don't quite understand. The current method to create a docker container with the latest tern changes is:
$ git clone <this repo>
$ cd <this repo>
$ python setup.py sdist
$ docker build -f ci/Dockerfile -t tern .

Are you saying you do not want to run the python setup.py sdist step?

This is fine for me. Thanks


Only run test suite in pull requests

Our excellent test suite currently runs on two events: push and pull_request (see also). I think they should only run for pull _request so we don't run them twice during a PR.

Good call, I'll take care of it.

After some consideration, I think It's better to have both. The workflow runs on push come in handy, especially when modifying/updating the workflow itself (test.yaml).
Unfortunately, it's not possible to trigger an action on push or pull request but not both.

Hhm, I don't think that's a very common thing though. At the moment, we very rarely - if every - push directly to main. But I see your point about having a way to trigger the workflow. Maybe what we can do instead is enable a manual launch of the workflow for these rare situations: https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
What do you think?

Interesting, I like it!


vim quickfix panel doesnt close with ,qc after error

Please give me a way to close that damn window :) I hate it everytime it doesnt understand my html it opens, which is very nice but I would love to close it especialy in go and html.
Thanks guys

the syntastic window is not the quickfix window..try :lclose. You can map that if it annoys you. also the universal Q should work

cool thanx ill try that Q doesnt work on go files


Mr. K (Apr 8, 2021)

HiFi design landing page
https://www.figma.com/file/JCGeIX9fFrrpZiqE0XzH9s/Homepage?node-id=3%3A0
5 hours

Hey @kashikushi the given link is not working. Maybe the problem with the permission. Can you please update?

Hey @kashikushi the given link is not working. Maybe the problem with the permission. Can you please update?

https://www.figma.com/file/JCGeIX9fFrrpZiqE0XzH9s/Homepage?node-id=3%3A0

Hey, @kashikushi  can you please make Figma designs viewable to everyone instead?

Hey, @kashikushi  can you please make Figma designs viewable to everyone instead?

Approved

Closed. This was practice, we will officially begin timesheet reports Monday, April 12, 2021


Wrapped Inventories doesn't pull / push the items from / to the right block

Describe
Usually when you wrap an Inventory block (chest, furnace, etc) as a peripheral, in the classic OpenPeripherals pushing / pulling items in a certain direction had pushed / pulled those items relative to that inventory block. Currently the target seems to be relative to the computer executing the push / pull.
I hade a smoker at the bottom, an advanced turtle on top and on top of that a vanilla chest. Wrapping the bottom (smoker) and pulling items from the top, does not pull from the block above the smoker (from the turtle's inventory) but from the inventory on top of the turtle (from the vanilla chest). The same happens in reverse. Wrapping the chest on top and pusing items down does not push the items into the turtle but into the smoker. So it's completely impossible to move items in or out the turtle that way since it's essentially skipped. When the target inventory is determined it currently use the turtle as reference and not the actual peripheral.
ps: I've seen older issues which complained about the usage of the usual forge directions (up, down, north, east, south, west) as it was implemented in OpenPeripherals and that it was changed to the usual relative computercraft directions (top, bottom, front, back, left, right). While I appreciate a more consistent usage, its actually a breaking change compared to the behaviour of the original mods. I don't mind the directions change, however pulling / pushing from / to a turtle does not work at all with the current implementation. That renders many common usecases impossible as we can not access specific items from a chest. A hacky workaround would be to temporarily place a chest in front of the turtle, pull items from the smoker / chest diagonally into that front chest and then use an ordinary turtle.suck() to get the items into the turtle's inventory.
Anyways, thanks for keeping those essential CC addons alive.
Steps to reproduce

Turtle with chest on top and smoker below
wrap the smoker p = peripheral.wrap("bottom")
try to pull items from the turtle into the smoker: p.pullItems("top",1,1,1)
The pullItems call does not pull from the turtle that is on top of the smoker but from the chest on top of the turtle.

Multiplayer?
Yes
Version
1.19.2-0.7.19a (Latest 1.19)
Minecraft, Forge and maybe other related mods versions
1.19.2 forge-43.1.43
Screenshots or Videos
No response
Crashlog/log
No response

I am a bit confused.
Your issue looks more like an issue with CC. You also do not mention any feature or block for AP
Are you sure that you're right here?

Inventory features now exists in CC:Tweaked itself. Turtle have a problematic interaction with inventory, here is a nice picture describing it

Sorry for the late response I was quite busy the last week and essentially forgot about this. I'm actually confused myself now ^^.
Sorry if I wasted your time. Though I was searching through the code and found pushItems in the InventoryUtil class, though  it seems the method isn't actually used anywhere in your code, This method however reflects exactly the issue mentioned :)
You provide the exact same parameters and the method takes a IComputerAccess and an ItemHandler. That item handler is the source, so the wrapped peripheral. The method getHandlerFromName is then used to grab the target, but this is done relative to the computer, not the wrapped item handler.
So I wrongly interpreted this as that the problem was in your code. I've acutally found the pushItems method in the CC Tweaked repository.
Yes, by reading the comments of the method it now makes sense what they actually had in mind. So you can use a wired network and push between any connected peripherals, Though that means the method does not work at all for pushing / pulling items to / from the turtle unless you connect it to a wired modem. This new functionaliry is of course much more powerful than the "old" one, though it breaks any previous (lua) code.
So again, sorry to bother you. Thanks for keeping CC and essential features alive.

I'm glad that you found an answer to your question
You don't waste time (:
If you have any questions, you can ask in the discussion tab on github or on our discord https://discord.srendi.de/

:) Yes, it's an answer, though it's sad that people always break well established APIs. Linus Torwalds would crush them if they did this in the kernel :D
Claiming they continue the old mod but breaking countless of things is not really continuing the mod. I do understand that they wanted to add new features, fine, however they could have added seperate methods for this.
Just noticed that you seem to be german? Dann hätten wir noch was gemeinsam :)


With the new MetalANGLE backend the possible OpenGL 60fps limitation is now gone. Unfortunately I don't have a >60fps device to test on.

With the new MetalANGLE backend the possible OpenGL 60fps limitation is now gone. Unfortunately I don't have a >60fps device to test on.
Originally posted by @obigu in https://github.com/libgdx/libgdx/issues/6717#issuecomment-1168775825

Is-- isn't that a good thing? Are you human?


cas: rename to store

The cas package implements more than just a CAS, so this patch gives it
a suitably generic name.
Fixes #707
(Go newbie here, let me know if I missed anything!)

@vreon thanks, this is exactly what we're after! Afraid you'll need to rebase since it looks like something conflicting was merged in the meantime. Also, you can probably go ahead and rename cas{,_store}.go -> store{,_test}.go

Done and done!

Lgtm, thanks again!


fix: Examples relying on Testing library

Some examples rely on testing library break on stackblitz due to absence of jsdom. This PR adds JSDom as dev dependency to fix the issue.
Thanks to @patak-dev for the discussion on it

Shall I run pnpm i in root directory? Not very familiar with workspaces

Yes


SAK-45051 Add Gradebook items to Tasks widget

The reason of why the checkbox wasn't checked before if I created a new gradebook item is due to the fact that the information about its state wasn't stored in the database. So, I have added a new column ( in the table gb_gradable_object_t) called CREATED_TASK for storing the information about the state of the checkbox that allows to create a task. I have also added some methods and made some changes to fix this issue. Now, everyone can update the state of the checkbox without any problem. By default, when you create a new gradebook item the checkbox's state is true.

Let's close this issue as the implementation of SAK-45051 was beyond the specs, the checkbox adds complexity and it was never requested.


Dynamically registering IDT entries?

Currently, the IDT data structure requires its lifetime to be static. This causes a major problem -- how do you then modify the IDT later? For example, what would I want to do if I wanted to receive interrupts from a PCI device but I only know the interrupt number when I scan the PCI bus?
I ask because this is something I'd like to do. Is there a way I can modify the IDT safely without having to resort to ASM?

Good question! I'm not sure what's the best solution for this. Maybe using atomics for the IDT entries could work, but we should check the x86 reference manual whether something like this is allowed. It could help to look at how other projects solve this problem (e.g. the Linux kernel).

The Intel manuals, volume 3A, section 6.11, says:
The LIDT (load IDT register) and SIDT (store IDT register) instructions load and store the contents of the IDTR register, respectively. The LIDT instruction loads the IDTR register with the base address and limit held in a memory operand. This instruction can be executed only when the CPL is 0. It normally is used by the initialization code of an operating system when creating an IDT. An operating system also may use it to change from one IDT to another.
The SIDT instruction copies the base and limit value stored in IDTR to memory. This instruction can be executed at any privilege level.

The AMD 64 manuals, volume 2, section 4.6.5, say:
The final type of descriptor table is the interrupt descriptor table (IDT). Multiple IDTs can be maintained by system software. System software selects a specific IDT by loading the interrupt descriptor table register (IDTR) with a pointer to the IDT. As with the GDT and LDT, system software can store the IDT anywhere in memory and should protect the segment containing the IDT from non-privileged software.

Does this help?

The question is whether it's allowed to modify the IDT at runtime without reloading it. I can't really find any information about that.

I can't either. I don't mind reloading it on every major set of IDT
changes, I just need some way of doing so. Right now the IDT is marked
entirely as static so I can't put it in a mutex and modify it that
way.
On 4/24/20, Philipp Oppermann<EMAIL_ADDRESS>wrote:

The question is whether it's allowed to modify the IDT at runtime without
reloading it. I can't really find any information about that.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/phil-opp/blog_os/issues/797#issuecomment-619097976

--
Signed,
Ethin D. Probst

There is a load_unsafe method now that accepts any lifetime: https://github.com/rust-osdev/x86_64/pull/137
An alternative solution could be to set all IDT entries to some kind of default handler that performs dynamic dispatch based on the interrupt number

Now that's a nice idea. An interrupt chain, maybe?
On 4/24/20, Philipp Oppermann<EMAIL_ADDRESS>wrote:

There is a load_unsafe method now that accepts any lifetime:
https://github.com/rust-osdev/x86_64/pull/137
An alternative solution could be to set all IDT entries to some kind of
default handler that performs dynamic dispatch based on the interrupt
number
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/phil-opp/blog_os/issues/797#issuecomment-619113396

--
Signed,
Ethin D. Probst

I started a topic on the OSDev forum: https://forum.osdev.org/viewtopic.php?f=1&t=36715. Does that help? Feel free to post there if you like.

The problem with changing the entries of an existing IDT is that we would need UnsafeCell and unsafe for that. We can't really use atomics because there is no AtomicU128 type afaik.
I think the most promising option is to define wrapper functions that call a default handler with the interrupt number. Maybe we can add a convenience function to this crate that sets up the wrapper functions for you.

Why must we use u128s? Can we just use u64s and then pad the remaining
bytes with zeros? There are only 256 interrupt vectors; a u128 seems
overkill for that.
On 4/29/20, Philipp Oppermann<EMAIL_ADDRESS>wrote:

The problem with changing the entries of an existing IDT is that we would
need UnsafeCell and unsafe for that. We can't really use atomics because
there is no AtomicU128 type afaik.
I think the most promising option is to define wrapper functions that call a
default handler with the interrupt number. Maybe we can add a convenience
function to this crate that sets up the wrapper functions for you.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/phil-opp/blog_os/issues/797#issuecomment-621189958

--
Signed,
Ethin D. Probst

An idt entry is 128bit. You need to atomically write the full 128bit entry to avoid problems.

I think I've found a way of successfully solving this problem (maybe...). We'll see how it goes.

Please report back if you have found a good solution!


Fix incorrect rustdoc for TcpStream::connect

It is Interest::WRITABLE we should care about after non-blocking TcpStream::connect.
I find two manuals:

https://man7.org/linux/man-pages/man2/connect.2.html EINPROGRESS

The socket is nonblocking and the connection cannot be
completed immediately.  (UNIX domain sockets failed with
EAGAIN instead.)  It is possible to select(2) or poll(2)
for completion by selecting the socket for writing.  After
select(2) indicates writability, use getsockopt(2) to read
the SO_ERROR option at level SOL_SOCKET to determine
whether connect() completed successfully (SO_ERROR is
zero) or unsuccessfully (SO_ERROR is one of the usual
error codes listed here, explaining the reason for the
failure).

https://www.freebsd.org/cgi/man.cgi?connect EINPROGRESS

The socket is non-blocking and the connection cannot be completed immediately.  It is possible to select(2) for completion by selecting the socket for writing.

I find two code usages:

TcpStream::connect_mio from tokio.  pub(crate) async fn connect_mio(sys: mio::net::TcpStream) -> io::Result<TcpStream> {
      let stream = TcpStream::new(sys)?;

      // Once we've connected, wait for the stream to be writable as
      // that's when the actual connection has been initiated. Once we're
      // writable we check for `take_socket_error` to see if the connect
      // actually hit an error or not.
      //
      // If all that succeeded then we ship everything on up.
      poll_fn(|cx| stream.io.registration().poll_write_ready(cx)).await?;

      if let Some(e) = stream.io.take_error()? {
          return Err(e);
      }

      Ok(stream)
  }

uv__tcp_connect from libuv.uv__req_init(handle->loop, req, UV_CONNECT);
req->cb = cb;
req->handle = (uv_stream_t*) handle;
QUEUE_INIT(&req->queue);
handle->connect_req = req;

uv__io_start(handle->loop, &handle->io_watcher, POLLOUT);

if (handle->delayed_error)
  uv__io_feed(handle->loop, &handle->io_watcher);

Thanks for catching this @kezhuw

Hi, I've been playing around with TcpStream::connect and it seems that the documentation is not yet accurate.
The doc says "go back to step 3" if you get NotConnected error, i.e. wait for writable event again. I've been experiment with refused connections and we never get another writable event and the error is always NotConnected if I keep on polling.
It doesn't look like the code TcpStream::connect_mio does the "go back to step 3" logic as well.
It seems that what tokio does is wait for writable event and then propagate any kind of error. Without regarding what kind of error is that. I did something similar on my code:
fn poll_open(
    self: &mut mio::net::TcpStream,
    token: Token,
    polled_write: &mut bool,
    cx: &mut Context<'_>,
    manager: &PollManagerInner,
) -> Poll<io::Result<()>> {
    match *polled_write {
        true => Poll::Ready(self.peer_addr().map(|_| ())),
        false => {
            manager.pending(token, ObserveInterest::Write, cx);
            *polled_write = true;
            Poll::Pending
        }
    }
}

This seems to be working fine on my limited amount of tests (only tested only linux).

If I recall correctly, it's been a while since I wrote this code, errors returned by connect(2) should be considered fatal. If connect(2) succeeds, getpeername(2) should be used to determine if the connection is actually connected or not. If getpeername(2) returns EINPROGRESS it's in progress. Linux always returns EINPROGRESS, other Unixes can also return ENOTCONN (mapped to io::ErrorKind::NotConnected). However it's been a couple years since I wrote this code.
Here is a working implementation: https://github.com/Thomasdezeeuw/heph/blob/29b661563f180a3d7c251043596c045659fd8ed2/rt/src/net/tcp/stream.rs#L562-L622.

I see now. The difference between my code the one in your library is that you use take_error() function.
Unless I am misunderstanding completely the instructions. I think we should add another step between the current step 3 and step 4 saying that any error present on take_error() should be returned. Do you agree?
Just for the record, I did some prints using my code, this is what I get on take_error() and on peer_addr():
Xis {
    take_error: Ok(
        None,
    ),
    peer_addr: Err(
        Os {
            code: 107,
            kind: NotConnected,
            message: "Transport endpoint is not connected",
        },
    ),
}
// Writable event happened here
Xis {
    take_error: Ok(
        Some(
            Os {
                code: 111,
                kind: ConnectionRefused,
                message: "Connection refused",
            },
        ),
    ),
    peer_addr: Err(
        Os {
            code: 107,
            kind: NotConnected,
            message: "Transport endpoint is not connected",
        },
    ),
}

Remarks: The ConnectionRefused error is exactly the expected result as I am testing refused connections.

I see now. The difference between my code the one in your library is that you use take_error() function. Unless I am misunderstanding completely the instructions. I think we should add another step between the current step 3 and step 4 saying that any error present on take_error() should be returned. Do you agree?

Yes. Would you like to open a pr for that?


Nixkpgs defaults to version 1.13.4

Nixpkgs is a bit behind, so attempting to drop in via the derivation of the build environment you provided in your flake.nix isn't possible.
Apparently, livebook only runs on Elixir ~> 1.14.2 or ~> 1.15-dev?

I think we should remove the flake. It was added to support people using it by other people using it.
I'm not a flake user, though, and I don't think we should support it since it's likely to fall behind without an active maintainer using it.

Flake has been removed

Sad to see the flake go, but I understand.


added mse_loss

Before submitting

[ ] Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
[ ] Did you read the contributor guideline, Pull Request section?
[ ] Did you make sure to update the docs?
[ ] Did you write any new necessary tests?

What does this PR do?
Fixes #174 .
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
YES!

Hi @mruberry!
Just wanted to follow up the mse_loss issue and ask some specific questions regarding the implementation. Before anything, without any DecorateInfo in mse_loss_opinfo, the current implementation has the following errors:
FAILED thunder/tests/test_grad.py::test_vjp_correctness_mse_loss_torch_cpu_float64 - AssertionError: Scalars are not close!
FAILED thunder/tests/test_grad.py::test_phantom_grad_vs_torch_consistency_mse_loss_torch_cpu_bfloat16 - RuntimeError: "mse_cpu" not implemented for 'BFloat16'
FAILED thunder/tests/test_grad.py::test_phantom_grad_vs_torch_consistency_mse_loss_torch_cpu_float16 - RuntimeError: "mse_backward_cpu_out" not implemented for 'Half'
FAILED thunder/tests/test_grad.py::test_phantom_grad_vs_torch_consistency_mse_loss_torch_cpu_float32 - AssertionError: Tensor-likes are not close!
FAILED thunder/tests/test_grad.py::test_phantom_grad_vs_torch_consistency_mse_loss_torch_cpu_float64 - AssertionError: Tensor-likes are not close!
FAILED thunder/tests/test_ops.py::test_core_vs_torch_consistency_mse_loss_torch_cpu_bfloat16 - RuntimeError: "mse_cpu" not implemented for 'BFloat16'

My question is, I am not sure if the error is due to my implementation itself, or if PyTorch is not supporting something. In the case of the "not implemented error", I am tempted to resolve these with the following DecorateInfo:

test_directives=(
    DecorateInfo(
        pytest.mark.skip,
        "test_core_vs_torch_consistency",
        dtypes=(datatypes.bfloat16,),
        devicetypes=(devices.DeviceType.CPU,),
    ),
    DecorateInfo(
        pytest.mark.skip,
        "test_phantom_grad_vs_torch_consistency",
        dtypes=(datatypes.bfloat16, datatypes.float16,),
        devicetypes=(devices.DeviceType.CPU,),
    ),
),

How do I know if PyTorch supports this or not?
2. Regarding other assertion errors, as it is throwing errors in for a dtype of float64, I am assuming this is because of my implementation. Any suggestions or comments would be appreciated!

Hi @mruberry! Just wanted to follow up the mse_loss issue and ask some specific questions regarding the implementation. Before anything, without any DecorateInfo in mse_loss_opinfo, the current implementation has the following errors:
FAILED thunder/tests/test_grad.py::test_vjp_correctness_mse_loss_torch_cpu_float64 - AssertionError: Scalars are not close!
FAILED thunder/tests/test_grad.py::test_phantom_grad_vs_torch_consistency_mse_loss_torch_cpu_bfloat16 - RuntimeError: "mse_cpu" not implemented for 'BFloat16'
FAILED thunder/tests/test_grad.py::test_phantom_grad_vs_torch_consistency_mse_loss_torch_cpu_float16 - RuntimeError: "mse_backward_cpu_out" not implemented for 'Half'
FAILED thunder/tests/test_grad.py::test_phantom_grad_vs_torch_consistency_mse_loss_torch_cpu_float32 - AssertionError: Tensor-likes are not close!
FAILED thunder/tests/test_grad.py::test_phantom_grad_vs_torch_consistency_mse_loss_torch_cpu_float64 - AssertionError: Tensor-likes are not close!
FAILED thunder/tests/test_ops.py::test_core_vs_torch_consistency_mse_loss_torch_cpu_bfloat16 - RuntimeError: "mse_cpu" not implemented for 'BFloat16'

My question is, I am not sure if the error is due to my implementation itself, or if PyTorch is not supporting something. In the case of the "not implemented error", I am tempted to resolve these with the following DecorateInfo:

test_directives=(
    DecorateInfo(
        pytest.mark.skip,
        "test_core_vs_torch_consistency",
        dtypes=(datatypes.bfloat16,),
        devicetypes=(devices.DeviceType.CPU,),
    ),
    DecorateInfo(
        pytest.mark.skip,
        "test_phantom_grad_vs_torch_consistency",
        dtypes=(datatypes.bfloat16, datatypes.float16,),
        devicetypes=(devices.DeviceType.CPU,),
    ),
),

How do I know if PyTorch supports this or not?

These skips make a lot of sense. I wouldn't worry about supporting grad by adding mse_loss_backward and a custom grad formula transform in this PR. @IvanYashchuk may suggest otherwise, and he's our grad expert, though.

Regarding other assertion errors, as it is throwing errors in for a dtype of float64, I am assuming this is because of my implementation. Any suggestions or comments would be appreciated! I am suspecting the implementation of _mse_loss_backward_impl in executors/torchex.pyis incorrect in some way. But again, I am not sure :( Would appreciate any help!

This may be an interesting follow-up issue for a separate PR that targets optimizing this operation's grad formula, but I think this issue may disappear on this PR if this PR doesn't add the grad formula.

Cool PR, @k223kim!
Let's take this PR out of "draft," — I think it's ready for review!
I added some inline comments, particularly about understanding what's happening with the broadcasting better. I'm curious to hear more about that!
I suggest remove the custom grad formula from this PR, and seeing if that simplifies the testing. A separate PR can optimize the gradient computation.

Hey @mruberry! Thanks so much for such a detailed review! It'd be awesome if we can have a separate PR for the grad formula.
Just wanted clarify some points regarding your comments.

I wouldn't worry about supporting grad by adding mse_loss_backward and a custom grad formula transform in this PR.
This may be an interesting follow-up issue for a separate PR that targets optimizing this operation's grad formula, but I think this issue may disappear on this PR if this PR doesn't add the grad formula.

Does that mean I should do the following?

add mse_loss to op_skip in tests/test_grad.py
remove the following in torchex.py (along with the implementation of mse_loss_backward_impl)

mse_loss_backward = ex.register_operator(
    "torch_mse_loss_backward_impl", meta=ltorch.mse_loss_backward, fn=_mse_loss_backward_impl
)
_register_implementation(ltorch.mse_loss_backward, mse_loss_backward, checker=_always_executable)

remove supports_grad=True in mse_loss_opinfo in opinfos.py
remove _mse_loss_grad and mse_loss_backward in torch/__init__.py.
remove "mse_loss" in vjp_op_force in test_grad.py

Just wanted to make sure I understood properly :)
With performing all bullet points mentioned above, now I don't have errors regarding test_grad.py. (If that is what you were talking about)
I have pushed a comment with the above lines commented out. I can revert/modify after you confirm the changes!
Afterwards, I guess I can open a new PR regarding the grad formulas that were all removed above and ask Ivan for a review?

@IvanYashchuk Thanks so much for the detailed explanation! I just wanted make sure couple of things:
So, with what I have commented out currently, it passes all tests. However, when I set supports_grad=True in mse_loss_opinfo, it throws the following error:
FAILED thunder/tests/test_grad.py::test_phantom_grad_vs_torch_consistency_mse_loss_torch_cpu_float32 - RuntimeError: Trying to flatten t1 = prims.pow(t0, 2.0)  # t1: "cpu f32[2, 16]" to create a grad formula, but it has no subsymbols
FAILED thunder/tests/test_grad.py::test_phantom_grad_vs_torch_consistency_mse_loss_torch_cpu_float64 - RuntimeError: Trying to flatten t1 = prims.pow(t0, 2.0)  # t1: "cpu f64[2, 16]" to create a grad formula, but it has no subsymbols

Shouldn't this test pass if thunder automatically creates a backward function? Let me know if I misunderstood anything. Or should supports_grad be False?
Also, does that mean I should remove mse_loss_backward registeration in torchex.py and mse_loss_backward in torch/__init__.py?
(cc. @mruberry )

Yes, please remove mse_loss_backward registrations for this PR.

So, with what I have commented out currently, it passes all tests. However, when I set supports_grad=True in mse_loss_opinfo, it throws the following error

Historically we've had two different implementations for the backward pass and supports_grad=True enables testing of one of them, the other one is tested in "vjp" tests in test_grad.py. This may be confusing of course, but let's set supports_grad=False here.

Hi @mruberry! Thanks for the detailed comments :) it's helping me a lot! I can add the following to opinfos.py
DecorateInfo(
    custom_comparator(partial(assert_close, atol=1e-3, rtol=1e-2)),
    executors=("nvfuser",),
    dtypes=(datatypes.float16,),
)

However, my concern is that, I am not able to reproduce the error that you have shown above. Would this be an issue? (on my end, all tests are passing..)

I understand, and that's OK, we want to see the CI passing, and the CI and your local hardware may have some differences that cause a small precision difference.

Hey @mruberry !
One last question, regarding the custom grad formula for mse_loss, what would be the next steps? Should I submit a separate PR regarding that? Or is there a better way to work on it?
(cc. @IvanYashchuk )

Hey @mruberry ! One last question, regarding the custom grad formula for mse_loss, what would be the next steps? Should I submit a separate PR regarding that? Or is there a better way to work on it? (cc. @IvanYashchuk )

Absolutely a separate PR would be great. The reason to add a custom grad formula would be to improve performance. So it'd be nice if the PR showed performance of mse_loss forward->backward before the PR, and then after the PR, so we can be sure it improves performance.

@t-vi @Borda This may require some special push to merge. The test failure is flaky and unrelated


chore(main): release 0.1.5

:robot: I have created a release beep boop
0.1.5 (2024-12-31)
Bug Fixes

Fix renovate dockerfile management (185a13c)
Switch versioning scheme for ubuntu packages (775a732)
Update dockerfile custom manager for renovate (a5f41ae)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v0.1.5
:sunflower:


Click “refresh wildcards” but nothing happens！！！

After I put the file into the wildcards folder, I clicked refresh wildcards on the SD page, but there was no response, nothing happened! Is this what is the reason...

Me too，Have you found a solution yet?

This is likely a conflict with some other extension. Please see #429 and #360; try disabling other extensions until SDDP starts to work, and let us know if/when you find the culprit.

Me too，Have you found a solution yet?

not yet..

This is likely a conflict with some other extension. Please see #429 and #360; try disabling other extensions until SDDP starts to work, and let us know if/when you find the culprit.

OK sure...

For me it was https://github.com/bbc-mc/sdweb-merge-block-weighted-gui.
Would there be any way to request compatibility between these extensions? In the meantime, I suppose I could disable it when trying to run Dynamic Prompts.


Issue found during subject Area FVT testing

Running TermFVT against the in memory repo and the graph repo. It fails on the graph repo as is.
The have an entity with a classification that has an enum property set. In this case it is Criticality and the level is set to Catastrophic. The FVT then issues an classifyEntity, the in memory repo makes the change the returns the level in the classification as null, the graph repo does not make the change. What actually happens is that the attribute is not sent to the server in the rest call, so the server gets a classification with no properties. The in memory repo does not check for null and just copies null over, the graph repo checks for null and makes no changes to the existing value. I think the graph repo is correct in this case and am amending the in memory repo logic and the FVT test. I am thinking of making the change that a classifyEntity with a classification that has no instanceProperties, should result in a new classification if there previously was not one . In the case where there already is a classification with classification properties then we do not amend the existing classification. Assuming nothing else has changed by the classifyEntity (like effectivity dates) , I wonder should I update the Entity version. The current code updates the entity version.
InInMemoryOMRSMetadataCollection in classifyEntity before it updates the Entity: I had tried this change :
` EntityDetail existingEntity = repositoryStore.getEntity(entityGUID);
List existingclassifications = existingEntity.getClassifications();
    InstanceProperties existingClassificationInstanceProperties = null;
    for (Classification existingclassification :existingclassifications) {
        if (existingclassification.getName().equals(newClassification.getName())) {
            existingClassificationInstanceProperties = existingclassification.getProperties();
        }
    }
    // ensure that the existing classifications are not overwritten if the new classification does not have any
    if (newClassification.getProperties() == null) {
        newClassification.setProperties(existingClassificationInstanceProperties);
    }

    EntityDetail updatedEntity = repositoryHelper.addClassificationToEntity(repositoryName,
                                                                                entity,
                                                                                newClassification,
                                                                                methodName);`

This introduced a null pointer junit error in the build. in  DatabaseContextHandlerTest.

@davidradl - I'm not sure that would be an appropriate change anyway - would it not prevent someone from clearing the classification properties (deliberately)?


The debugger doesn't show values for bitfields

Take this code for example:
typedef struct s1 s1;
struct s1
{
    int a : 1;
    int b : 1;
};

int main(void)
{
    s1 s = {0};
    s.b = 1;

    return 0;
}

Inspecting 's' in the debugger shows the following:

What version are you using? This should have been fixed in v0.9.9. If you’re still experiencing it in that version, the first thing to try is rebuild your program. If it still happens after that, then this is a new bug.

What version are you using? This should have been fixed in v0.9.9. If you’re still experiencing it in that version, the first thing to try is rebuild your program. If it still happens after that, then this is a new bug.

Oof, yea I just tested it with latest, it works as expected!


Mergeable prep commits.

Extracted from #32150

Merged, but please promptly start a conversation about the weird detail of operators for the combined feed; we'll want to decide how to proceed before this goes to production.


Search for calendars owned by other principals

Caldav library should contain methods for looking up calendars owned by another principal, as well as methods for looking up all calendars on the server that one has read access to.
Although section 8.4 in the RFC only gives an example on how to look up calendars owned by a named principal, it may give hints on how to get a full list.  It must be possible, as some caldav clients comes up with such a list.
https://tools.ietf.org/html/rfc4791#section-8.4

Probably the solution is in the WebDAV protocol, not CalDAV.  Anyway, this will not fit into the upcoming v0.10-release.