Sync modified field using CDMS as source of truth

The old logic used two different values for local_obj.modified and cmds_obj.modifiedOn and checked that the delta between the two was small enough (CDMS_SYNC_DELTA  constant in settings) for the objs to be considered synchronized.
The new logic gets rid of the delta and updates the local_obj.modified with the value from cdms every time an operation happens.
In this way, we consider the two objs in sync if local_obj.modified == cdms_obj.modifiedOn.
Not as clean as I wanted, especially the update methods that I had to override but I believe it's a more robust solution to the previous one.

@danielquinn what do you think?

I agree that doing a diff on a timestamp to determine sync is undesirable.  Testing equivalency is a little sketchy too, but I think you're right that it's the lesser of two evils.
I noted your concern about using _update_with_modification() instead of just overriding _update(), but again, I think that you've picked the right option here.  No one likes unpredictability in an API, and you make sure to set NotImplementedError() in _update() so this can't be used wrongly.
Aside from my two stylistic notations, I have no additional criticism.


Put definition under tag

When displaying all terms in a tag, show the definition if available.

Now appears under tag. Maybe apply markdown?


[SelectionLine] NEW FEATURE - Render the line selectable dynamically

Description
It is now possible to initialize props isSelection for each line of the list, depending on line data.
It is also possible de declare a specific line of the as non selectionnable, depending on the line data.
Screenshots

Code sample
In line component mixin :
import {mixin as selectionLineMixin} from 'focus-components/list/selection/line';

const Line = React.createClass({
    mixins: [selectionLineMixin],
    definitionPath: 'movie',

    selectionnableInitializer(data) {
        return data.code !== 10055;
    },

    selectedInitializer(data) {
        return data.code === 10054;
    },

    renderLineContent(data) {
        const {code, title} = data;
        return (
            <div>
                {code} - {title}
            </div>
        );
    }
});

Issues
fixes #777

I'm using the selectionnableInitializer on a search result.
The first time, the checkbox isn't displayed for the items for which selectionnableInitializer returns false (which is the awaited behaviour), but when I change the sorting order of my results, the checkbox is displayed again on these items.
It seems that the second time, componentWillMount isn't called, but componentWillUpdate is called instead, so after I put the lines
        if(this.selectionnableInitializer) {
            this._isSelectionnable = this.selectionnableInitializer(data);
        }

in the componentWillUpdate method, it works.


Show what game(s) a sound is from

Would be nice if someone could test this, preferably with a lot of mountable games :)

Does a lot of cleanup
Potentially also fixes some kind of right-click functionality in the sound browser tree. (2nd to last commit)
Fixes #1220 (last commit)

If this is too slow with a lot of games, maybe it can be loaded dynamically when opening the "Games" node somehow...

The failing checks are due to glua

Now the remaining 26 warnings are unused variables/arguments

Don't put both refactoring of code style and bug fixes in one PR >:~O

I'd say it's fine to do the same in one PR, just not in one commit.

Ok i fixed what @bigdogmat found and rebased the whole thing onto latest master.
Btw, I used "continue", what's our policy on that?

Continue is the only good in the C syntax things that garry added. I don't see anything wrong with using it, but as you know you could get around it simply by encasing the contents of your loop with an if statement to get the same behavior.

I don't see anything wrong with using it

I agree, although that makes it non standard Lua syntax which goes against coding style.

There are cases where the resulting code isn't simple at all, but yeah, it's non-standard so we can't use it.

I don't think this is possible to do anymore. file.Exist works differently now

If you want the style fixes merged though, we can do that.

Closes: #1220


Moving from lodash lib dependency to its subset + adding tslint

@kubocob,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


fix typos to gatsby theme documentation

Fixing a few typos and sentence structure to make the documentation clearer for a native English speaker.
Please get in touch if you have any questions.

very nice :)


Crashed with error... Perhaps out of memory?

Not sure why but it errored out with the latest version.
2024-10-18 15:48:44,911 - ContentAutomation - INFO - Processing movie: 41244 (TMDB id)
2024-10-18 15:48:45,236 - ContentAutomation - INFO - Processing movie: 990140 (TMDB id)
2024-10-18 15:48:45,549 - ContentAutomation - INFO - Processing movie: 156022 (TMDB id)
2024-10-18 15:48:45,866 - ContentAutomation - INFO - Processing movie: 524434 (TMDB id)
2024-10-18 15:48:45,961 - ContentAutomation - INFO - Processing movie: 406759 (TMDB id)
2024-10-18 15:48:46,503 - ContentAutomation - INFO - Processing movie: 425909 (TMDB id)
[2024-10-18 15:48:46 +0800] [8] [CRITICAL] WORKER TIMEOUT (pid:9)
[2024-10-18 15:48:46 +0800] [9] [ERROR] Error handling request /run_now
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/gunicorn/workers/sync.py", line 134, in handle
    self.handle_request(listener, req, client, addr)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/gunicorn/workers/sync.py", line 177, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/usr/local/lib/python3.13/site-packages/flask/app.py", line 1498, in __call__
    return self.wsgi_app(environ, start_response)
           ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/flask/app.py", line 1473, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.13/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.13/site-packages/flask/app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/asgiref/sync.py", line 234, in __call__
    current_executor.run_until_future(loop_future)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/asgiref/current_thread_executor.py", line 77, in run_until_future
    work_item = self._work_queue.get()
  File "/usr/local/lib/python3.13/queue.py", line 202, in get
    self.not_empty.wait()
    ~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/threading.py", line 359, in wait
    waiter.acquire()
    ~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/gunicorn/workers/base.py", line 204, in handle_abort
    sys.exit(1)
    ~~~~~~~~^^^
SystemExit: 1
[2024-10-18 15:48:46 +0800] [9] [INFO] Worker exiting (pid: 9)
2024-10-18 15:48:46,826 - ContentAutomation - INFO - Processing movie: 361743 (TMDB id)
2024-10-18 15:48:46,921 - ContentAutomation - INFO - Processing movie: 414906 (TMDB id)
2024-10-18 15:48:47,244 - ContentAutomation - INFO - Processing movie: 624860 (TMDB id)
2024-10-18 15:48:47,563 - ContentAutomation - INFO - Processing movie: 634649 (TMDB id)
[2024-10-18 15:48:47 +0800] [8] [ERROR] Worker (pid:9) was sent SIGKILL! Perhaps out of memory?
[2024-10-18 15:48:47 +0800] [54] [INFO] Booting worker with pid: 54

Hello! It looks like the issue may be related to a worker timeout or memory limitations. Could you provide some additional details to help me troubleshoot?

What environment are you running the Docker container on (e.g., hardware specifications, available memory, etc.)?
How many total TV shows and movies do you currently requested in Jellyseer?

With this information, I can better assist you in resolving the issue. Thanks!

Hi @trashken, could you please build and test the following Docker tag?
ciuse99/suggestarr:test
Let me know if the issue is resolved or if you encounter any problems.
Thanks in advance!

Hi @trashken, could you please build and test the following Docker tag?
ciuse99/suggestarr:test  Let me know if the issue is resolved or if you encounter any problems.
Thanks in advance!

docker: Error response from daemon: manifest for ciuse99/suggestarr:test not found: manifest unknown: manifest unknown.

Hello! It looks like the issue may be related to a worker timeout or memory limitations. Could you provide some additional details to help me troubleshoot?

What environment are you running the Docker container on (e.g., hardware specifications, available memory, etc.)?
How many total TV shows and movies do you currently requested in Jellyseer?

With this information, I can better assist you in resolving the issue. Thanks!

Running under Unraid 6.12.10. 16Gb RAM.
289 TV Shows

Hello! It looks like the issue may be related to a worker timeout or memory limitations. Could you provide some additional details to help me troubleshoot?

What environment are you running the Docker container on (e.g., hardware specifications, available memory, etc.)?

How many total TV shows and movies do you currently requested in Jellyseer?

With this information, I can better assist you in resolving the issue. Thanks!

Running under Unraid 6.12.10. 16Gb RAM.

289 TV Shows

Hi! Should be solved in the latest tag.


Changes active state color to make it different from hover

Since the hover and the active state are the same, then toggles are impossible to spot when the mouse is over the btn.
this PR makes .active state a bit darker than hover.

Fixes #23897
Fixes #23710

I'm assuming this only deals with hover, and does not touch on focus/focus+active styling?

@patrickhlauke this PR makes active/focus a bit darker and leaves hover as it is now.


EdgeOptions addArguments is not supported

[Enter feedback here]
The method addArguments(String) is undefined for the type EdgeOptions

Environment

property
value
data

OS
Windows 10 pro

java
java version "<IP_ADDRESS>" 2022-08-18 LTS Java(TM) SE Runtime Environment (build <IP_ADDRESS>+1-LTS-2) Java HotSpot(TM) 64-Bit Server VM (build <IP_ADDRESS>+1-LTS-2, mixed mode, sharing) openjdk1.7 i believe

testng
7.7.1

selenium-java
3.14.0

vscode version
1.76.0 92da9481c0904c6adfe372c12da3b7748d74bdcb x64

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: e37d6441-bb7b-8842-314d-1fe929bd9aa3
Version Independent ID: b3833510-5a57-cb23-51d0-f8df10ca9e71
Content: Use WebDriver to automate Microsoft Edge - Microsoft Edge Development
Content Source: microsoft-edge/webdriver-chromium/index.md
Product: microsoft-edge
Technology: devtools
GitHub Login: @MSEdgeTeam
Microsoft Alias: msedgedevrel

The documentation you reported this feedback on mentions addArgument (singular), not addArguments (plural).
Could it just be a typo in your code? Please let me know if this fixes it for you.

close it I think I fugured it out althogu


chore: migrated wallet test peg_outs_must_wait_for_available_utxos

When code runs with coverage on it starts creating infinite epochs. :confused:

Not sure that's your test's fault @douglaz, I've seen that kind of flakiness before :(

Can you rebase? Apparently clippy on master is a bit more nitpicky and fails in the merge queue.


Handle refreshing a shared credentials file

This adds support for credential refreshing to SharedCredentialProvider.
If a new configuration key aws_expiration is present, RefreshableCredentials will be returned. Otherwise, standard Credentials will be returned. Credentials will be refreshed by re-parsing the file.
The key aws_expiration was chosen because it's already in use by https://github.com/zalando-incubator/kube-aws-iam-controller

Codecov Report

Merging #1853 into develop will increase coverage by 0.01%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop    #1853      +/-   ##
===========================================
+ Coverage    92.54%   92.55%   +0.01%
===========================================
  Files           53       53
  Lines         9958     9973      +15
===========================================
+ Hits          9216     9231      +15
  Misses         742      742

Impacted Files
Coverage Δ

botocore/credentials.py
98.87% <100%> (+0.01%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5afabbd...dfbcb37. Read the comment docs.

Thank you for creating this PR and for your patience. I brought this up for discussion with the team, and the consensus was that this should be tracked as a feature request issue in our cross-SDK repository: https://github.com/aws/aws-sdk. The reason is because changes like this which involve credentials should be considered across SDKs in order to strive for consistency. Please consider creating an issue in that repository if this is still something you are interested in seeing.


Add top level NodeSelector and wire into services

I'm closing the PR since I now see that we have merged an equivalent PR that also has per-service NodeSelector: https://github.com/openstack-k8s-operators/cinder-operator/pull/95


Problem with a cache and the testEnvironment variable.

🐛 Bug Report

When I execute tests I got:
 FAIL  src/test/javascript/app/actions.spec.js
  ● Test suite failed to run

    ENOENT: no such file or directory, mkdir '/tmp/jest_rs/jest-transform-cache-951c940de58b523ede4c7a74cd57e1d8-afca7609b727bae58e6d966e4f38887d/2e'

      at createDirectory (node_modules/jest-runtime/node_modules/jest-util/build/createDirectory.js:68:10)

No matter what I do(clear cache, run with --no-cache) then the result is the same. But when I create this directory by
 mkdir -p /tmp/jest_rs/jest-transform-cache-951c940de58b523ede4c7a74cd57e1d8-afca7609b727bae58e6d966e4f38887d/2e

then an exception is different:
 FAIL  src/test/javascript/app/modeler/actions.spec.js
  ● Test suite failed to run

    The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/en/configuration#testenvironment-string.
    Consider using the "jsdom" test environment.

    ReferenceError: window is not defined

      1 | import React from 'react';
      2 |
    > 3 | window.React = React;

This is from mt setupTests.js that I have in the setupFilesAfterEnv.
testEnvironment is set to jsdom. When I check that by --show-config I have:
"testEnvironment": "/node_modules/jest-environment-jsdom/build/index.js",

envinfo

  System:
    OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 10.10.0 - /usr/bin/node
    Yarn: 1.10.1 - ~/projects/bpm-micro/gateway/node_modules/.bin/yarn
    npm: 5.1.0 - ~/projects/bpm-micro/gateway/node_modules/.bin/npm
  npmPackages:
    jest: ^26.0.1 => 26.1.0

@mkawczynski07
Marek, try to update node. I updated it to 6.14.6 from 6.4.1 and it looks it was the case.

Same problem but on Windows 10. I have node version 10.10.0

@pawel-sz Didn't help.

same here on mac, downgrading jest-util to ^25.0.0 works for me

same for me too, still having an issue26.0.4

Downgrading jest to ^25.0.0 fixed the issue for me too :) Node 10.9.0, Ubuntu 20.04

This needs a reproducion.
https://stackoverflow.com/help/minimal-reproducible-example

Node Version <10.12 doesn’t support recursive options from fs.mkdir and fs.mkdirSync.
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#2018-10-10-version-10120-current-targos

Jest doesn't support node <10.14.2. https://github.com/facebook/jest/blob/2f6931e91d5ab126de70caf150c68709752e7f6c/packages/jest/package.json#L14

Like @SimenB wrote: "Jest 26 doesn't support node <10.14.2". I had 10.10.0. Update to 10.14.2 solved the issue.

Like @SimenB wrote: "Jest 26 doesn't support node <10.14.2". I had 10.10.0. Update to 10.14.2 solved the issue.


Customize cardinal point labels

I was wondering if this is possible. The library offers an option to customize the labels for moon or sun for example, but what about the cardinal points? I want to put the labels in my local language. In fact, the only one that varies is the W label.
N: N(orte)
S: S(ur)
E: E(ste)
W: O(este)

Currently, there is no built-in way to override the cardinal direction labels on zenith plots, but you bring up a great point! I want Starplot to allow overriding all labels, so I'll put this on the roadmap for the next version.
Thanks for your feedback!

This is now supported in the latest version (v0.11.0) -- see the docs on the horizon function for details

Amazing!


Support an extensible avoid_unsafe_apis lint in analyzer

See http://go/flutter-lints-dd for overall context. Also see https://github.com/dart-lang/sdk/pull/40429 for a separate attempt to add a generic Unsafe annotation which is how this proposal sprung to life.
tl;dr
We would like to define a new lint avoid_unsafe_apis where the definition of unsafe APIs is domain specific and can be passed in as input to the analyzer.
Proposal
avoid_unsafe_apis lint would read some configuration that would contain a list of symbols and the rationale for considering them banned. We first define a class to represent Unsafe APIs and the rationale.
class Unsafe {
  // The fully qualified name of the symbol
  final String symbol;
  // The reason why this symbol is considered unsafe
  final String reason;

  const Unsafe(this.symbol, this.reason);
}

Then the application can define a Dart file that contains the list of APIs it considers unsafe:
import ‘dart:analyzer’ show Unsafe;

const unsafeFlutterApis = [
  Unsafe('package:mypackage/MyClass#myMethod', 'Unsafe method. Consider using other method'),
  Unsafe('package:mypackage/MyClass#someValue', 'Unsafe value. Consider using other value.'),
]

In analysis_options.yaml file, annotate the avoid_unsafe_apis lint with a list of files that contain these banned apis:

avoid_unsafe_apis

./unsafe_apis.dart
some/other/path/unsafe_apis.dart

Analyzer reads this configuration and finds the union of all unsafe APIs listed in these files. The lint itself simply walks through various expression types and flags if the statement matches to any of the unsafe symbols.
Currently the following constructs can be marked as unsafe: Top-level variables, functions, getters, setters, constructors, static and instance members of classes, enums, and enum constants. We do not want to be able to mark entire Classes or Libraries as unsafe.
FAQ
Why Dart instead of json or yaml?
We can eventually make it easier and less error prone to refer to Dart symbols in a Dart file. You can imagine an evolution of Unsafe class as follows:
class Unsafe {
  final Symbol symbol;
  final String reason;
  final bool ignorable;

  const Unsafe(this.symbol, this.reason, {this.ignorable = true});
}

and the corresponding unsafe_apis.dart file:
import ‘dart:analyzer’ show Unsafe;
import ‘package:my_package/my_package.dart’;

const unsafeFlutterApis = [
  Unsafe(#MyClass.myMethod, ‘Unsafe method. Consider using other method’, ignorable: false),
  Unsafe(#MyClass.someValue, ‘Unsafe value. Consider using other value.’),
]

This way, we can ensure the correctness of the symbols without having to write another set of tests to map string representations to actual symbols.
I would love it if we could get to this in v1.
Why support multiple files?
For very large projects, a single file might get too unwieldy. Developers would prefer to split these perhaps by package. Internally, we would like each unsafe_apis.dart to live in its own package directory rather than in the application. Analyzer will be provided with the full path of these files.
Why not mark Classes and Libraries as unsafe?
Large containers of code are hard to mark as unsafe. As they get larger (class => library), it takes a lot of discipline to stick to the encapsulation. For instance, a File object might offer write method which can be considered unsafe but also absolutePath getter which might not be. If someone argues that File itself is unsafe, all of a sudden absolutePath needs to find a new place to be used safely. We would want to avoid creation of classes like UnsafeFile and SafeFile and instead rely on library maintainers marking the smallest unit of compilation that deserves the unsafe annotation.
See https://github.com/dart-lang/sdk/pull/40429 for further discussion.

@davidmorgan @pq @bwilkerson FYI

I generally like this proposal, but I do have a few comments / suggestions.
We should consider making this a hint (enabled by default) rather than a lint (disabled by default). The reason I say that is because the hint wouldn't do anything unless the user has also specified a list of files containing descriptions of unsafe APIs, so providing that list is already a way of opting in, and it seems better to not require the user to opt in multiple times. Not a big issue internally because we'll have a small number of people that control the analysis options files, but it would improve the usability externally.
As for the list of files, relative file paths would work fine internally because everyone has exactly the same layout on disk, but externally that isn't the case. I'd like to propose that we use URIs. This would make this feature easier to use externally and would be consistent with the way the include directive works. We might even want to consider publishing our internal list(s) of unsafe APIs externally as another part of the pedantic package.
If we do use a hint, then we'll need a different place to add the list of unsafe APIs. I'd like to propose that we use something like the following:
analysis:
  security:
    unsafe_apis:
      - package:thisPackage/unsafe_apis.dart
      - package:some.other.package/unsafe_apis.dart

Of course, relative paths would still work as a valid URI, just like in import statements, but this provides more flexability. I added the extra security key so that we could provide additional security related information in the future if we discover a need for it.
The class Unsafe should not be defined in the analyzer package. I didn't think of this implication in our earlier conversations, but we don't want every package that uses this feature to have a dependency on the analyzer package; it's a very big package that pulls in lots of other dependencies. I think we should put this class in the meta package.
Using symbols for the APIs that are unsafe is definitely better than using strings, but it might be better to use an arbitrary expression. The only compile-time checking done for symbols is to ensure that they are syntactically valid. In particular, there's no association made between #Foo.bar and any member of any class. If there are multiple classes named Foo that define a member named bar, then analyzer wouldn't have any way to know which one was meant. If we were to use an arbitrary expression instead, then analysis would confirm that the element had been imported and that there is no ambiguity about which element is being referenced. It would also mean that renaming operations would be able to find the reference to the element without any special support. It would look something like:
import ‘package:my_package/my_package.dart’;

var unsafeFlutterApis = [
  Unsafe(MyClass.myMethod, ‘Unsafe method. Consider using other method’, ignorable: false), // method
  Unsafe(MyClass.someValue, ‘Unsafe value. Consider using other value.’), // getter
  Unsafe(MyClass.someValue = throw 0, ‘Setting this is not safe.’), // setter
]

This is safe because the code will never be executed. The one case I'm not thrilled with is setters, but I think we can live with it.
Note that I also changed the example from const to var. This file won't be loaded into any runtime, so there's no advantage to making the instances constant (because the instances won't actually ever exist). For the same reason, there's no real reason to define fields. The class probably wants to look like the following:
class Unsafe {
  Unsafe(Object reference, String reason, {bool ignorable = true});
}

@matanlurey Curious as to whether this would (or could be made to) address your needs. I'd prefer to have a single solution if possible.

I don't have time to go into a lot of detail with OOO coming up, but in summary, this might work for our needs as written, but I am not confident:

We would need to annotate APIs in the SDK itself (dart:html), would that work?

We need to be able to control separate whitelists, so having a single unsafe_api error code would not be fine grained enough in order to grandfather existing uses in or control policy exceptions.

The best person to discuss this with would be @srawlins who is currently OOO.

We would need to annotate APIs in the SDK itself (dart:html), would that work?

I believe that this would work for APIs in the SDK by doing something like the following:
import 'dart:html';

var unsafeApis = [
  Unsafe(Element.appendHtml, "Don't append raw HTML."),
];

The analyzer would then flag any use of Element.appendHtml.

We need to be able to control separate whitelists, so having a single unsafe_api error code would not be fine grained enough in order to grandfather existing uses in or control policy exceptions.

That's a bit trickier, but I can think of a couple of possibilities. I'll talk to Sam when he's back to work out the details.

Thoughtful write-up!
We've talked about opening lints up to configuration (proposed for example in https://github.com/dart-lang/linter/issues/883).  If we supported that, could this be simplified to look something like this?
linter:
  rules:
    unsafe_apis:
      api:
        - element: 'package:mypackage/MyClass#myMethod'
        - description: 'Unsafe method. Consider using other method'
      api:
        - element: 'package:mypackage/MyClass#myVar'
        - description: 'Setting {0} is not safe.'

or, taking it further:
linter:
  rules:
    unsafe_apis:
        element:
             - kind: method_invocation
             - name:  'package:mypackage/MyClass#myMethod'
             - description: 'Invoking method {0} is unsafe. Use OtherClass#foo instead.'

If we supported that, could this be simplified to look something like this?

Yes. One downside is that the information is now buried in strings, so refactorings, "find references", etc. won't work with them (at least not without additional work).
Another is that all of these unsafe APIs would need to be specified in a single file, and there is a goal of allowing them to be split up. I don't know how important that goal will be in practice.

Re: @matanlurey's comment on whitelisting... I was imagining all grandfathered usage would need to be annotated in code with an //ignore comment.  There are certain use cases which does not fit this lint. For instance, we cannot use it to ban all of dart:io from Flutter apps (see "Why not ban Class or Library" in the FAQ). Such a lint would need to be defined as standalone and likely be optional. Given that this lint is meant to represent a security concern for a specific API, I would not want to protect entire packages from it to avoid further propagation of the API. What do you think?
+1 to all of @bwilkerson's comments. I would very much likely avoid a stringified representation of these APIs for the reasons Brian mentions. I agree that the multiple configuration files use case is weak. It primarily existed because if we do have real symbols/references in this file, a single unsafe_apis.dart file would end up having 100s of dependencies in a large centralized repository like google3. However, this file can be generated in google3 from smaller unsafe_apis.dart files breaking the dependency chain.

There is a potentially interesting external case for allowing multiple URLs to be specified: if individual package providers wanted to provide a file specific to the APIs exposed by their package. I don't know how likely that is to happen, but I'd want any design to not preclude future support for multiple URLs (assuming that we support a single URL initially).

I don't think generating smaller files in google3 is sufficient to solve the dependency problem; I think we'll need to at least allow (not require) stringified config.
Otherwise, we force you to take a dependency on a library in order to ensure you don't use it. This is certain to bite us at some point. (Your code wouldn't depend on the library, but your build would, in order to run analysis; that means any change to the library you're not supposed to use will force your build to rerun / trigger all your tests on the continuous build.)

We force you to take a dependency on a library in order to ensure you don't use it.

This lint should only be used for cases where you are banning a subset of APIs exposed by a library that is already being used by the app. In google3, we would have a centralized unsafe_apis.dart only for dart core libraries. Every other API ban will happen within the library-specific unsafe_apis.dart which will be owned by the library maintainer. This file will only be considered if the app depends on the library.
This lint should not be used for cases where you are banning an entire library like dart:io or package:this_is_only_meant_for_server. The circumstances for such a wide ban is different enough (1) that a different mechanics is warranted (2).
1: See FAQ in the proposal.
2: Perhaps a separate optional lint? or a build dependency ban with whitelisting?

For declaring unsafeness in a library, I'd very much recommend using an annotation, not a normal declaration.
For:
import 'dart:html';

var unsafeApis = [
  Unsafe(Element.appendHtml, "Don't append raw HTML."),
];

I would write
@Unsafe.api(#Element.appendHtml, "Don't append raw HTML")
import 'dart:html';

and for
import ‘package:my_package/my_package.dart’;

var unsafeFlutterApis = [
  Unsafe(MyClass.myMethod, ‘Unsafe method. Consider using other method’, ignorable: false), // method
  Unsafe(MyClass.someValue, ‘Unsafe value. Consider using other value.’), // getter
  Unsafe(MyClass.someValue = throw 0, ‘Setting this is not safe.’), // setter
];

I would do
@Unsafe(#MyClass.myMethod, ‘Unsafe method. Consider using other method’, ignorable: false), // method
@Unsafe(#MyClass.someValue, ‘Unsafe value. Consider using other value.’), // getter
@Unsafe(#MyClass.someValue=, ‘Setting this is not safe.’), // setter
library something.something;

(I really want to allow a library; declaration with no name so you have an easy place to hang annotations).
In both cases you cannot refer to instance methods like MyClass.myMethod. That's a compile-time error because the method is not static. You cannot refer to getters or setters like that, the argument to an annotation is evaluated as a constant expression, it's not just untouched syntax.
(I'd also love to have ##MyClass.myMethod which is a symbol which really does refer to the instance method, and where it become a compile-time error if the thing isn't there, that would allow refactoring to work).

For declaring unsafeness in a library, I'd very much recommend using an annotation, not a normal declaration.
The normal declaration introduces a name that can be accessed by arbitrary code and retained at run-time, which seems unnecessary for something that is only intended for the analyzer.

True. But I think the danger that arbitrary code would attempt to access these objects is fairly low. Still, I suppose it might be considered a security hole to have code that could be used at runtime to determine which APIs are not safe to use. We could get around the latter by making the top-level variable final, or even by putting the constructor invocations in a private top-level function.

I also notice that the declarations are not constant, and neither are the instances of Unsafe, so the analyzer would need to do extra work to figure out what the value is.

Not true. The analyzer wouldn't need to evaluate anything in order to get the information it needs. All of the information is available through static analysis without any extra work. Using annotations wouldn't be any better from an implementation point of view.

In both cases you cannot refer to instance methods like MyClass.myMethod. That's a compile-time error because the method is not static.

You are, of course, right. I missed that. In which case I suppose we have no choice by to use symbols.

You cannot refer to getters or setters like that, the argument to an annotation is evaluated as a constant expression, it's not just untouched syntax.

True. Not that it matters because that syntax won't work for instance members, but I was suggesting using it as an argument to a non-const constructor, in which case it wouldn't be a constant expression.

(I'd also love to have ##MyClass.myMethod which is a symbol which really does refer to the instance method, and where it become a compile-time error if the thing isn't there, that would allow refactoring to work).

We don't necessarily need new syntax for that purpose. We could define a lint that would catch the use of symbols that do not correspond to existing declarations. We could also special case these "unsafe api" files to require that all symbols reference existing declarations and even support them in our rename refactoring.

My main worry about using program-level declarations for metadata is not security, just style. It is metadata, so it should be represented as metadata, which in Dart means annotations. At least unless there is a very compelling reason to do something else, which there does not seem to be here.
It's cool that the analyzer can handle non-constant expressions without extra effort, but if any other source-tool needs access to the information, it would still be better if it was stored as constant annotations like other metadata.
It does make it constant expressions, which comes with some restrictions, but probably not something which is insurmountable.
As for ##source.reference.symbols, it's definitely not needed, but it is something I'd want for other reasons, if nothing else then having compile-time errors when my symbol stops referring to something without having to use the analyzer. (But then, I'd probably want ##ClassName.methodName to evaluate to the same symbol as #methodName, so it won't be useful as a symbolic path).

Thanks for pushing this forward.
While we discuss the proper way to do this, I will introduce a google3-only lint that uses string representation to ban a set of APIs from all Flutter apps. This will give us the option to move quickly and assess how practical is it to define these at library level. It will also allow us to ban these APIs sooner than later as several security reviews are flagging these as critical fixes. We would like to avoid apps being blocked while we wait for the long-term implementation of the avoid_unsafe_apis lint.
The only request I have from you is an incremental plan as I believe the temporary solution I am describing above is error-prone and not scalable. Ideally, we should have support for this by mid-Q2. Do you think that's reasonable?

Of whom are you asking that question?

Given the changes required in analyzer, I am not the right person to work on this as I am not familiar with the internals of the analyzer and unfortunately, I don't have the bandwidth to become familiar in the foreseeable future. I am happy to guide the effort from the requirements perspective.
I was hoping @davidmorgan or your team can pick up the implementation, Brian. Let me know if that is unreasonable so we can figure out a different solution.

@devoncarew @stereotype441 For resourcing discussions.


run dev失败

Debugger listening on ws://<IP_ADDRESS>:9229/d0245b19-cc54-4567-aa3b-3d5f9941428f
For help, see: https://nodejs.org/en/docs/inspector
(node:30475) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use node --trace-warnings ... to show where the warning was created)
SyntaxError: Unexpected token '??='
请问这如何解？？？

检查一下是否是node版本问题？ 支持node版本> 16

怎么都弄不好 我是 node 18

<EMAIL_ADDRESS>dev
node --loader ts-node/esm --inspect ./src/index.ts

Debugger listening on ws://<IP_ADDRESS>:9229/93ce9719-0809-4fb0-a06f-516e50fbf82f
For help, see: https://nodejs.org/en/docs/inspector
(node:35501) ExperimentalWarning: Custom ESM Loaders is an experimental feature. This feature could change at any time
(Use node --trace-warnings ... to show where the warning was created)
01:40:08 ERR PuppetWeChatBridge start() exception: Error: Failed to launch the browser process!
/home/ubuntu/ChatGPT-wechat-bot/node_modules/puppeteer/.local-chromium/linux-982053/chrome-linux/chrome: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
01:40:08 ERR PuppetWeChat initBridge() exception: Failed to launch the browser process!
/home/ubuntu/ChatGPT-wechat-bot/node_modules/puppeteer/.local-chromium/linux-982053/chrome-linux/chrome: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
01:40:08 ERR PuppetWeChat initBridge() this.bridge.stop() rejection: Error: no page
GError: Failed to launch the browser process!
/home/ubuntu/ChatGPT-wechat-bot/node_modules/puppeteer/.local-chromium/linux-982053/chrome-linux/chrome: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
at onClose (/home/ubuntu/ChatGPT-wechat-bot/node_modules/puppeteer/src/node/BrowserRunner.ts:268:9)
at Interface.<anonymous> (/home/ubuntu/ChatGPT-wechat-bot/node_modules/puppeteer/src/node/BrowserRunner.ts:254:50)
at Interface.emit (node:events:525:35)
at Interface.emit (node:domain:489:12)
at Interface.close (node:internal/readline/interface:536:10)
at Socket.onend (node:internal/readline/interface:262:10)
at Socket.emit (node:events:525:35)
at Socket.emit (node:domain:489:12)
at endReadableNT (node:internal/streams/readable:1359:12)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {

code: 2,
details: 'Error: Failed to launch the browser process!\n' +
'/home/ubuntu/ChatGPT-wechat-bot/node_modules/puppeteer/.local-chromium/linux-982053/chrome-linux/chrome: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory\n' +
'\n' +
'\n' +
'TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md\n' +
'\n' +
'    at onClose (/home/ubuntu/ChatGPT-wechat-bot/node_modules/puppeteer/src/node/BrowserRunner.ts:268:9)\n' +
'    at Interface. (/home/ubuntu/ChatGPT-wechat-bot/node_modules/puppeteer/src/node/BrowserRunner.ts:254:50)\n' +
'    at Interface.emit (node:events:525:35)\n' +
'    at Interface.emit (node:domain:489:12)\n' +
'    at Interface.close (node:internal/readline/interface:536:10)\n' +
'    at Socket.onend (node:internal/readline/interface:262:10)\n' +
'    at Socket.emit (node:events:525:35)\n' +
'    at Socket.emit (node:domain:489:12)\n' +
'    at endReadableNT (node:internal/streams/readable:1359:12)\n' +
'    at processTicksAndRejections (node:internal/process/task_queues:82:21)'
}

Debugger listening on ws://<IP_ADDRESS>:9229/d0245b19-cc54-4567-aa3b-3d5f9941428f For help, see: https://nodejs.org/en/docs/inspector (node:30475) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time (Use node --trace-warnings ... to show where the warning was created) SyntaxError: Unexpected token '??='
请问这如何解？？？
请问问题解决了吗？

报同样的错

文档有些：
Error: Failed to launch the browser process puppeteer refer to https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix
// ubuntu
sudo apt-get install chromium-browser
sudo apt-get install  ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils


integration-cli dockerCmd function doesn't return error

In integration-cli/docker_utils.go is a function used in many many places in the integration-cli tests called dockerCmd.
This functions signature is: func dockerCmd(t *testing.T, args ...string) (string, int, error)
However, error is never returned since it fails out the test with: t.Fatalf("%q failed with errors: %s, %v", strings.Join(args, " "), out, err) if there is an error.
Then any code calling this function is also doing a redundant check for this non-existent error.
The error from the return on dockerCmd should be removed and all calling code updated to reflect that.

I will try. #dips

@xiaohui you might want to check with @robertabbott. it looks like he's working on this (but he didn't "claim" the issue)

@thaJeztah, @xiaohui  I am working on it, but I can yield this issue since i didn't follow the protocol. Now i get the claiming system. Sorry

I'll leave it up to you both :smile:

@robertabbott first comer, first contribute, you could continue do it :-)

@xiaohui Thanks. I'll make sure to officially claim it next time.

Thanks both!


[10.x] Adds ability to retrieve timestamp as Carbon instance from ULID/UUID

What?
Extracts the timestamp from an UUID (v1, v2, v6, v7) or ULID into a Carbon instance.
use Illuminate\Support\Str;

// Dates from ULID
$date = Str::dateFromUid('01H06ZMA15EBJASEXHWJC1SY5F');

// Dates from UUID
$date = Str::dateFromUid('01880dfa-2825-72e4-acbb-b1e4981cf8af');

Returns null only when an UUID is malformed, or is not time-based.
Why?
It saves the step to detect an incoming UID, transform into an UUID/ULID, and then extracting the date, and then transform it into Carbon, all that inside a try-catch.
use Illuminate\Http\Request;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Date;
use Ramsey\Uuid\Uuid;use Symfony\Component\Uid\Ulid;

// Before
public function date(Request $request)
{
    $uid = $request->uid;

    if (Str::isUlid($uid)) {
        return Date::make(Ulid::fromString($uid)->getDateTime()));
    }

    try {
        return Date::make(Uuid::fromString($uid)->getDateTime());
    } catch (\Throwable) {
        return null;
    }
}

Would it be more appropriate to add this feature to Carbon?

Would it be more appropriate to add this feature to Carbon?
Carbon::createFromUid($uid)

Well, that's a good point I can't argue with.

#47046


Make the widgets binding reusable.

Previously the widgets layer only provided a concrete binding, which
makes it awkward to extend it compared to other bindings. This moves
widgets to the same style as the other layers.
In a subsequent patch I'll use this to make the tests layer saner.

Widgeteer is a terrible name. In a subsequent patch I'll rename the abstract binding mixins to SchedulerBinding, RendererBinding, ServicesBinding, WidgetsBinding.

LGTM


Move error status code to 502

What would you like to be added:
In various places, we've documented that having no endpoints available should variously be 404 or 503. @thockin suggested in the v0.5.0 API Review that we should consider 502 instead.
This issue covers agreeing that's the case, and then implementing that change.
Why this is needed:
Need to get breaking behavior changes done before we release v0.5.0.

@youngnick This needs to be done only in v1beta1 or in v1alpha2 also?
I caught 404 in v1beta1/httproute_types.go. Not sure, which other files to look at!

I would like to take up this one.
/assign

In both please, we will keep the v1alpha2 and v1beta1 in sync for this release.

We agreed that:

If there are no matching routes, a 404 should be generated
f there are matching routes but no/missing backends/endpoints to route to, a 500 (specifically) should be generated.

@mikemorris is going to write out a list of the different cases, and check we haven't missed anything.

/assign


Multiple Errors During Setup in Colab

While running the setup in Google colab, the following error appears:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tokenizers 0.15.2 requires huggingface_hub<1.0,>=0.16.4, but you have huggingface-hub 0.14.1 which is incompatible.
transformers 4.38.2 requires huggingface-hub<1.0,>=0.19.3, but you have huggingface-hub 0.14.1 which is incompatible.
Setup continues, but later produces another error:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchaudio 2.2.1+cu121 requires torch==2.2.1, but you have torch 2.0.1 which is incompatible.
torchtext 0.17.1 requires torch==2.2.1, but you have torch 2.0.1 which is incompatible.
torchvision 0.17.1+cu121 requires torch==2.2.1, but you have torch 2.0.1 which is incompatible.
…
WARNING: The following packages were previously imported in this runtime:
  [pydevd_plugins]
You must restart the runtime in order to use newly installed versions.
This is accompanied by a pop-up window that says,
Restart session
WARNING: The following packages were previously imported in this runtime:
  [pydevd_plugins]
You must restart the runtime in order to use newly installed versions.
Restarting will lose all runtime state, including local variables.
Whether the session is restarted or not, the setup continues until local and public URLs are generated. The gradio instance works, but once the "Train Model" button is pushed a third error occurs:
Traceback (most recent call last):
  File "/usr/local/bin/accelerate", line 5, in <module>
    from accelerate.commands.accelerate_cli import main
  File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py", line 19, in <module>
    from accelerate.commands.estimate import estimate_command_parser
  File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/estimate.py", line 34, in <module>
    import timm
  File "/usr/local/lib/python3.10/dist-packages/timm/__init__.py", line 2, in <module>
    from .models import create_model, list_models, is_model, list_modules, model_entrypoint, \
  File "/usr/local/lib/python3.10/dist-packages/timm/models/__init__.py", line 1, in <module>
    from .beit import *
  File "/usr/local/lib/python3.10/dist-packages/timm/models/beit.py", line 49, in <module>
    from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  File "/usr/local/lib/python3.10/dist-packages/timm/data/__init__.py", line 5, in <module>
    from .dataset import ImageDataset, IterableImageDataset, AugMixDataset
  File "/usr/local/lib/python3.10/dist-packages/timm/data/dataset.py", line 12, in <module>
    from .parsers import create_parser
  File "/usr/local/lib/python3.10/dist-packages/timm/data/parsers/__init__.py", line 1, in <module>
    from .parser_factory import create_parser
  File "/usr/local/lib/python3.10/dist-packages/timm/data/parsers/parser_factory.py", line 3, in <module>
    from .parser_image_folder import ParserImageFolder
  File "/usr/local/lib/python3.10/dist-packages/timm/data/parsers/parser_image_folder.py", line 11, in <module>
    from timm.utils.misc import natural_key
  File "/usr/local/lib/python3.10/dist-packages/timm/utils/__init__.py", line 2, in <module>
    from .checkpoint_saver import CheckpointSaver
  File "/usr/local/lib/python3.10/dist-packages/timm/utils/checkpoint_saver.py", line 15, in <module>
    from .model import unwrap_model, get_state_dict
  File "/usr/local/lib/python3.10/dist-packages/timm/utils/model.py", line 8, in <module>
    from torchvision.ops.misc import FrozenBatchNorm2d
  File "/usr/local/lib/python3.10/dist-packages/torchvision/__init__.py", line 6, in <module>
    from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils
  File "/usr/local/lib/python3.10/dist-packages/torchvision/_meta_registrations.py", line 4, in <module>
    import torch._custom_ops
ModuleNotFoundError: No module named 'torch._custom_ops'
This final error occurs whether the runtime is restarted or not.

I am experiencing the same problem.

Hi, I also have same issues.
@camenduru - is there any plan to keep this Google Colab updated?
Is there any other reliable Colab based on Kohya?

@sunnysharma12 @ninjatacoshell , you can use colab created by me --> https://github.com/monsterhunters/Lora-Training-GUI

@sunnysharma12 @ninjatacoshell @effegma-ai , you can use colab created by me --> https://github.com/monsterhunters/Lora-Training-GUI

Thanks @monsterhunters - it worked for me.


Support for diacritics

Can you add support for searching through all diacritics values:
Found example of values in another library:
var DIACRITICS = {
	'a': '[aÀÁÂÃÄÅàáâãäåĀāąĄ]',
	'c': '[cÇçćĆčČ]',
	'd': '[dđĐďĎ]',
	'e': '[eÈÉÊËèéêëěĚĒēęĘ]',
	'i': '[iÌÍÎÏìíîïĪī]',
	'l': '[lłŁ]',
	'n': '[nÑñňŇńŃ]',
	'o': '[oÒÓÔÕÕÖØòóôõöøŌō]',
	'r': '[rřŘ]',
	's': '[sŠšśŚ]',
	't': '[tťŤ]',
	'u': '[uÙÚÛÜùúûüůŮŪū]',
	'y': '[yŸÿýÝ]',
	'z': '[zŽžżŻźŹ]'
};

Hi @Alex-Sokolov,
thank you for the feature request.
Where did you find this object? If I would implement such a feature I need to confirm that it's complete and correct.

Sifter.js library (https://github.com/brianreavis/sifter.js/) which is part of selectize.js which I use in my project (use in search and filtering options)

I just had a look at sifter.js and found out that it only searches one-way. So for example if you search for "a" it will search also for "aÀÁÂÃÄÅàáâãäåĀāąĄ". However it will not work vica-versa, if you search for example for "Â" and would like to match "a".
Is this enough for your use case or do you think it's useful to allow also searching the other way? In my opinion it makes only sense if you allow both ways.

Basically, when you type correct phrase (with diacritics) current version will find and highlight them.
But I think will be more comfortable don't have a mind about, and fast-typing latin symbols. If search highlight results with diacritics - great

I will take over this issue and implement a solution that supports diacritics. I'll reply if there are some news.

@Alex-Sokolov I just released jmHighlight v2.3.0 including this feature. In this version you can type in e.g. justò and it will find also justo. It will also work the other way around if you search for justo it will find also justò.
I hope this implements your wish. If not please let me know.

https://github.com/brianreavis/sifter.js/commit/46a8b557266f20aaab49e601751a85563c845a01
Maybe update diacritics table too? :)

@Alex-Sokolov Thanks for this hint. I've asked the developer of sifter.js about the source of these new diacritics. I want to be sure that this is the complete list.
To improve the plugin I'd like to ask you a few questions regarding this issue:

What language are you targeting?
What's your use case of mark.js in this situation?
How do you integrate mark.js into sifter.js?

Russian, Ukranian
Get more simple search throw all variants (in tables, in list etc), even if they with diacritics
I'm not integrating. I'm using selectize.js, which use sifter.js as dependency. And investigate how they search working found that.

@Alex-Sokolov Thank you for your answer.

I'm not integrating. I'm using selectize.js, which use sifter.js as dependency. And investigate how they search working found that.

That means you are using both side by side but aren't integrating them together?

Selectize.js have sifter.js inside stndalone library. And when I use search in plugin - it use sifter functionality. It's all done by plugin

@Alex-Sokolov I've tried my best to contact the author below the commit you've posted. But he didn't answer yet. I can't just sync the list of diacritics before knowing that it's absolutely completely. I even asked on Open Data with a bounty of 50 points – no answer.
Seems like no one knows a reliable source of all diacritics.

Interested on diacritics for Spanish support.
Only need the vowels and the letter N, that would do it for Spanish
This would be more than enough.
var DIACRITICS = {
'a': '[aÀÁÂÃÄÅàáâãäåĀāąĄ]',
'e': '[eÈÉÊËèéêëěĚĒēęĘ]',
'i': '[iÌÍÎÏìíîïĪī]',
'n': '[nÑñňŇńŃ]',
'o': '[oÒÓÔÕÕÖØòóôõöøŌō]',
'u': '[uÙÚÛÜùúûüůŮŪū]',
};

@SiRaDuDe These "basic" diacritics you mentioned are already supported (reference). If something doesn't work for you with the diacritics option, please open a new issue.


[Bug]: is_termination_msg:lambda x:True is invalid in GPTAssistantAgent which is subclass of ConversableAgent

Describe the bug
when the proxy agent send message TERMINATE to instance of GPTAssistant with is_termination_msg:lambda x:True can't end conversation
Steps to reproduce
from autogen import AssistantAgent, UserProxyAgent, ConversableAgent, GroupChat, GroupChatManager, config_list_from_json
from autogen.agentchat.contrib.gpt_assistant_agent import GPTAssistantAgent
from constants import openai_api_key
from clients_setup import clients
from typing import List
from time import sleep
config_list = config_list_from_json(env_or_file="config.json")
def is_termination_msg(x):
# print(x)
if (x.get("content", "").rstrip().endswith("TERMINATE")):
print("yes")
return True
print(x)
print("no")
return True
assistant = GPTAssistantAgent(name="Assistant",    llm_config={
"seed": 42,  # seed for caching and reproducibility
"config_list": config_list,  # a list of OpenAI API configurations
"assistant_id": "asst_",
"temperature": 0,  # temperature for sampling
# "request_timeout": 120,  # timeout
}, is_termination_msg=lambda x: True
)
def multi_accounts_tweet(tweets: List[str]):
counter = 0
# for (client, tweet) in zip(clients, tweets):
#     client['account'].tweet(tweet)
#     counter += 1
#     if counter == 9:
#         break
return True
assistant.register_function(
function_map={"multi_accounts_tweet": multi_accounts_tweet})
user_proxy = UserProxyAgent(name="proxy_agent", default_auto_reply="TERMINATE",
human_input_mode="NEVER",
# is_termination_msg=is_termination_msg,
code_execution_config=False)
user_proxy.initiate_chat(
assistant, message="""please generate tweets,and press them by multi_accounts_tweet in one time""",)
Expected Behavior
No response
Screenshots and logs
No response
Additional Information
No response

@gagb @IANTHEREAL fyi

@yousonnet  would you like the Assistant to terminate when it receives a TERMINATE message?  I think this capability is not yet supported, the implementation of the gpt_assistant does not execute a termination path now.
What are your thoughts about it? @gagb

@yousonnet would you like the Assistant to terminate when it receives a TERMINATE message? I think this capability is not yet supported, the implementation of the gpt_assistant does not execute a termination path now.
What are your thoughts about it? @gagb

thx,i got it,i personally implemented a_check_is_termination_func for GPTAssistant on a fork,would u take this  kinda pr or not?the implementation doesn't take original conversable gpt method though.

@yousonnet would you like the Assistant to terminate when it receives a TERMINATE message? I think this capability is not yet supported, the implementation of the gpt_assistant does not execute a termination path now.
What are your thoughts about it? @gagb

thx,i got it,i personally implemented a_check_is_termination_func for GPTAssistant on a fork,would u take this kinda pr or not?the implementation doesn't take original ConversableAgent classmethod though.

just found out using parent class's methods works.
#1642 1642


Support other file systems

How to know what kind of file system plugged usb drive has?
How to add support for NTFS?

Hey,
thanks for your question.

You can see that in the MBR in the partition table: https://en.wikipedia.org/wiki/NTFS For NTFS the identifier would be 0x07.
Basically someone has to code that functionality, either by using existing code, from for instance the Linux kernel or maybe the JNode OS (https://github.com/jnode/jnode/tree/master/fs/src/fs/org/jnode/fs/ntfs), or implementing the whole thing himself.

Kind regards

So far I do not have any plan to implement other fs types, but any contribution is highly appreciated.


Add skhd extension

Description

Screencast

Checklist

[ ] I read the extension guidelines
[ ] I read the documentation about publishing
[ ] I ran npm run build and tested this distribution build in Raycast
[ ] I checked that files in the assets folder are used by the extension itself
[ ] I checked that assets used by the README are placed outside of the metadata folder

Thanks for your contribution 🔥
Can you fix the CI errors before we can do the initial review 🙂


Sharing screen for sensor without Gateway looks ugly

Message on top of this screen: Only sensors within range of your Ruuvi Gateway can be shared. If you don't have one yet, get it on ruuvi.com/gateway
Should this be changed?

Discussed with Lauri and decided to remove link to Gateway purchase.

Checked in app during other tests and this looks ok for now. Closing this issue.


Eyes with rounded corners

Is it possible for the QR code eyes (the three positioning squares) to have rounded corners?
If not currently possible, could this capability please be added as an option?

Currently, it is not possible. It's a graphical effect that isn't very common.
I will consider the proposal. It would be supported with the SVG graphics format. Would this fit your needs? Do you have any specific corner radius in mind? Would the inside of the outer rectangle also be rounded?
There are endless possibilities for graphically enhancing a QR code. Which ones should a library support? There are many graphics formats. Which ones should be supported? There is no standard cross-platform bitmap graphics library in .NET. Which one should be supported?
So far the library is rather restrictive. Instead, many examples are provided for various graphics libraries and frameworks. Different graphical effects and different graphics format can easily be added by code and libraries built on top of this library.

I'm looking for a package to replace what QR Code Monkey used to do. Their API went down, but they were generating some really nice looking QR codes. For our use case, this level of customizability would be a great benefit.


Can't make a group a sub-group after creation

When creating a group, you can select whether or not it's a sub-group of a parent group, etc. But post-creation, there's no way to make a group a sub-group of a different group. Not sure if that's something that's not possible due to the model or if it's just something absent in the edit group UI. It would definitely come in handy though - my particular case is groups were added to a folder that would have been better as a parent group so I could apply it to permissions rather than the individual groups.

This should be possible via "Move Multiple Groups" in the Dashboard, no?

Never mind, I see what the problem is – we used to have a nice draggable groups tree on the groups page, now that we have the table we've lost the ability to drag groups onto sub-groups. You can move them with the Move Multiple Groups page, but you should also be able to drag them around the tree in some way.


Unit testing organization / framework for JavaScript

There's currently no testing at all for JavaScript code.  We should really have a framework for unit testing, so that at least there's a well-defined way to add tests.  (It should be added to the test.sh script, as well.)
See #66

From some initial research, it looks like Jest is far an away the test framework of choice for JavaScript these days.  I have no reason to make an unusual choice, so let's go with Jest here.


Live reload web site when --watch enabled

Right now when you run sculpin generate --server --watch you have to manually refresh the page. It would be great if when using the watch flag sculpin could trigger your page to automatically reload for you.  There appears to already be a php version of livereload at https://github.com/RickySu/php-livereload.

My thoughts about this go a bit further then just using livereload. Instead of reloading the entire page I was thinking about just refreshing the content that was updated. Thus instead of reloading a page only reloading the content of the post that was updated. Now while writing that I realize that it would involve a lot of hooking into the content and making things rather complex. Because for a post you just updated the post content but for an theme/layout change you still have to reload the entire page. So I'm :+1: for using livereload to just reload the entire page if it changes.

The other thing to keep in mind. People don't use Sculpin for just blogging. For instance, the entire Midwest PHP web site is written using sculpin. :-) So its best to update the entire site.

You're absolutely right, after rethinking it all live reload the entire page is the way to go :+1:

When you get around to this, take a look at Browsersync. It offers a simpler, more flexible API and a more robust feature set, including an admin panel that provides some great in-browser debugging and a public, live-reloaded development URL. This lets me share a URL to coworkers to review while we code—super handy.
I first learned of the tool through its inclusion with Google Starter Kit and in the time since, the Yeoman generators I use have all switched over to it.

You may be able to write a reloader that is configurable, so if changes are detected than simply trigger a reload to some endpoint... however... you're adding in a lot of JS that's specific to your use case, and I'm not confident it can scale out. This might be an amazing development plugin but I don't see a clean way to use it for anything except very specific use cases.

Browsersync and LiveReload do the same thing. Browsersync just does it more helpfully, IMO.
Both are added to the development page via JavaScript and both reload the entire page when a change occurs to a certain file type.
Browsersync can also inject certain changes into the page so that CSS changes appear without a full refresh. This is better for testing things like menus or drop-downs that depend on state because you don't need to then do all the clicks again to get back to that certain UI state.
Currently I just run Browsersync in proxy mode in a separate Terminal tab and with no modifications to Sculpin. I guess I don't see what makes Browsersync any more (or even different) to implement than LiveReload.

Hey. I want to apologize about my attitude above. They're just tools; I did not need to be so rude about them.
Sorry, everyone.

@ebsen Sorry I meant to comment earlier, but double checked to see if there was something out of band that I missed... I don't think you need to apologise for anything, I certainly didn't take offence to anything you said.

+1 for this feature.

+1 for this feature.

+1 for this feature.

Jonathan Wage recently blogged about an approach he took to work around this issue (and also to make Sculpin work nicely with github pages in Project Mode using the docs subfolder approach) - this approach might be helpful in the near-term until someone can add it to sculpin itself:
https://jwage.com/posts/2018/03/25/sculpin-watch-rebuild/

@beryllium Maybe another one to move to https://github.com/sculpin/sculpin-blog-skeleton, where we could maybe use Browsersync or similar within Encore?

Actually, this is one that I'd like to leave in "sculpin proper", because I think portions of it could be accomplished in a way that benefits users of many sculpin configurations. I have a couple of branches I'm working on which have functionality like Live Editing and Live Reloading injected into the generate output when in --server mode. Leaving open for now.


GitHub App to notify OpenTofu registry when new releases are published.

Description of the feature you are looking for.
One of the things I appreciate about the Terraform registry that I’m unaware of in the OpenTofu registry is the GitHub app that receives a ping whenever I publish a new release, so that the Terraform registry updates nearly instantly.
Enabling such functionality could streamline the registry's ability to know when to update the versions and index for a provider/module. Push vs pull, as it were.

It is not.
The Terraform registry supports receiving webhook pings. This flips the approach from pull (registry periodically polls the endpoints to see if there are new releases) to push (the provider release notifies the registry).

I misspoke when I suggested it was a GitHub app. It's even simpler than that.

I was unaware that the system was designed this way intentionally.
Last week, I was noticing that the official AWS provider listing was a solid 1-2 weeks behind.
And presently, I'm experiencing an issues described in https://github.com/opentofu/registry-ui/issues/241.
I wonder if a Lambda function (or equivalent) could be written as something which can receive the webhook payload, then trigger the rebuilding of the index? Or just the index for that provider?

The current latency between the github released and the registry deployment is worst case 15 minutes.  It averages around 5 to 10.
If that is sufficient, I believe we can close this issue.


Images for README

when i started running the spring-boot:run, i get the below errors.

java.lang.IllegalStateException: Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path
after adding the slf4j-log4j exclusion, now i am getting the below error
java.lang.ClassNotFoundException: kafka.utils.ZkUtils

Not sure, if anybody had errors running this.
Thanks,
Shiva


Snapchat disable spellcheck

I propose a new option --disable_spellcheck_on_simulator to disabling spell checking and auto correcting on the iOS simulator. I'm currently working on a journal app for Evernote and I need to demonstrate text input. Unfortunately, the iOS spell checker makes every screen shot nasty. So I make this proposal to disabling the spellchecking while making screenshots with snapshot.

Hey @Chaosspeeder, thanks for the pull request. I'm not 100% sure if this should be included to snapshot by default, since it's a very specific use case. Instead I'd love to find a way to allow snapshot to have those kind of extensions, without having to bundle them all in the actual snapshot gem.

An extension system is a nice idea. For me, the problem is more common and
not so special. iOS spell checking uses unfortunately the system language
and not the app language. But either way, default or extension, would be a
good way to deal with it.
Thank you for your attention.
Best regards, Andre
Felix Krause<EMAIL_ADDRESS>schrieb am So., 10. Apr. 2016 um
12:21:

Hey @Chaosspeeder https://github.com/Chaosspeeder, thanks for the pull
request. I'm not 100% sure if this should be included to snapshot by
default, since it's a very specific use case. Instead I'd love to find a
way to allow snapshot to have those kind of extensions, without having to
bundle them all in the actual snapshot gem.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/fastlane/fastlane/pull/4146#issuecomment-207954108

Alright, thanks, good point. I added a comment, that needs to be addressed. Please squash the commits and let me know when it's ready :+1:

HI @KrauseFx ,
this is my newest attempt. I switched to enable logic for my switch and tried to be confirm with apple in naming and wording of the code.

@Chaosspeeder You can try to run your tests on my branch, https://github.com/fastlane/fastlane/pull/4035 which changes the device locale.

@KrauseFx Please do not merge/push this pull request. I will first trying out #4313 which is a more general  solution to the problem.

Thanks @Chaosspeeder, I'm closing this PR for now 👍


[MetaScheduler][Hexagon] Add MultiLevelTilingHexagon to schedule asyn…

…c pipelines that utilize DMA
This will create schedules that utilize async dma pipelines on hexagon. Currently this has some limitations due to the need to have dma lowering be contiguous memory copies. This PR is reliant on https://github.com/apache/tvm/pull/13720 and will not build until that is merged into main.
Best perf that I found was around 5 GFLOPS for a the conv2d in the test.
These changes were made in collaboration with @masahi
@adstraw @csullivan @Lunderberg

@tvm-bot rerun


PushKit crashes app on receipt of push

Hi all,
Existing push that works with flutter_voip_kit (has updated payload for callkeep):
curl -v -d '{"aps":{"alert":{"callkeep": {"title":"Incoming call","number":"01224900123"},"badge": {"badge": "0"}}}}' -H "apns-push-type: voip" -H "apns-expiration: 0" -H "apns-priority: 0" -H "apns-topic: blah.voip" --http2 --cert ./cert.pem https://api.sandbox.push.apple.com/3/device/xxx
app instantly dies.

Helps if I run it on Xcode for the NSLog statements etc.:
2020-11-11 15:50:23.524499+0000 Runner[605:90134] didReceiveIncomingPushWithPayload payload = PKPushTypeVoIP
2020-11-11 15:50:23.524817+0000 Runner[605:90134] [CallKeep][reportNewIncomingCall] uuidString = 1e38e7d8-5b99-4f1a-b089-bef60f4e8227
2020-11-11 15:50:23.525418+0000 Runner[605:90134] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CXHandle initWithType:value:]: parameter 'value' cannot be nil'
*** First throw call stack:
(0x180475114 0x193c9bcb4 0x1803782cc 0x19d51a048 0x102e8d750 0x102e8b098 0x1a73395e8 0x103143db8 0x1031455fc 0x103153a6c 0x1803f4c30 0x1803ef0e8 0x1803ee200 0x1964e9598 0x182cb4004 0x182cb95d8 0x10011fc20 0x1800cd598)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CXHandle initWithType:value:]: parameter 'value' cannot be nil'
terminating with uncaught exception of type NSException

Any ideas? Related to #29 ?

Looks like this is an issue with my JSON payload in the push as there needs to be a number key. See attached. We also need to override the hello string :)
2020-12-03 14:45:35.835860+0000 Runner[418:31825] didReceiveIncomingPushWithPayload payload = PKPushTypeVoIP
2020-12-03 14:45:35.836110+0000 Runner[418:31825] [CallKeep][reportNewIncomingCall] uuidString = a662a67f-aecf-4672-a59c-9677a5b4d818
2020-12-03 14:45:35.837082+0000 Runner[418:31825] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CXHandle initWithType:value:]: parameter 'value' cannot be nil'
*** First throw call stack:
(0x1a55499d4 0x1b8efab54 0x1a544c4c0 0x1c2b5a038 0x1038b1750 0x1038af098 0x1ccb515e8 0x103b17ce4 0x103b19528 0x103b27994 0x1a54c95d0 0x1a54c3a78 0x1a54c2b90 0x1bb7e5598 0x1a7dac638 0x1a7db1bb8 0x100b1e7c8 0x1a51a1588)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CXHandle initWithType:value:]: parameter 'value' cannot be nil'
terminating with uncaught exception of type NSException
(lldb) ```

<img width="1440" alt="Screenshot 2020-12-03 at 14 56 17" src="https://user-images.githubusercontent.com/159608/101046005-9cec1f80-3578-11eb-967b-48249706dc5e.png">

Helps if I read the payload of my initial issue report. Re-checking.

Solved. Correct PUSH payload for background notifications (and VoIP ones) is like so:
https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app
'{"aps":{"content-available":1},"callkeep":{"number":"01224900123","title":"SureVoIP Office"}}

Thank you for this 🙏


Drop support for Ruby 2.0, 2.1, and 2.2

These Ruby versions are no longer supported. Including these in our CI builds slows the feedback cycle and introduces a maintenance burden for which there is no clear user base.
These Rubies have not been supported for quite some time:

Ruby 2.0 since Februrary 24th, 2016
Ruby 2.1 since April 1st, 2017
Ruby 2.2 since June 20th, 2018

[1] https://www.ruby-lang.org/en/news/2016/02/24/support-plan-of-ruby-2-0-0-and-2-1/
[2] https://www.ruby-lang.org/en/news/2017/04/01/support-of-ruby-2-1-has-ended/
[3] https://www.ruby-lang.org/en/news/2018/06/20/support-of-ruby-2-2-has-ended/
Opening this for any comments. Is there a good reason to maintain support for these versions?
Once merged, this would likely prompt a bump to version 2.0.0, given the introduction of the Ruby version constraint to the gemspec.

Coverage remained the same at 94.825% when pulling 3625b6ca0b9679f580bf6320c7aa864d6aec01cd on require-ruby-2.3 into fb4d23fcd49dd8c12c39d84c6962c4d493e916f5 on dev.

Coverage remained the same at 94.825% when pulling 3625b6ca0b9679f580bf6320c7aa864d6aec01cd on require-ruby-2.3 into fb4d23fcd49dd8c12c39d84c6962c4d493e916f5 on dev.

shrug
For the base gem of the tool chain that I made for my QA activities, I support all the 'major' versions of Ruby. So, 1.8.7, 1.9.3, and the more recent 2.x ones. However, I do this mostly as an exercise in backwards compatibility and because the maintenance burden is pretty low due to the fact that it's all just (more or less) parsing text, so there isn't much to go wrong.
For a more complex gem like childprocess, though? Yeah, it's probably more susceptible to platform specific bugs or edge cases and therefore I can see that keeping its full functionality working for every kind of environment might end up being more effort than it is worth.
1.x, we hardly knew ye. Long live 2.x! Luckily, major versions are cheap with semantic versioning. ;)

Thanks for the response + review.
Was planning on leaving this up for a week just in case there were any other strong opinions from others. Happy to merge at this point.


user did missing

while waiting for the admin to make changes into Demiurge App if user refreshes the DSU Fabric App the user DID is not displayed anymore.


Document lastmod

I have two dates in my front matter:
+++
date = "2015-07-14T12:38:31-03:00"
updated = "2015-08-13T17:20:01-03:00"

In the template I can call  {{ .Date.Format "January 2, 2006" }} but {{ .Params.updated.Format "January 2, 2006" }} fails with can't evaluate field Format in type interface {}.  Or do I have to specify the type of updated somewhere?

It seems undocumented, but you should use lastmod instead of inventing your own.
We have a discussion board more suitable for questions.

Thanks. But isn't that a bug?  I have two dates exactly the same: one works and the other doesn't. If I wanted to display randomdate = "2003-08-13T17:20:01-03:00"

Yea... maybe. But that would be a bug in the TOML parser, see https://github.com/BurntSushi/toml
The thing is, for date and lastmod we know what to parse. For unknown cases, we take what the front matter parser gives us, in this case an `ìnterface{}´.

Sorry, I should ask this in the discussion board. But for the record, {{ .Lastmod.Format "January 2, 2006" }} does not print the latest modified date (I'm modifying the file now, and it prints yesterday's date).

and what is the value of
``
lastmod

in that file's front matter?

If not set, it inherits the `date`value. All this would be clear if documented. Hopefully. And as this is an open source project, pull requests are always welcome!

Thanks @bep . I understand now, date and lastmod are both casted to Date but you need to supply them. :+1: to add this to the docs!


Interdimensional network card always shows "Dimension 1"

Issue description:
I've setup an interdimensional network from my overworld base to The End. I've followed the correct steps, yet the network transmitter always shows "Dimension 1".
What happens:
The network transmitter always shows "Dimension 1", the remote receiver doesn't light up, the power consumption of my system doesn't increase.
What you expected to happen:
The remote receiver should light up, my system should consume 1k extra power for interdimensional use.
Steps to reproduce:

Place a network transmitter in the overworld, attached to an RS system.
Use a chunk-loader to ensure overworld RS system is loaded.
Place a network receiver in another dimension.
Use a chunk-loader to ensure receiver is loaded.
Right-click it with a new network card.
Place the network card and an interdimensional upgrade in the network transmitter.
...

Version (make sure you are on the latest version before reporting):

Minecraft: 1.10.2
Forge: 1.10.2-<IP_ADDRESS>2 (SkyFactory 3)
Refined Storage: 1.2.26

Does this issue occur on a server? yes

I'm not sure if you heard this, but 1.10.2 RS is unsupported.


Add profiling to the Windshaft client

Profiling has been removed and we need to bring it back to the new cdb.windshaft.Client class:

[ ] var loadingTime = cartodb.core.Profiler.metric('cartodb-js.layergroup.post.time').start() and loadingTime.end()
[ ] cartodb.core.Profiler.metric('cartodb-js.layergroup.post.error').inc()
[ ] var loadingTime = cartodb.core.Profiler.metric('cartodb-js.layergroup.get.time').start() and loadingTime.end()
[ ] cartodb.core.Profiler.metric('cartodb-js.layergroup.get.error').inc()

cc: @rochoa

There has been no activity on this issue for several months and that's why we are closing it (automatically). If you think this still needs to be addressed please reopen it. The good news is that we are now working on the next version of CARTO.js, stay tuned.


⚠ Bofrost.es has degraded performance

In 79e8157, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1514 ms

Resolved: Bofrost.es performance has improved in 453b6d8 after 18 minutes.


Feature/update swap

Implements updatable swaps. Additionally, the UI for de-listing a swap has been moved and re-packaged into the same UI component for updating a swap (/components/children/modals/ManageMarketplaceListing.vue).

Deployed on mainnet


Broken import/no-named-as-default rule

Error
TopPage/index.js
  6:8  error  Using exported name 'Section1' as identifier for default export  import/no-named-as-default

✖ 1 problem (1 error, 0 warnings)

TopPage/index.js
import Section1 from "./Section1";

TopPage/Section1.tsx
import React, {FC, Fragment, memo} from "react";

export const Section1Naked: FC = () => (
  <Fragment>
    …
  </Fragment>
);

const MemoSection1 = memo(Section1Naked);
/* eslint-disable-next-line immutable/no-mutation */
MemoSection1.displayName = "memo(Section1)";
export default MemoSection1;

One of React's conventions is to use a file per component and use the same name.
I export the name Section1Naked and a default from the file Section1.tsx, then try to import the default as Section1.
Since no name Section1 has been exported, no error should be raised.

.eslintrc
extends:
  - eslint-config-with-prettier
  - plugin:redux-saga/recommended
  - plugin:security/recommended

settings:
  react:
    version: 16.6.0
  import/resolver:
    babel-plugin-root-import: {}
    typescript: {} # use tsconfig.json
  import/parsers:
    typescript-eslint-parser: [ .ts, .tsx ]

parser: babel-eslint

plugins:
  - immutable
  - import
  - material-ui
  - redux-saga
  - security
  - typescript

parserOptions:
  ecmaVersion: 2018
  sourceType: "module"
  allowImportExportEverywhere: false
  codeFrame: false
  ecmaFeatures:
    legacyDecorators: true
    jsx: true

globals:
  firebase: true
  requirejs: true
  window: true
  _: true
  expect: true
  jest: true
  # enzyme vars (check jestsetup.js)
  shallow: true
  render: true
  mount: true

env:
  amd: true # for require.js (request() and define())
  browser: true
  commonjs: true
  es6: true
  mocha: true

rules:
  class-methods-use-this: 2
  flowtype/no-types-missing-file-annotation: 0
  immutable/no-mutation: 2
  import/named: 2
  import/order: error
  # TODO: https://github.com/entwicklerstube/babel-plugin-root-import/issues/119
  #- error
  #- newlines-between: always
  #  groups:
  #    - builtin
  #    - external
  #    - [internal, parent]
  #    - [sibling, index]
  import/no-extraneous-dependencies: 0
  import/no-unresolved: error
  jsx-a11y/anchor-is-valid:
  - error
  - components:
    - Link
    specialLink:
    - to
  no-restricted-syntax:
    - error
    - selector: 'ForInStatement'
      message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.'
    - selector: 'LabeledStatement'
      message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.'
    - selector: 'WithStatement'
      message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.'
  no-else-return:
    - "error"
    - allowElseIf: true
  no-unused-vars: "error"
  one-var:
    - error
    - var: "always"
  prefer-destructuring:
    - error
    - object: false
  react/jsx-filename-extension: 0
  react/forbid-foreign-prop-types: 2
  # We'll delete proptypes after finishing typescript integration
  react/prop-types: [2, {skipUndeclared: 1}]
  react/sort-prop-types: "error"
  sort-imports: 0  # https://github.com/eslint/eslint/issues/11019
  sort-keys: 0
  sort-vars: 2
  strict: 0
  typescript/class-name-casing: "error"
  typescript/no-unused-vars: "error"
  typescript/type-annotation-spacing: "error"

overrides:
  - files: ["*.ts", "*.tsx"]
    parser: "typescript-eslint-parser"
    parserOptions:
        jsx: true

# vi: ft=yaml

Versions used:

eslint 5.9.0
eslint-plugin-import 2.14.0

I can take this one.
See here for what's React.FC. ;)

@ljqx :+1: I used to type them SFC, but recently noticed the deprecated message, which is was I now type them FC as recommended
@ljharb 	reason for exporting the unwrapped component: unit test
import React from "react";
import {shallow} from "enzyme";
import {Section1Naked} from "../Section1";

describe("Section1 Component", () => {
  it("should render properly", () => {
    const wrapper = shallow(<Section1Naked />);
    expect(wrapper).toMatchSnapshot();
  });
});

If there is a proper & not slower way to run the test using the memo component, then you're right :D

Yes, you’d use .dive() (altho you may need to wait til the next enzyme release to test memo). There’s not really any value in testing the unwrapped component since you never use it unwrapped in production :-)

@Fandekasp, could you share a repo which can repro the error? I cannot repro it with the code and config.

Oh :( Our setup is a bit too complex, so I'm afraid it's going to take more time than I can afford to build a reproducible repo.
Since it looks like an edge-case and low-priority issue, feel free to discard it


Ensure HALEndpointService doesn't use stale responses

References

Fixes #2669

Description
#2669 happens because when you get redirected back from the Shibboleth server, the requests to log you in with the dspace rest api using the shib cookie tend to fail because one of those tends to be stale: it's fired just after one of these invalidateRootCache calls. When that happens the login process stops
Instructions for Reviewers
This PR fixes that the same way https://github.com/DSpace/dspace-angular/pull/1056 fixed it for DataServices, by not emitting while the response is still stale.
That change also makes it possible to replace the workaround in ServerCheckGuard with a call to invalidateRootCache()
This issue can happen at any time, it's not related to Shibboleth specifically. But since it's a timing issue, the easiest way I found to reliably reproduce it, is by logging in with Shibboleth
So:

Log in using Shibboleth
Verify that when you get redirected back to DSpace, you're reliably logged in every time, and there are no  undefined doesn't contain the link … errors in the console

Checklist

[x] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
[x] My PR passes ESLint validation using yarn lint
[x] My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
[x] My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
[x] My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
[x] If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
[x] If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
[x] If my PR fixes an issue ticket, I've linked them together.

@artlowel thanks for this! This seems to have made logging in more consistent.
I still see a 3-4 second page on the log in screen when logging in via a url like https://server/submit?collection=6d684812-6d29-4564-8b51-f5670957936b
I don't know if that's related or can be fixed so the user doesn't see that page before being sent onto the final place?

@misilot you're welcome!
The reason you're not immediately logged in when you get redirected back is because dspace still needs to call the login endpoint with the shibboleth cookie at that point. So you go to the Shibboleth server to get the credentials to log you in, but they still need to be used to do so by the time you get back to DSpace.
As far as I can tell, that's the way it has always worked in DSpace 7. It's conceivable that there's a way of doing this that would be less confusing for the user, but that isn't in the scope of this PR

I found an issue with this PR. Putting it in draft until it's fixed

@misilot maybe, if you were using dev mode. The PR worked fine in prod mode. The issue was that in dev mode the initial /api request and the initial invalidate happen right after one another, causing it to set to stale while it was still waiting for the server to respond to the initial request. We didn't have a way to deal with that case.
I've addressed this by also introducing a ResponsePendingStale state, which didn't exist before. If something was set to stale while the response was still pending it would end up in the state ErrorStale. If a request is set to stale while its response is still pending, the response will also be set to stale when it comes in. (The reason for that is that this might happen when you've pushed an update to the server, and even though you haven't received a response yet, since the request was made before you pushed the changes, we should treat the response as stale too)
This was also to root cause of https://github.com/DSpace/dspace-angular/issues/2577 btw. So this PR should now also address the comment I made on that issue. Reviewers can verify that this is the case by rolling back the changes to https://github.com/DSpace/dspace-angular/pull/2596 on this PR, following the steps on the issue and verifying that the issue is still fixed

We tested this PR with Shibboleth login in production mode with 7.6.1 that is unmodified otherwise and it seems to resolve the issue for us. We've not gotten the undefined doesn't contain the link … error since applying the patch and Shibboleth logins happen at roughly the same speed as before.

@misilot maybe, if you were using dev mode. The PR worked fine in prod mode. The issue was that in dev mode the initial /api request and the initial invalidate happened right after one another, causing it to be set to stale while it was still waiting for the server to respond to the initial request. We didn't have a way to deal with that case.

Yup, in dev mode the Login option disappears :(

@misilot Also with the latest version of this PR? https://github.com/DSpace/dspace-angular/pull/2670/commits/790e7171992f2cefc6999306703e52586204986b should have fixed that issue

@artlowel yup, I just reapplied the patch this morning to try the newer changes.

@misilot Do you see any undefined doesn't contain the link … errors in the browser console when this happens?

@misilot Do you see any undefined doesn't contain the link … errors in the browser console when this happens?

Nope, but now I am really confused, as the button is clearly there now. 🤔 Sorry for the noise, as it seems to be there. Just wish it would redirect back to localhost:4000 and not the server so it would consistently login to the dev environment  (probably need to put a ticket in for this)

@misilot I don't think that redirect can work on localhost. The shib server also has to be able to contact it, and since localhost is relative to the machine you run it on, it won't end up on your computer.
What you can do is when you login from localhost, and get redirected back to your production server and are logged in there, is to open the network tools of your browser, find the dsAuthInfo cookie, copy it, and then paste it on localhost. If you refresh afterwards, you should be logged in on localhost too. It's a bit cumbersome, but I don't know of another way

I applied this patch at The University of Minnesota Libraries, and we are no longer encountering problems when logging in via Shibboleth.

The same here as per my comment in https://github.com/DSpace/DSpace/issues/9109 - Shibboleth issues seem to be resolved.

Just applied this patch on 7.6.1 and it has solved the problem. Response time is okay.


Garbled code appears when I save a Chinese character.

I'm using MVC6 and EF7 in a mac with mono environment. When I store a Chinese character to the database(using sqlite), garbled code will appear.
I have checked the data sent from the client, which is stored in a String type, and it can be displayed correctly (I tried to sent data to the client directly, and it displayed correctly) . But when I stored it to the database and then read it from database, garbled code appears.
Does anyone know why?

Can you please include a sample that reproduces the issues?
Also, can you verify that the SQLite file itself has the wrong characters? ( I use http://sqlitebrowser.org/ for inspecting the file directly.)
This looks similar to a bug we resolved a few months ago (see https://github.com/aspnet/EntityFramework/issues/2936). Which version of Entity Framework are you using?

Thanks for your reply.
Well, Here is the project dependencies:
"dependencies": {
    "EntityFramework.SQLite": "7.0.0-beta7",
    "EntityFramework.Commands": "7.0.0-beta7",
    "Microsoft.AspNet.Diagnostics": "1.0.0-beta7",
    "Microsoft.AspNet.Mvc": "6.0.0-beta7",
    "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta7",
    "Microsoft.AspNet.Server.IIS": "1.0.0-beta7",
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta7",
    "Microsoft.AspNet.Server.WebListener": "1.0.0-beta7",
    "Microsoft.AspNet.Session": "1.0.0-beta7",
    "Microsoft.AspNet.StaticFiles": "1.0.0-beta7",
    "Microsoft.AspNet.Tooling.Razor": "1.0.0-beta7",
    "Microsoft.Framework.Configuration.Json": "1.0.0-beta7",
    "Microsoft.Framework.Logging": "1.0.0-beta7",
    "Microsoft.Framework.Logging.Debug" : "1.0.0-beta7",
    "Microsoft.Framework.Logging.Console": "1.0.0-beta7"
  },

And ConfigureServeces of Startup.cs:
public void ConfigureServices(IServiceCollection services)
{
    services.AddEntityFramework()
        .AddSqlite()
        .AddDbContext<AppDbContext>();

    ...
}

This is the DbContext config:
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
    base.OnConfiguring(optionsBuilder);
    var appEvn = CallContextServiceLocator.Locator.ServiceProvider.GetRequiredService<IApplicationEnvironment>();
    optionsBuilder.UseSqlite($"Data Source = { appEvn.ApplicationBasePath }/app.db");
}

Now, I start a test:

When I submit, an action like this will be called:
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Comment(string userName, int rating, string comment)
{
    var model = new RatingRecord
    {
        UserName = user.UserName,
        SupporterName = supUser.UserName,
        Rating = rating,
        RatingMsg = comment,
        Time = System.DateTime.Now
    };
    DbContext.RatingRecords.Add(model);
    await DbContext.SaveChangesAsync();

    ...
}

Next then I read the data from database and show it:

And the data in the database is also incorrect:

Year, I do a similar test like the #2936, and the result is the same as his.
Like this:

But now my project depends on the library of the version beta7, is there any tool to help me to update? Especially to detect the dependencies between project references. Or I just need to change all the version string on dependencies of project.json file to "[version]-beta8"?

This looks like a duplicate of https://github.com/aspnet/EntityFramework/issues/2936. We fixed this in the beta8 release of Microsoft.Data.Sqlite (see https://github.com/aspnet/Microsoft.Data.Sqlite/pull/127).
Please try upgrading by just changing to "[version]-beta8". There will be some breaking changes (look at this list on announcements to see those relevant to beta8).

Please re-open if this still happens on Beta 8


Allocate Stock Item with Serial Number results in "Form error exist"

Please verify that this bug has NOT been raised before.

[X] I checked and didn't find a similar issue

Describe the bug*
If you try to allocate a tracked stock item in a build order it results in a error message "Form error exist". If you do the same with a non tracked item there will be no problem.
The following screenshots are from the DEMO site. But the error output is exactly the same.
Build Order:

Allocate Stock item to Build Order:

F12 Network Debug Output:

Further F12 Debug:

Steps to Reproduce

Create or open a build order
Select a tracked BOM item and klick the "Allocate Stock" button
(if necessary) select Stock Item with Serial Number and klick the "Submit" button
Output: "Form error exist"

Same output if you select a Source Location.
Expected behaviour

Create or open a build order
Select a trackend BOM item and klick the "Allocate Stock" button
(if necessary) select Stock Item with Serial Number and klick the "Submit" button
Item is allocated

Deployment Method

[X] Docker
[ ] Package
[ ] Bare metal
[ ] Other - added info in Steps to Reproduce

Version Information
Version Information:
InvenTree-Version: 0.15.4
Django Version: 4.2.12
Commit Hash: fa1a9da
Commit Date: 2024-06-16
Database: postgresql
Debug-Mode: False
Deployed using Docker: True
Platform: Linux-5.15.149-1-pve-x86_64-with
Installer: DOC
Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.0.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}, {'name': 'InvenTreeCurrencyExchange', 'slug': 'inventreecurrencyexchange', 'version': '1.0.0'}, {'name': 'InvenTreeLabel', 'slug': 'inventreelabel', 'version': '1.0.0'}, {'name': 'InvenTreeLabelMachine', 'slug': 'inventreelabelmachine', 'version': '1.0.0'}, {'name': 'InvenTreeLabelSheet', 'slug': 'inventreelabelsheet', 'version': '1.0.0'}, {'name': 'DigiKeyPlugin', 'slug': 'digikeyplugin', 'version': '1.0.0'}, {'name': 'LCSCPlugin', 'slug': 'lcscplugin', 'version': '1.0.0'}, {'name': 'MouserPlugin', 'slug': 'mouserplugin', 'version': '1.0.0'}, {'name': 'TMEPlugin', 'slug': 'tmeplugin', 'version': '1.0.0'}]
Please verify if you can reproduce this bug on the demo site.

[X] I can reproduce this bug on the demo site.

Relevant log output
No response

Tracked items must be allocated against individual build outputs:
https://docs.inventree.org/en/stable/build/allocate/#untracked-vs-tracked-stock
I'll look into the obtuse error message, not sure why that is happening.

This has been addressed in recent improvements to the build order / stock allocation interface


more contrast snippet

What Changed
Why
Todo:

[ ] Add Semantic Version Label
[ ] Add tests
[ ] Add docs

Minor comment! We have updated the readme to be formatted as a table! If you can update you pr + edit in the readme to align with the change that would be amazing 🙏 thank you!!


How can I pass more than two points when I call directions on google maps?

You mean as in multiple stops in directions? That is currently not supported in this library, but I would certainly welcome a PR for such functionality!

Oh, that's great invitation! Let me have some free time and I certainly will take this project to look if I can put more than two points

Closing this one right now, since it's not really in the scope of this library, and since we're adding more and more app integrations, features like these will not be able to be implemented for every supported app.


Compute and store scores for all revisions

Love this idea, especially updating it backwards as the LIFO queue of recent changes.
How often would we want to invalidate the cached data?  Is there any value in archiving previous model version results, maybe to study the progress of this tool?

This was done, and in style!


Fix #14542, Text with adjustsFontSizeToFit turned on will lose fontVariant issue

  Thanks for submitting a PR! Please read these instructions carefully:

[ ] Explain the motivation for making this change.
[ ] Provide a test plan demonstrating that the code is solid.
[ ] Match the code formatting of the rest of the codebase.
[ ] Target the master branch, NOT a "stable" branch.

Please read the Contribution Guidelines to learn more about contributing to React Native.

Motivation (required)
Fix #14542
Test Plan (required)
Screenshot after fixed

Compare side by side with the screenshot before bugfix applied

the same result should be easily reproduced with the sample code in #14542

We tried to sign the CLA but it keeps saying

There were some errors submitting your CLA:
Something went wrong while submitting the form. Please ensure all required fields are filled and try submitting again.
If you would believe this error is incorrect or need to update an existing account, please email<EMAIL_ADDRESS>with your details.

Any idea?

Hmmm, I also see a test is failing in Travis, looks like screenshot comparing failure or what, any idea how I can address it?


fix Fix profile eject

We should only eject execution profiles after query has finished for a long enough time.
Only add execution to profile manager if enable_profile is true

run buildall

run buildall

run external p0

run p0