implement banforwards

an example of how this concept works, from charybdis:
/mode #chan +b *!*@badhost$##fix-your-connection
will forward anyone matching the mask to the given channel - mask and channel being delimited by $.
i'd be very happy if the format could remain the same, but it wouldn't be the end of the world if it can't.

my suggestion would be that we store the forward channel in MaskInfo objects and then change
https://github.com/oragono/oragono/blob/55b21fa86c462a283f296753cd3ee9288177ad5f/irc/client_lookup_set.go#L423
to somehow figure out which mask you match, rather than just "you match somewhere in the regex". we can then get the MaskInfo for the mask and pass that up to
https://github.com/oragono/oragono/blob/c55b25d6a181ab76d481d73012954a65fa532a27/irc/channel.go#L703
which can then pass up instructions to
https://github.com/oragono/oragono/blob/c55b25d6a181ab76d481d73012954a65fa532a27/irc/handlers.go#L1175-L1178
to issue a redirect instead of an ERR

That makes sense.
We'd want to make sure that you can't forward in loops. Maybe you only get one redirect?

sounds good.
perhaps we could change the big regex to be "(asd!*@*)|(dsa!*@*)|(sda!*@*) etc and then we figure out the index of which group we matched and use that to figure out which mask we matched? i think regexp.FindStringSubmatch could do this?

I think it's not necessarily going to be straightforward to determine which clause was matched, just from the matched substring. (Although if you can see a way to do it, that would certainly be interesting.)
When I benchmarked irc/utils/glob.go I found that matching against one big or-expression wasn't that much faster than just trying to match every individual ban regex in sequence. We could just do that instead.
re. syntax, note that $ is currently an allowed character in Oragono nicknames. (But # isn't allowed in nicks, usernames, or hostnames; if I understand the Charybdis syntax correctly, we could treat $# as the delimiter and then "put the # back".)

Might it be cleaner to have one single all-purpose overflow channel? (Covering user limit, invite-only, registered-only, and all bans.)

yes that's usually cmode +f, banforwards are very often utilised for specific actions against specific people, such as if they are rapidly reconnecting, you forward them to ##fix-your-connection

as for $ being valid in nicknames, as long as it's not valid in hostnames, we can use $ as the delimiter but only when it's on the righthand side of the @ in a banmask


[Tech Debt]: Add PR template validator

Type
Dev Efficiency (eg. CI improvements, issue templates, etc)
Source
No response
Description
We need to make sure all the PRs meet the template.
Here is the tool we could probably use https://github.com/marketplace/actions/template-validator. Any suggestions are welcomed if you know some better tools.
Why?
It makes no sense if you have a PR up without filling the template because the reviewers have no idea what this PR is solving.
Anything else?
No response

Consider [WIP] PRs not something to validate

Migrated to:  https://issues.redhat.com/browse/RHOAIENG-2900


Codeunit 5940 "ServContractManagement" - GetInvoicePeriodText

Hi, would it be possible to add the OnCalcInvoicePeriodTextCaseElse event in codeunit 5940 "ServContractManagement" in procedure GetInvoicePeriodText, like this:
procedure GetInvoicePeriodText(InvoicePeriod: Enum "Service Contract Header Invoice Period") InvPeriodText : Text[4]
var
    ServiceContractHeader: Record "Service Contract Header";
begin
    case InvoicePeriod of
        ServiceContractHeader."Invoice Period"::Month:
            exit('<1M>');
        ServiceContractHeader."Invoice Period"::"Two Months":
            exit('<2M>');
        ServiceContractHeader."Invoice Period"::Quarter:
            exit('<3M>');
        ServiceContractHeader."Invoice Period"::"Half Year":
            exit('<6M>');
        ServiceContractHeader."Invoice Period"::Year:
            exit('<1Y>');
         else
                OnCalcInvoicePeriodTextCaseElse(Rec, InvPeriodText);

    end;
end;

[IntegrationEvent(false, false)]
local procedure OnCalcInvoicePeriodTextCaseElse(var ServiceContractHeader: Record "Service Contract Header"; InvPeriodText: Text[4])
begin
end;

Thanks!

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


feature request: be able to bundle preload script

For security reasons, require is not defined in the special context in which preload scripts run, but it would be useful for preload scripts to be able to share constants (i.e., method names) between preload scripts and IPC implementations for the APIs exposed in preload scripts.
This feature request is to suggest being able to build the preload scripts with esbuild --bundle option so there is no need for require at runtime.

vite-plugin-electron will be bundle Preload-scripts

More about vite-plugin-electron
https://github.com/electron-vite/vite-plugin-electron/issues/107


ResultCollections of ProxyArtifacts don't work when returned from a pipeline

Bug Description
It is not possible to return a collection (list, dict, or otherwise) of ProxyArtifact's as this situation is missed by the final stages of the pipeline executor. The result is an error indicating that ProxyArtifact is not in instance of Result.
Workaround
def some_pipeline(ctx, ...):
    # stuff
    ...
    # before returning the collection:
    for key, value in results.items():
        results[key] = value.result()
    return results

Do we want to support any degree of nesting here?

I don't think so, since collections don't nest themselves.


quote on newlines in text as well

if some table cells contain newlines in their text, those should be quoted as well

Nice! I like it.


Make it work for channels

Basically what the title says.
For example, I want to make a switch homebrew related channel that's going to have this bot post the new releases for selected homebrew on github.
Otherwise the bot is really nice, btw.

Thank you, very nice to hear that it helps someone.
But the bot has support for channels, groups and supergroups. Can you say something about the behavior that you observe when you try to add it to the channel and do something with it?

Oh damn, sorry. Somehow I missed the notification about your reply. This happens when I try to communicate with bot in channel:

Bot have all the administrator permissions but “add new admins” one.

Any updates on this request?

The issue is still happening, it seems


auth import causes error in static website

Description
My app uses flet.auth. Everything works fine during my testing. As soon as I run "flet publish" to create a static website, it says flet.auth module not found in the browser console. I also tried flet_runtime, but this module is not found either. The app is opened properly with python http.server.

Code example to reproduce the issue:
Open any example and add this to the import section.
from flet.auth.providers import OAuthProvider

Then compile it as static website.
Describe the results you received:
ModuleNotFoundError: No module named 'flet.auth'

Describe the results you expected:
the static website should compile to the same as the web app

Additional information you deem important (e.g. issue happens only occasionally):
Flet version (pip show flet):
Name: flet
Version: 0.9.0.dev1623
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Home-page:
Author: Appveyor Systems Inc.
Author-email<EMAIL_ADDRESS>License: Apache-2.0
Location: c:\users\inspiron5425\appdata\roaming\python\python310\site-packages
Requires: copier, flet-runtime, packaging, pydantic, qrcode, watchdog, websocket-client, websockets
Required-by:

Operating system:
Windows 11

Additional environment details:

I believe this issue is mainly from the "breaking change" in the changelog incorrectly specifying the import for OAuthProvider (and other more specific OAuthProvider instances, such as GitHubOAuthProvider).
Instead of from flet.auth.providers import OAuthProvider, try using from flet_runtime.auth.oauth_provider import OAuthProvider for your header.


Communicate upcoming hard fork to community

Write down hard fork changes (block number, validator contract).
Discuss with comms team which should write Reddit post
Also announce in Rocket Chat channel that Reddit post exists.

We will fork the Trustlines test chain on block 2717171 to change the validator set handling from a list to a contract. The validators in themselves will not change, each addresses present in the current validator list will be present in the contract. The contract address is 0x352B8FaC58c743FA2aaA086e20d0bF3789774d46. You can see the new chain spec file to be used at https://github.com/trustlines-protocol/blockchain/blob/7ce8d689efee5cce672556c41ffbadec3bf6f0a6/config/trustlines-spec.json.
The ValidatorSet contract deployed corresponds to https://github.com/trustlines-protocol/blockchain/blob/7ce8d689efee5cce672556c41ffbadec3bf6f0a6/contracts/contracts/ValidatorSet.sol
You can check the validator set by calling the getValidators() function on the contract. Alternatively, the validator-set-deploy cli tool can be used to print the current validators of the set: https://github.com/trustlines-protocol/blockchain/tree/7ce8d689efee5cce672556c41ffbadec3bf6f0a6/validator-set-deploy
Validators running watchtower on the trustlines testnet docker image (validators that used the quickstart script) will automatically update to use this new fork.

We will fork the Trustlines test chain

"We will distribute an update that would fork ..."
Would also be nice to have an explanation in there why we do this. "In the current iteration of the testnet, the list of validators is statically defined. With the update, we switch to a so called validator set contract. This allows the network to dynamically modify the validator set according to the rules of a smart contract."
Also, we should add that this means equivocating validators can now be removed.

Validators running watchtower on the trustlines testnet docker image (validators that used the quickstart script) will automatically update to use this new fork.

Do we "immediately" build and push this new Docker image after posting this or do we wait for some discussion/feedback?

We tried having this discussion (about we do we do) many times. To me it is fine to push this new Docker image, if validators disagree they can remove the watchtower. I think we should provision for pushing the image on Friday and announce it.

The process was handled to comms.


Frontend: Move the input form state to a global store

Rationale
Currently, the app stores the form state locally in components and sharing the state between the components happens by passing objects via props. This can become quite painful to manage/upgrade in the long run, mostly when we expand the input form with new features, which is the case at the moment.
Since the complexity of our form grew significantly in the past few months we need to rethink the way of storing & passing the form input values between the respective components & composables.
Also, i discovered that the two-way data binding is currently broken. To be more precise, value changes in the lower level components are being successfully reflected upwards but value changes from the top components is not being propagated correctly downwards.
This, in the end, will make it easier to wire the components with the state by avoiding the “props-down” and “events-up” pattern on multiple levels of components. I also believe it will bring us closer to solving this inconvenient app behavior: https://github.com/beamer-bridge/beamer/issues/1276
Implementation
Move all the form input bindings to a global store.
Acceptance Criteria

[ ] Form input bindings are stored in a global store and these same objects are no longer present in the components
[ ] Two-way data binding is now working (direct changes in the global store are reflected in the form inputs and vice versa)

After moving all the form input fields to the global store check if we still need the toRaw conversion introduced here: https://github.com/beamer-bridge/beamer/pull/1330/files#diff-9585c0755ac387e4ca0663a82b813effa871a9418d1708a5f507c18544a068b5R69


Add forecasted columns to grants table

Ticket #3212
Description
We want to surface forecasted grants to users. The first step is to add some columns to the grants table to capture this information.
Testing
I ran db:migrate and verified that the columns were added to the grants table.
Automated and Unit Tests
N/A
Manual tests for Reviewer
After checking out the branch, run docker compose exec app yarn db:migrate. Then drop into the postgres container and run psql -h localhost -d usdr_grants -U postgres. \d+ grants will describe the grants table.
Checklist

[ ] Provided ticket and description
[ ] Provided screenshots/demo
[ ] Provided testing information
[ ] Provided adequate test coverage for all new code
[ ] Added PR reviewers

@joshgarza are you able to review this PR?


How to deal with url with https://encrypted ?

Image url with 'https://encrypted' cannot load, how to deal with it?
https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcRJm8UXZ0mYtjv1a48RKkFkdyd4kOWLJB0o_l7GuTS8-q8VF64w

@nostra13 Did you got any ideas about this kind of url?

I want to ask this issue too


not running with Graviton processor

recently we have changed to aws graviton and this action started breaking.
exec /entrypoint.sh: exec format error
any help?

Can you provide some details on the CPU architecture? I know it's ARM64, but not sure on which version, say arm64/v7 or a64/v6. Further details on that would be appreciated.

Seems like ARM64 docker image contains a x86 binary of bash.
This is because the base image is pinned to a specific manifest instead of to the index.
Created a #175 to address this issue

Updated the images, credits to @noamcohen97 for resolving this one!

Thanks guys

will this be available in the latest version?
<EMAIL_ADDRESS>

New docker images are already available with the old v2.3.0.
I don't know what's GitHub action image pull policy - but @L0RD-ZER0 maybe you should consider an image version bump to force re-pull?


starknet api rpc state reader

Starknet API RPC State Reader
Description
Description of the pull request changes and motivation.
Checklist

[ ] Linked to Github Issue
[ ] Unit tests added
[ ] Integration tests added.
[ ] This change requires new documentation.

[ ] Documentation has been added/updated.

Codecov Report

Merging #927 (7bdfe01) into main (04b93fc) will increase coverage by 0.00%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #927   +/-   ##
=======================================
  Coverage   90.82%   90.82%
=======================================
  Files          54       54
  Lines       13591    13598    +7
=======================================
+ Hits        12344    12351    +7
  Misses       1247     1247

see 1 file with indirect coverage changes


[Bug]: API "tags" key inconsistent for models endpoint

What happened?
https://civitai.com/api/v1/models?limit=0&username=xyz
outputs tags as array
"tags": [
  "character",
  "female",
  "girls",
  "man",
  "landscape",
  "semirealistic"
]

https://civitai.com/api/v1/models/000
outputs tags as array of dict
 "tags": [
  {
    "name": "character"
  },
  {
    "name": "female"
  },
  {
    "name": "girls"
  },
  {
    "name": "man"
  },
  {
    "name": "landscape"
  },
  {
    "name": "semirealistic"
  }
]

Steps to reproduce the problem

Get response from any username at https://civitai.com/api/v1/models?limit=0&username=xyz endpoint.
Take the any model from their items list and pass it to https://civitai.com/api/v1/models/000
Resulting response shows tags returned in inconsistent with endpoints.

What should have happened?
Both endpoints should be consistent in how they return the tags list, either as array or array of dicts.
What platforms do you use to access the site?
No response
What browsers do you use to access the site?
No response
Additional information, context and logs
No response

Just added the fix for this. It should go out in about 12 hours.


Add callback for when dynamic pawn finishes flying

Solves #827
Adds a BP accessible delegate onFlightComplete in the AGlobeAwareDefaultPawn class.
Tested with the flyTo example following the tutorial: https://cesium.com/learn/unreal/unreal-flyto/.
@nithinp7

Thanks for the pull request @miatang13!

:heavy_check_mark: Signed CLA found.

Reviewers, don't forget to make sure that:

[ ] Cesium for Unreal Samples works.

I haven't tried this out yet, but it looks solid! The one thing I would consider is to add handling for "flight interruptions", see:
https://github.com/CesiumGS/cesium-unreal/blob/3402d3ac2af42e03b5d4b2f88158fe8d97d0de9d/Source/CesiumRuntime/Private/GlobeAwareDefaultPawn.cpp#L383
When flight interruptions are enabled, moving the controls can stop the flight, this allows the camera to be more responsive and is useful in some situations. We could either just trigger the "flight completed" delegate, or have a separate one for "flight interrupted", what do you think?

When flight interruptions are enabled, moving the controls can stop the flight, this allows the camera to be more responsive and is useful in some situations. During interruptions, we could either just trigger the "flight completed" delegate, or have a separate one for "flight interrupted", what do you think?

I think having a separate delegate is the better option here since moving the control might be intentional or by accident, and technically speaking if the flight is interrupted, it has not been completed.

This PR now adds a new delegate OnFlightInterrupt which is triggered when a pawn's flying is interrupted. Currently tested with interrupting flight with both keyboard (WSAD) and moving the mouse.


Make shouldNotBe smarter by using contracts

If we use shouldNotBe to match with null then maybe we could help the compiler infer null-safety for successive code.
foo shouldNotBe null
foo.bar!! shouldBe "bar"

would become
foo shouldNotBe null
foo.bar shouldBe "bar"

A similar solution that already uses contracts:
foo.shouldNotBeNull()
foo.bar shouldBe "bar"

Basically this minor enhancement would make
value shouldNotBe null
synonymous with
value.shouldNotBeNull().
I would prefer using the former infix for test code readability.

Unfortunately, this doesn't work yet, AFAIK.
It's not possible to make a conditional check in a contract, such as if x is null, return implies y not null.
This is possible with the extension function because we can say returns implies x not null.
Until there's a change in contracts (I don't believe this kind of contract will be supported soon), I don't believe there's much we can do.


Adjacent Material widgets in Column with equal elevation cast shadows on each other

Interestingly opposite to #12206, I would expect two material widgets next to each other to cast shadows below, but not on the other. Instead I get this (code here):

Would also appreciate a workaround. I looked into MergeableMaterial but it didn't seem appropriate since it needs to be unconstrained and I'm using a CustomSingleChildLayout as a PopupRoute (like PopupMenu does).

I've run into this as well.  Any ideas for how to keep them from casting shadows on each other would be great.

@tobytraylor Using "add reaction" on the initial comment would increase priority.

Issue still exist
Code Sample
import 'package:flutter/material.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Bug Demo',
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('Bug Demo'),
        ),
        body: new Center(
          child: new Row(
            mainAxisSize: MainAxisSize.min,
            children: <Widget>[
              new Material(
                elevation: 8.0,
                child: new SizedBox(width: 50.0, height: 50.0),
              ),
              new Material(
                elevation: 8.0,
                child: new SizedBox(width: 150.0, height: 150.0),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

flutter doctor -v
[✓] Flutter (Channel dev, v1.18.0-6.0.pre, on Mac OS X 10.15.4 19E287, locale
    en-GB)
    • Flutter version 1.18.0-6.0.pre at /Users/taha/Code/flutter_dev
    • Framework revision 84c84fb249 (31 hours ago), 2020-04-20 21:35:01 -0400
    • Engine revision 2bde4f0ae4
    • Dart version 2.9.0 (build 2.9.0-1.0.dev a12c36dd97)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/taha/Code/sdk
    • Platform android-29, build-tools 29.0.3
    • ANDROID_HOME = /Users/taha/Code/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.4.1, Build version 11E503a
    • CocoaPods version 1.9.1
[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)
[✓] VS Code (version 1.44.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.9.1
[✓] Connected device (4 available)
    • SM M305F   • 32003c30dc19668f • android-arm64  • Android 10 (API 29)
    • macOS      • macOS            • darwin-x64     • Mac OS X 10.15.4 19E287
    • Chrome     • chrome           • web-javascript • Google Chrome
      81.0.4044.113
    • Web Server • web-server       • web-javascript • Flutter Tools
• No issues found!

Would be really nice if this worked.

Any update here? This issue breaks the fundamental material design rule.

Issue replicable on latest master.

flutter doctor -v
[✓] Flutter (Channel master, 1.26.0-2.0.pre.137, on Mac OS X 10.15.4 19E2269
    darwin-x64, locale en-IN)
    • Flutter version 1.26.0-2.0.pre.137 at
      /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision 8f5d0371af (4 days ago), 2020-12-26 11:07:36 +0330
    • Engine revision f5364860ab
    • Dart version 2.12.0 (build 2.12.0-179.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    ! CocoaPods 1.9.3 out of date (1.10.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin
        code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade see
      https://guides.cocoapods.org/using/getting-started.html#installation for
      instructions.

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.51.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (4 available)
    • SM A260G (mobile)                   • 5200763ebcfa861f
      • android-arm    • Android 8.1.0 (API 27)
    • iPhone SE (2nd generation) (mobile) • 6C85835D-FBFD-4AB3-8DE8-B4FAD35E5367
      • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)
    • macOS (desktop)                     • macos
      • darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
    • Chrome (web)                        • chrome
      • web-javascript • Google Chrome 87.0.4280.88

! Doctor found issues in 1 category.

This is still a problem in 2021.

no updates on this issue?

Reproduces on the latest versions of flutter.

updated code sample
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Bug Demo',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Bug Demo'),
        ),
        body: const Center(
          child: Row(
            mainAxisSize: MainAxisSize.min,
            children: <Widget>[
              Material(
                elevation: 8.0,
                child: SizedBox(width: 50.0, height: 50.0),
              ),
              Material(
                elevation: 8.0,
                child: SizedBox(width: 150.0, height: 150.0),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

flutter doctor -v
[✓] Flutter (Channel stable, 3.7.7, on macOS 13.2.1 22D68 darwin-arm64, locale en-GB)
    • Flutter version 3.7.7 on channel stable at /Users/nexus/dev/sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2ad6cd72c0 (12 days ago), 2023-03-08 09:41:59 -0800
    • Engine revision 1837b5be5f
    • Dart version 2.19.4
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9619390/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] Android Studio (version 2022.1)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9477386/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] Android Studio (version 2022.1)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9619390/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] IntelliJ IDEA Community Edition (version 2022.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 72.1.4
    • Dart plugin version 223.8888

[✓] VS Code (version 1.76.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.60.0

[✓] Connected device (3 available)
    • M2007J20CG (mobile) • adb-5dd3be00-17AYzd._adb-tls-connect._tcp. • android-arm64  • Android 12 (API 31)
    • macOS (desktop)     • macos                                      • darwin-arm64   • macOS 13.2.1 22D68 darwin-arm64
    • Chrome (web)        • chrome                                     • web-javascript • Google Chrome 111.0.5563.64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

[!] Flutter (Channel master, 3.9.0-11.0.pre.7, on macOS 13.2.1 22D68 darwin-arm64, locale en-GB)
    • Flutter version 3.9.0-11.0.pre.7 on channel master at /Users/nexus/dev/sdks/flutters
    ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 1cd55934f9 (5 hours ago), 2023-03-20 02:26:27 -0400
    • Engine revision 19a5f61ff7
    • Dart version 3.0.0 (build 3.0.0-339.0.dev)
    • DevTools version 2.22.2
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9619390/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] Android Studio (version 2022.1)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9477386/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] Android Studio (version 2022.1)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9619390/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] IntelliJ IDEA Community Edition (version 2022.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 72.1.4
    • Dart plugin version 223.8888

[✓] VS Code (version 1.76.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.60.0

[✓] Connected device (3 available)
    • M2007J20CG (mobile) • adb-5dd3be00-17AYzd._adb-tls-connect._tcp. • android-arm64  • Android 12 (API 31)
    • macOS (desktop)     • macos                                      • darwin-arm64   • macOS 13.2.1 22D68 darwin-arm64
    • Chrome (web)        • chrome                                     • web-javascript • Google Chrome 111.0.5563.64

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.


Role 'Directory readers' doesn't exist.

Describe the bug
Unable to create role assignment for Directory Readers via CLI. Was able to create via Portal.
Command Name
az role assignment create
Errors:
The specified role definition with ID '88d8e3e38f554a1e953a9b9898b8876b' does not exist.

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

az role assignment create --assignee {} --role 88d8e3e38f554a1e953a9b9898b8876b

Expected Behavior
Role assignment is created.
Environment Summary
Linux-5.4.0-1074-azure-x86_64-with-glibc2.28 (Cloud Shell), Common Base Linux Delridge (quinault)
Python 3.8.12
Installer: DEB

azure-cli 2.35.0

Extensions:
ai-examples 0.2.5
ssh 1.0.1

Dependencies:
msal 1.17.0
azure-mgmt-resource 20.0.0

Additional Context
This happens whether I put the ID or the name, e.g. "Directory Readers".

@jiasli for awareness

Any updates on this? Having the same problem.

I'm also encountering the same issues when using Bicep/ARM templates.

Getting the same problem:
az role assignment create --role "Directory Readers" --assignee "[Application ID]"
Produces
Role 'Directory Readers' doesn't exist.
Same thing if I specify by id "88d8e3e3-8f55-4a1e-953a-9b9898b8876b".
Incidentally the Directory Readers build in role also fails to show up when I az role definition list.  Yet it shows up and workks fine in the Portal.

Any update? I'm currently forced to go into the Portal to manually create these assignments.

I'm also having this issue, unfortunately I'm not able to create this assignment via the Portal (even though I'm owner).

I assume this 'bug' applies to all Microsoft Entra built-in roles and not just Directory Readers?

I'm also having this issue, unfortunately I'm not able to create this assignment via the Portal (even though I'm owner).
Any update on this? This seems to be open quite some time already.

Having the role Owner won't help you here, you need either Privileged Role Administrator or Global Administrator.

This is still an issue in bicep, trying to add sql server identity to Directory Reader, but ..
The specified role definition with ID '88d8e3e38f554a1e953a9b9898b8876b' does not exist.


Training broken with apex optimization O1

If is_fp16 is True and fp16_opt_level is "O1", the call to fit exits with an exception from with_counter in LRScheduler.__init__ (in lr_scheduler.py), because the optimizer.step function gets rewritten by amp and no longer has the attribute __self__ (or __func__), which with_counter needs.
As a workaround, I'm using optimization level "O2", instead. But I think this behavior should be documented or fixed.

Can you reinstall apex and transformers library

@chrislong Are you using a high-level wrapper on top of PyTorch + apex?
It seems the fit function might be defined in it?


openHostApp opening the wrong app bundle

This is more of a configuration question, but still an issue during development so I figured I'd post it.
I have 3 separate bundle ids:

com.org.myapp (production build)
com.org.myapp.DEV (dev client build)
com.org.myapp.STAGING (QA internal distribution build)

In my app.json however, I just have 1 scheme set ("myapp"). When I'm in the dev share extension and call openHostApp, it will open the QA app rather than the dev client app. I'd love for each share extension instance to open its corresponding bundle, since I and my QA team have multiple bundles installed at once. Is there a way around this? Do I need to set up multiple different schemes? Any help would be appreciated, thanks!

Hey @nhuesmann, in my team we have a dedicated scheme for each environment. That should solve the problem

@MaxAst Thanks so much, I'll try implementing this. Is it as straightforward as just setting it dynamically in app.config.ts? I just wasn't sure because the docs only mention dynamic schemes in the context of bare workflow.

Yea you can set it via app.config.ts

@MaxAst I just removed scheme from app.json and am now setting it via dynamic config in app.config.ts. Using appname-dev, appname-qa, and appname depending on the build channel. I just built new dev and qa apps with this, then tested the share extension again. This time, openHostApp actually does nothing - it doesn't open any of the apps.
One thing I'm noticing as I'm trying to debug this: I'm not sure the scheme name is even being used when I run expo prebuild. Take dev for example - in app.config.ts I have the name set to "Appname DEV", and the scheme set to "appname-dev". When I look at the ios folder generated by prebuild, the folders inside are all AppnameDEV, AppnameDEV.xcodeproj, etc. When I load the project in XCode and check the scheme, it's also showing the scheme as AppnameDEV rather than appname-dev. Is this causing an issue? Is prebuild ignoring my scheme? One additional piece to note is that I've also set the following in app.json:
"ios": {
    "infoPlist": {
        "CFBundleURLTypes": [
            {
                "CFBundleURLSchemes": [
                    "appname",
                ]
            }
        ],
    }
}

Do I need to add scheme info there too?
Sorry I realize this may be getting out of scope of your library, I'm just trying to troubleshoot and really haven't found any good info on this in my extensive searching.


SVG not a valid image format

When I upload an .svg using Filer/Image, I get the error "Select a valid choice. That choice is not one of the available choices."
Is this expected behavior? SVG's have been a pretty common image format in web dev for a while now.

Closing in favor of https://github.com/divio/django-filer/issues/460


fix some typos and more links

This path fixes also links to the twitter/facebook accounts for participants in the editor pages.

Great and good catch


C# Advanced Example Bugs

Describe the bug
There are three errors (runtime) that are being encountered to run the code as a .NET Core console application as per the attached screenshot

Steps to reproduce
Steps to reproduce the unwanted behavior:
Open up Visual Studio 2019 Community
Create .NET Core console application
Copy and paste the code shown on the C# Advanced code example in the Program.cs
Run the application
Expected behavior
It should run without error
Screenshots
If applicable and possible, add screenshots to help explain your problem.

Additional information

OS: [e.g. Windows 10 - Build 1803]
C#

Code snippet
If this bug is caused by a piece of code, send the code right here and mark the line where it is caused.
I only know JavaScript, C++ and C#, but I can probably interpret other languages.
`using System;
using System.Threading.Tasks;
using System.Net.Http;
using Newtonsoft.Json;   // Install with NuGet Package Manager: https://www.nuget.org/packages/Newtonsoft.Json/12.0.3?_src=template
namespace TestHttpRequest
{
class Program
{
static async Task Main(string[] args)
{
Joke randomJoke = await GetJokeAdvanced(); (Err1: Cannot implicitly convert type void to T.JokeestHttpRequest)
if (randomJoke.type == "single")
{
Console.WriteLine(randomJoke.joke);
}
else
{
Console.WriteLine(randomJoke.setup);
System.Threading.Thread.Sleep(3000);
Console.WriteLine(randomJoke.delivery);
}
}
    public async static Task GetJokeAdvanced()
    {
        const string baseUrl = "https://jokeapi.dev";
        string[] categories = { "Programming", "Miscellaneous", "Pun", "Spooky", "Christmas" };
        string[] parameters = {
            "blacklistFlags=nsfw,religious,racist,sexist",
            "idRange=0-100"
        };
        string requestUrl = $"{baseUrl}/joke/{string.Join(",", categories)}?{string.Join("&", parameters)}";
        Joke randomJoke;

        using (var httpClient = new HttpClient())
        {
            var json = await httpClient.GetStringAsync(requestUrl);
            randomJoke = JsonConvert.DeserializeObject(json);**(Err2: Cannot implicity convert type object to TestHttpRequest.Joke)**
        }

        return randomJoke; (Err3: Since Program.GetJokeAdvanced() is an async method that returns Task, a return keyword must not be followed by an object expression)
    }
}

public class Joke
{
    public string type { get; set; }
    public string joke { get; set; }
    public string setup { get; set; }
    public string delivery { get; set; }
    public int id { get; set; }
    public Flags flags { get; set; }
}

public class Flags
{
    public bool nsfw { get; set; }
    public bool religious { get; set; }
    public bool political { get; set; }
    public bool racist { get; set; }
    public bool sexist { get; set; }
}

}
`
Additional context
I have taken the exact code snippet from your website for Joke API. I hope you will be able to easily replicate the issues on Windows 10 and VS 2019 (I have used version 8.1)

After some research, I have now the correct code below:
`using System;
using System.Threading.Tasks;
using System.Net.Http;
using Newtonsoft.Json;   // Install with NuGet Package Manager: https://www.nuget.org/packages/Newtonsoft.Json/12.0.3?_src=template
namespace TestHttpRequest
{
class Program
{
static async Task Main(string[] args)
{
Joke randomJoke = await GetJokeAdvanced();
if (randomJoke.type == "single")
{
Console.WriteLine(randomJoke.joke);
}
else
{
Console.WriteLine(randomJoke.setup);
System.Threading.Thread.Sleep(3000);
Console.WriteLine(randomJoke.delivery);
}
}
    public async static Task<Joke> GetJokeAdvanced()
    {
        const string baseUrl = "https://jokeapi.dev";
        string[] categories = { "Programming", "Miscellaneous", "Pun", "Spooky", "Christmas" };
        string[] parameters = {
            "blacklistFlags=nsfw,religious,racist,sexist",
            "idRange=0-100"
        };
        string requestUrl = $"{baseUrl}/joke/{string.Join(",", categories)}?{string.Join("&", parameters)}";
        Joke randomJoke;

        using (var httpClient = new HttpClient())
        {
            var json = await httpClient.GetStringAsync(requestUrl);
            randomJoke = JsonConvert.DeserializeObject<Joke>(json);
        }

        return randomJoke;
    }
}

public class Joke
{
    public string type { get; set; }
    public string joke { get; set; }
    public string setup { get; set; }
    public string delivery { get; set; }
    public int id { get; set; }
    public Flags flags { get; set; }
}

public class Flags
{
    public bool nsfw { get; set; }
    public bool religious { get; set; }
    public bool political { get; set; }
    public bool racist { get; set; }
    public bool sexist { get; set; }
}

}
`
Please correct the code in your website (https://sv443.net/jokeapi/v2/?ref=apilist.fun#examples)after running and satisfying yourself as above.

After some research, I have now the correct code below:
`using System;
using System.Threading.Tasks;
using System.Net.Http;
using Newtonsoft.Json;   // Install with NuGet Package Manager: https://www.nuget.org/packages/Newtonsoft.Json/12.0.3?_src=template
namespace TestHttpRequest
{
class Program
{
static async Task Main(string[] args)
{
Joke randomJoke = await GetJokeAdvanced();
if (randomJoke.type == "single")
{
Console.WriteLine(randomJoke.joke);
}
else
{
Console.WriteLine(randomJoke.setup);
System.Threading.Thread.Sleep(3000);
Console.WriteLine(randomJoke.delivery);
}
}
    public async static Task<Joke> GetJokeAdvanced()
    {
        const string baseUrl = "https://jokeapi.dev";
        string[] categories = { "Programming", "Miscellaneous", "Pun", "Spooky", "Christmas" };
        string[] parameters = {
            "blacklistFlags=nsfw,religious,racist,sexist",
            "idRange=0-100"
        };
        string requestUrl = $"{baseUrl}/joke/{string.Join(",", categories)}?{string.Join("&", parameters)}";
        Joke randomJoke;

        using (var httpClient = new HttpClient())
        {
            var json = await httpClient.GetStringAsync(requestUrl);
            randomJoke = JsonConvert.DeserializeObject<Joke>(json);
        }

        return randomJoke;
    }
}

public class Joke
{
    public string type { get; set; }
    public string joke { get; set; }
    public string setup { get; set; }
    public string delivery { get; set; }
    public int id { get; set; }
    public Flags flags { get; set; }
}

public class Flags
{
    public bool nsfw { get; set; }
    public bool religious { get; set; }
    public bool political { get; set; }
    public bool racist { get; set; }
    public bool sexist { get; set; }
}

}
`
Please correct the code in your website (https://sv443.net/jokeapi/v2/?ref=apilist.fun#examples)after running and satisfying yourself as above.

@krchome did you close this issue on accident?

@krchome did you close this issue on accident?

I closed this issue as I could sort out the issue I raised earlier (with all screenshots) and when I edited it with the intention to close it accidentally I created another issue. Hence I thought to close this newly accidentally created issue and edit the original one saying I am closing it now. Hope I make sense :-)

I closed this issue as I could sort out the issue I raised earlier (with all screenshots) and when I edited it with the intention to close it accidentally I created another issue. Hence I thought to close this newly accidentally created issue and edit the original one saying I am closing it now. Hope I make sense :-)

Sure. Thanks for explaining 😃

Sure. Thanks for explaining 😃

Can you please update the code as there were two minor errors which I have corrected and tested fine. The correction are highlighted in the code below :
using System;
using System.Threading.Tasks;
using System.Net.Http;
using Newtonsoft.Json;   // Install with NuGet Package Manager: https://www.nuget.org/packages/Newtonsoft.Json/12.0.3?_src=template
namespace TestHttpRequest
{
class Program
{
static async Task Main(string[] args)
{
Joke randomJoke = await GetJokeAdvanced();
if (randomJoke.type == "single")
{
Console.WriteLine(randomJoke.joke);
}
else
{
Console.WriteLine(randomJoke.setup);
System.Threading.Thread.Sleep(3000);
Console.WriteLine(randomJoke.delivery);
}
}
    public async static Task<Joke> GetJokeAdvanced()  // **Changed to return Task<Joke>**
    {
        const string baseUrl = "https://jokeapi.dev";
        string[] categories = { "Programming", "Miscellaneous", "Pun", "Spooky", "Christmas" };
        string[] parameters = {
            "blacklistFlags=nsfw,religious,racist,sexist",
            "idRange=0-100"
        };
        string requestUrl = $"{baseUrl}/joke/{string.Join(",", categories)}?{string.Join("&", parameters)}";
        Joke randomJoke;

        using (var httpClient = new HttpClient())
        {
            var json = await httpClient.GetStringAsync(requestUrl);
            randomJoke = JsonConvert.DeserializeObject<Joke>(json); **// Changed to incude Joke class after DeserializeObject method**
        }

        return randomJoke;
    }
}

public class Joke
{
    public string type { get; set; }
    public string joke { get; set; }
    public string setup { get; set; }
    public string delivery { get; set; }
    public int id { get; set; }
    public Flags flags { get; set; }
}

public class Flags
{
    public bool nsfw { get; set; }
    public bool religious { get; set; }
    public bool political { get; set; }
    public bool racist { get; set; }
    public bool sexist { get; set; }
}

}

Can you please update the code as there were two minor errors which I have corrected and tested fine. The correction are highlighted in the code below :
using System;
using System.Threading.Tasks;
using System.Net.Http;
using Newtonsoft.Json;   // Install with NuGet Package Manager: https://www.nuget.org/packages/Newtonsoft.Json/12.0.3?_src=template
namespace TestHttpRequest
{
class Program
{
static async Task Main(string[] args)
{
Joke randomJoke = await GetJokeAdvanced();
if (randomJoke.type == "single")
{
Console.WriteLine(randomJoke.joke);
}
else
{
Console.WriteLine(randomJoke.setup);
System.Threading.Thread.Sleep(3000);
Console.WriteLine(randomJoke.delivery);
}
}
    public async static Task<Joke> GetJokeAdvanced()  // **Changed to return Task<Joke>**
    {
        const string baseUrl = "https://jokeapi.dev";
        string[] categories = { "Programming", "Miscellaneous", "Pun", "Spooky", "Christmas" };
        string[] parameters = {
            "blacklistFlags=nsfw,religious,racist,sexist",
            "idRange=0-100"
        };
        string requestUrl = $"{baseUrl}/joke/{string.Join(",", categories)}?{string.Join("&", parameters)}";
        Joke randomJoke;

        using (var httpClient = new HttpClient())
        {
            var json = await httpClient.GetStringAsync(requestUrl);
            randomJoke = JsonConvert.DeserializeObject<Joke>(json); **// Changed to incude Joke class after DeserializeObject method**
        }

        return randomJoke;
    }
}

public class Joke
{
    public string type { get; set; }
    public string joke { get; set; }
    public string setup { get; set; }
    public string delivery { get; set; }
    public int id { get; set; }
    public Flags flags { get; set; }
}

public class Flags
{
    public bool nsfw { get; set; }
    public bool religious { get; set; }
    public bool political { get; set; }
    public bool racist { get; set; }
    public bool sexist { get; set; }
}

}

@krchome I've added the explicit flag and safe property, could you please verify that I didn't mess anything up?

@krchome I've added the explicit flag and safe property, could you please verify that I didn't mess anything up?

@krchome I've added the explicit flag and safe property, could you please verify that I didn't mess anything up?
Everything still works fine except make 'e' capital in explicit as 'Explicit' since 'explicit' is a C# keyword

I am creating an MVC ASP.NET Core 5.0 app and wish to create the 'Try it out here' as an MVC view that generates the request URL and passes it to a JokesController to get the response (as we get here on your website).
Now since three of the filters: Categories, Response (format), and Joke Amount are not included in the Joke class, I am wondering if I need to create a ViewModel including these as properties and then use that model for model binding with the server-side action method code?
Any thoughts from you will be appreciated.
Thanks for creating this API for public use free of cost.

@krchome I've added the explicit flag and safe property, could you please verify that I didn't mess anything up?
Everything still works fine except make 'e' capital in explicit as 'Explicit' since 'explicit' is a C# keyword

I am creating an MVC ASP.NET Core 5.0 app and wish to create the 'Try it out here' as an MVC view that generates the request URL and passes it to a JokesController to get the response (as we get here on your website).
Now since three of the filters: Categories, Response (format), and Joke Amount are not included in the Joke class, I am wondering if I need to create a ViewModel including these as properties and then use that model for model binding with the server-side action method code?
Any thoughts from you will be appreciated.
Thanks for creating this API for public use free of cost.

Sorry but I don't know a thing about ASP.NET and what you described doesn't ring a bell to me.

Thanks for creating this API for public use free of cost.
Thank you for using it :)

Sorry but I don't know a thing about ASP.NET and what you described doesn't ring a bell to me.

Thanks for creating this API for public use free of cost.
Thank you for using it :)

Changed it to the following now and it seems to be working great:
using System;
using System.Threading.Tasks;
using System.Net.Http;
using Newtonsoft.Json;   // Install with NuGet Package Manager: https://www.nuget.org/packages/Newtonsoft.Json/12.0.3?_src=template

namespace TestHttpRequest
{
    class Program
    {
        static async Task Main(string[] args)
        {
            Console.Write("\n");

            Joke randomJoke = await GetJoke();
            if (randomJoke.type == "single")
            {
                Console.WriteLine(randomJoke.joke);
            }
            else
            {
                Console.WriteLine(randomJoke.setup);
                Console.WriteLine("...");
                System.Threading.Thread.Sleep(3000);
                Console.WriteLine(randomJoke.delivery);
            }

            Console.Write("\n");
        }

        public async static Task<Joke> GetJoke()
        {
            const string baseUrl = "https://v2.jokeapi.dev";
            string[] categories = { "Programming", "Miscellaneous", "Pun" };
            string[] parameters = {
                "blacklistFlags=nsfw,religious,racist,sexist",
                "idRange=0-100",
                "safe-mode",
                "lang=en"
            };
            string requestUrl = $"{baseUrl}/joke/{string.Join(",", categories)}?{string.Join("&", parameters)}";
            Joke randomJoke;

            using (var httpClient = new HttpClient())
            {
                var json = await httpClient.GetStringAsync(requestUrl);
                randomJoke = JsonConvert.DeserializeObject<Joke>(json);
            }

            return randomJoke;
        }
    }

    public class Joke
    {
        public string type { get; set; }
        public string joke { get; set; }
        public string setup { get; set; }
        public string delivery { get; set; }
        public Flags flags { get; set; }
        public int id { get; set; }
        public bool safe { get; set; }
        public string lang { get; set; }
    }

    public class Flags
    {
        public bool nsfw { get; set; }
        public bool religious { get; set; }
        public bool political { get; set; }
        public bool racist { get; set; }
        public bool sexist { get; set; }

        public bool @explicit { get; set; }
    }
}

On your website: https://sv443.net/jokeapi/v2/#getting-started
The two C# lines:
public async static Task GetJokeAdvanced()
and
randomJoke = JsonConvert.DeserializeObject(json);
should instead read:
public async static Task<Joke> GetJokeAdvanced()
and
randomJoke = JsonConvert.DeserializeObject<Joke>(json);
You likely just need to convert the < and > in your HTML to < and >.

Thanks for bringing that up. Could you elaborate on why it's necessary? I've run the code and it works fine, and the docs show both as valid (Task class without generic type and with a generic.
Also note that the code on the documentation is outdated. To see the latest version you can use the staging server at https://stage.jokeapi.dev/ or see this comment which should still be up to date iirc.

The code here: tage.jokeapi.dev has a GetJoke() method with Task<Joke> and compiles fine. If I leave off the <Joke> from the GetJoke() method, Visual Studio complains about the return statement trying to return a value. An async method must specify a Task data type if the method returns a value.
I don't think the deserialization function knows the type automatically... it must be explicitly stated, or you have to typecast:
randomJoke = (Joke) JsonConvert.DeserializeObject(json);

Alright thanks, I'll take a look at this again soon.


@WATCH@ James Charles Leaked Video Original Full Viral Video on Twitter Reddit

01 seconds ago — Where I can watch James Charles Full Video? WATCH HERE! Viral James Charles Full Video Instagram, Twitter (X), Discord.
James Charles Viral Video Click here to view Brace yourself for the most talked-about footage of the year!
Watch 🟢 ➤ ➤ ➤ 🌐 James CharlesFull Viral Video Link
🔴 ➤►DOWNLOAD👉👉 James Charles Full Viral Video Link
James Charles Leaked Video Oficial Tutorial Leaks on Twitter 17 aug 2024
James Charles video took the internet by storm and amazed viewers on various social media platforms. James Charles, a young and talented digital creator, recently became famous thanks to this interesting video.
First shared on TikTok, James Charles video quickly gained attention on other social media platforms and took her online presence to the next level.


[v1.13] envoy: Update to use source port in connection pool hash

Author backport of

[ ] #32270

Once this PR is merged, a GitHub action will update the labels of these PRs:
32270

/test-backport-1.13

/test-1.26-net-next

/test-1.18-4.19

/test-1.20-4.19


API Create resource doesn't set dublin core metadata

In hs_core/views/resource_api.pi (line 210), the create_resource function parses a dublin_metadata dictionary, but these values don't seem to be saved correctly in hs_core/hydroshare/resource.py (line 496)
Test by using the following dictionary for dublin_metadata:
{"Source": {"derived_data": "some value here"}}

@Castronova I believe this functionality has been added to REST API by @pkdash recently. Can you test and close this issue if it works now?

@Castronova Test and see if this can be closed.

@Castronova I am closing this.


Pipelinerun should be able to read value from a configMap

Pipelinerun should be able to read value from a configMap
Currently, you can specify only params but I'm looking to specify env for my use case. I have three tasks in pipeline. The final task publishes app externally after appending a specific string to the app-name. This string is coming from a configMap. I am hoping to pass this value to pipelinerun.
Steps to Reproduce the Problem

Try to reference a configMap key from a pipelinerun

Additional Info
Client Version: v4.2.7
Server Version: 4.3.18
Kubernetes Version: v1.16.2

Kubernetes version:

Client Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.6-beta.0", GitCommit:"e7f962ba86f4ce7033828210ca3556393c377bcc", GitTreeState:"clean", BuildDate:"2020-01-15T08:26:26Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.2", GitCommit:"e6f1cd7", GitTreeState:"clean", BuildDate:"2020-04-20T06:30:19Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

Tekton Pipeline version:

Client version: 0.8.0
OpenShift Pipelines Version: openshift-pipelines-operator.v1.0.1

https://tektoncd.slack.com/archives/CJ62C1555/p1590440461457000?thread_ts=1590170177.448200&cid=CJ62C1555

/kind feature
One workaround for now might be to pass in the configMap name and key name as params, and then have a step within the task that fetches the value from the configMap

If you only need access to the configMap value from one or a small number of steps in that task you could load the value using env + configMapKeyRef in the step definition: https://github.com/tektoncd/pipeline/blob/9fd0908070ccf8750a99a03fa444ce00e3be6090/examples/v1beta1/taskruns/configmap.yaml#L14-L25


Pyppeteer ready!

I've created pyppeteerUtils.py to be easy to modify all other scripts
I've created a HOW TO USE in pyppeteerUtils.py and added an example
I've implemented pyppeteerUtils in messageblast.py
I've modified wplay.py to accept pyppeteer for messageblast script, we need to put an await in the further scripts that we will change.
I worked hard, hope you enjoy!

@xandao6 Great work. This PR is having a lot of great work. It will take some time to checka and test all the scripts.

@xandao6 I have seen your active participation and quality of work in the project. Seeing your good quality of work I have sent you a collaborator invitation mail.
I hope we will make this software a great project. :)
WELCOME TO THE PROJECT!!

Thank you!

@xandao6 Great work. This PR is having a lot of great work. It will take some time to checka and test all the scripts.

Currently only messageblast was implemented with pyppeteer, I will send the commits of others soon.


Create a Ropsten Geth Server

Create a server that runs Geth node
The server should have enough storage for a Geth ropsten full node
The server should be run as a daemon (service)
The server's JSON-RPC 8545 port will be closed for outside world
The server's peer to peer port 30303 will be opened to the outside world
The server should sit within the same VPC as the other nightfall servers

IP is <IP_ADDRESS>

Services deployed here:
 clientApiUrl: 'https://client1.testnet.nightfall3.com', => port 8080
 optimistApiUrl: 'https://optimist1.testnet.nightfall3.com',  => port 8081
 optimistWsUrl: 'wss://optimist1-ws.testnet.nightfall3.com', => port 8082
 web3Url: 'wss://ropsten1.testnet.nightfall3.com' => port 8545
 web3WsUrl: 'wss://ropsten1-ws.testnet.nightfall3.com' => port 8546


Extend NixGL compat

As promised in my comment on nix-community/home-manager/pull/5355, here are the changes that make my use case work. I intend to dogfood this in the coming week.
I added a section to the user manual which explains why separate wrappers are needed. And, because there are two wrappers, I opted for removing default wrapping of firefox and kitty, at least for now. I believe this approach is simple enough for the user while being sufficiently flexible to cover both single-GPU and dual-GPU systems. Support for offloading to AMD dGPU is missing because I don't have such a system, but I see nothing that would prevent adding another wrapper if someone expresses the need and can test.
In the limited time I had, I focused on the functionality and user interface, but haven't checked conformance to the contributor guidelines. Sorry. I think we can fix that later. I'd like to get comments on the functionality first :)

@exzombie I've force-pushed to remove the default wrappers, if you wouldn't mind rebasing your branch that would make it a bit easier to review :)

This seems like it would be a better compromise between our two use cases, and like it would avoid introducing any limitations that would require custom user settings & conditionals to work around. For example, someone could have a single configuration module for graphical apps that includes both firefox and blender. They nixGL.wrap firefox and nixGL.wrapOffloaded blender.

I, too, maintain a single HM repo for multiple machines, both NixOS and non-NixOs. So, I'm well aware that there needs to be a way to configure things mostly the same but slightly differently. That's actually why I wanted to avoid defining a specific mechanism for this, as it seems to me that every user will have their own way of doing it. My intent was to provide wrappers, and allow the user to decide which wrapper to use in which situation.
That said, I can see the appeal of having a ready-made higher-level abstraction. I guess there's no harm in providing a primary+secondary wrapper mechanism, it would make it clear to users what the intended use is. But I'm pretty sure we should also give direct access to wrapper functions so that they can be used without indirection.
Speaking of wrapper functions, given the complexity of this stuff, there will have to be many. I thought we could provide just Mesa and Nvidia to start with and add others later as people ask for them, but I found that the offloading for Nvidia is complicated by the fact that there are different topologies, and what I provided will not work on all laptops. I'll see what I can come up with. I looked at the AMD offloading situation, and it seems it should be more straightforward.

Awesome!! Thanks for being willing to work with me on the interface. I love where it's at now, really does feel like the best combination of convenience and flexibility.
I tried testing your branch with my configuration, and I got this error when building emacs:
Warning, nixVulkanIntel overwriting existing LD_LIBRARY_PATH
/nix/store/ynz405a4ngxijdmdz1qjmfb0ffgigx98-emacs-pgtk-29.1/bin/emacs: /nix/store/xpxln7rqi3pq4m0xpnawhxb2gs0mn1s0-gcc-12.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.31' not found (required by /nix/store/7byfnpsk04l3q8rvvwc06acwjbkiy0j2-webkitgtk-2.42.4+abi=4.0/lib/libwebkit2gtk-4.0.so.37)
/nix/store/ynz405a4ngxijdmdz1qjmfb0ffgigx98-emacs-pgtk-29.1/bin/emacs: /nix/store/xpxln7rqi3pq4m0xpnawhxb2gs0mn1s0-gcc-12.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /nix/store/7byfnpsk04l3q8rvvwc06acwjbkiy0j2-webkitgtk-2.42.4+abi=4.0/lib/libwebkit2gtk-4.0.so.37)
/nix/store/ynz405a4ngxijdmdz1qjmfb0ffgigx98-emacs-pgtk-29.1/bin/emacs: /nix/store/xpxln7rqi3pq4m0xpnawhxb2gs0mn1s0-gcc-12.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.31' not found (required by /nix/store/7byfnpsk04l3q8rvvwc06acwjbkiy0j2-webkitgtk-2.42.4+abi=4.0/lib/libjavascriptcoregtk-4.0.so.18)

It looks like the vulkan wrapper is overriding LD_LIBRARY_PATH with an incompatible version of GLIBC? I'll try and dig in to nixGL to get some more useful info, but I wonder if this is a sign that maybe wrapping with vulkan by default could make the wrappers work a little less consistently.

 I'm glad nixGL is finally moving towards inclusion in HM.
Despite the fact that the warning uses the word "overwriting", I'm pretty sure it's just prepending, and not really throwing away the library path. If it's really the wrapper who pulls in an incompatible glibc (does the unwrapped package work?), it would mean that the libraries used by nixGL come from a different version of nixpkgs. Did you ensure that the nixGL input in your flake uses the same nixpkgs as HM? I can't reproduce this with 23.11
BTW, why are you wrapping emacs? Not that it matters for this problem, a wrapped package should always work, I'm just curious because I thought emacs didn't use a GPU.

Hey @exzombie, I wish I hadn't taken so long to get back to you but life's been very busy. I'm still interested in merging your improvements before the nixgl module gets into home-manager, I just didn't want to add any blockers to the functionality getting merged. If we can get this ready before then, that would be great!
I wrapped emacs just out of an abundance of caution, trying to get as much performance out of it as possible. I'm using PGTK and I wasn't sure whether that could hardware accelerate rendering or not. Maybe it isn't actually helping, but I agree that the wrapper should avoid breaking packages as much as possible. I can confirm that my configuration builds and emacs runs on your branch when i unwrap emacs, all else being equal.
I believe everything is coming from the same version of nixpkgs, so I'm not sure what's causing the version mismatch. Here's my setup:
    # relevant flake inputs
    nixpkgs-ubuntu.url =
      "github:nixos/nixpkgs?rev=5ba549eafcf3e33405e5f66decd1a72356632b96";

    hm-ubuntu.url =
      "github:exzombie/home-manager-smona?rev=2b3674b62286dde05d0fcd816ee90b9f30003559";
    hm-ubuntu.inputs.nixpkgs.follows = "nixpkgs-ubuntu";

    nixGL.url = "github:guibou/nixGL";
    nixGL.inputs.nixpkgs.follows = "nixpkgs-ubuntu";

  # emacs.nix
  my-emacs = (config.lib.nixGL.wrap
    ((pkgs.emacsPackagesFor emacs).emacsWithPackages
      (epkgs: [ epkgs.vterm epkgs.pdf-tools ]))).overrideAttrs (oldAttrs: {
        # Temporarily working around this issue: https://github.com/NixOS/nixpkgs/issues/66706
        # TODO: submit upstream fix
        buildCommand = oldAttrs.buildCommand + ''
          ln -s $emacs/share/emacs $out/share/emacs
        '';
      });

I also tried updating nixGL to the latest version, which unsurprisingly didn't help. I have to pin a relatively old nixpkgs commit to maintain compatibility with Ubuntu's version of gnome, but I'm not sure where the incompatible GLIBC version could be sneaking in from. I will try to find some time to investigate further, but perhaps another option would be to omit the vulkan wrapper for now, or make it opt-in.
This PR also needs to be rebased/merged with the updates to the wrapper script from other reviews on the base branch.

Today, I finally found the time to update my systems to 24.05. Now, I'm encountering the same problem. In my case, it manifests when a wrapped program tries to run executables from the host system, which fails because of missing glibc symbols. This is most unfortunate. I don't mind making Vulkan optional for now in order to not hold back this PR. However, I fear that OpenGL wrapping could cause similar issues when the stuff from nixpkgs deviates further from the stuff on the host system. In fact, I wonder why it doesn't cause trouble already ...

I squashed when rebasing, and applied ./format. Vulkan is now optional and disabled by default. I'm not entirely happy with the makeWrapper thing: it requires a single executable as wrapper, so, I added an intermediate wrapper. I don't think that's any nicer than what we had before. But let's see what the reviewers say.

I take it that this PR would needs to be merged first ideally and then in turn we would be in a good place to merge upstream ? Maybe we should ask more people to test this branch, as I believe most are focused on the main branch that would land upstream

I think this is ready to merge, just want to think it over for another day or so since there's a lot going on here. would you mind if I revise the docs a bit post-merge?

Go right ahead!


I'm new. Can we  generate a images by using 2 GPUs at once ? As a comfyUI's default workflow by use case? Thank you

I'm new. I'm curious.
Can we  generate a images by using 2 GPUs at once ? As a comfyUI's default workflow by use case? Thank you
Or it is use for generate  batch images?
like generate  4 images at once, we can use multi gpu to separate tasks to each GPU and do it ？ It seems like that .

This repo can only do batch processing, so with two GPUs you will get two output images. As you say, with 4 GPUs you can split them - 2 on each GPU, 3 on the first 1 on the second, etc. You can also change the batches, doing multiple images on the same GPU.
I want to try and make it so two GPUs can work on the same image via tiled sampling, but that is currently not implemented.

I get it. Thanks for your hard work!


Externalise festival/year list

I'm conscious that currently adding a new festival or adding a year to an existing festival requires a code change, push to repo, pull from repo your end, recompile, restart and cache warm.
I plan to add quite a lot of European festivals to add. As a result I was thinking it would help to externalise the festival list from pages.ts, possibly just in a simple txt file so that it can be updated alongside the lineup file. The cache warming script could use the same source.
This would mean that a new festival or lineup could be updated with simple txt file changes, no rebuild required. Potentially these could also be supplied via a route other than the main repo in future. A local-only API endpoint could be added to trigger the reload of the festivals text file. That would potentially open the door to automating some more of the process in future.
If you agree with the direction of travel I can start on a PR.

So the pull request referenced covers off your first paragraph and is a small step on the way.
Thanks for the feedback on the idea more generally- I will respond properly to this shortly when I get the time to finish thinking it through

Some work towards this is now in #46, in that festival-level data can be included in a lineup file. However, it's not currently used to dynamically add/update a festival (though the slug name and year are checked for consistency)


Host admin can still access financial data for previously hosted accounts

User story
As a host admin, I need to be able to access full details of a Collective's transactions and expenses, even if it has been archived, so that I can gather historical information for things like tax reporting.
Best solution for this problem
To the public, archived Collectives stay as they are now, but to the host admin, they display all the data available for active Collectives, with some visual indication that the Collective is in fact archived and all the action buttons inactive.
P2 low frequency, high impact

I think we already display historical financial data for archived collectives? Like this one for example https://staging.opencollective.com/atomex#category-BUDGET the budget section is there. The transactions page is also accessible.
The only thing is that the transactions/expenses page don't show clearly that the collective is archived.

I was trying to look into past expense for https://opencollective.com/justice-reskill and I can't access anything.

Thanks for the link, there's indeed a specificity with the expenses page that we need to address

@Betree this still isn't working for me but perhaps it just hasn't been deployed yet?

The bug indeed seems to be still there for https://opencollective.com/justice-reskill. I'll need to dig further

So the fix from https://github.com/opencollective/opencollective-frontend/pull/7382 did solve most cases.
The reason why it did not work for justice-reskill is that they've hidden their budget (only funds and projects are allowed to hide their budget/transactions history). Now of course, as a fiscal host admin, you should be allowed to see these past transactions and expenses when it's an account you've hosted in the past.
It's not a simple fix, as the place we're looking for these permissions in the frontend doesn't have this kind of history. I can suggest adding something along those lines to a new Account.permissions field that we'd use in the frontend:

Specs details
const Account = {
  ...
  permissions: {
    seeFinancialData: {
      async resolve(account) {
        if (hasBudgetSection(account)) {
          return true;
        } else {
          return isAdmin(account) || isHostAdmin(account) || await isAdminOfPreviousHost(account);
        }
      }
    }
  }
}

The isAdminOfPreviousHost part is the tricky one, as we have no quick way to see that. Maybe the best option is to list the unique HostCollectiveId from the transactions table?

@alanna If a hot fix is needed, I can propose to always allow access to financial data for root users.

Yes please do the hot fix. There is a dispute involving this collective and
we need access to historical data.

Message ID: @.***
com>

@alanna The hot fix is live

Here is another User Story related:
As a host Admin, I need to access all the details of past paid expenses (including the attachment). Even if expenses are part of an archived project. This is important as I have to report to my accountants the address and the tax details of the payee, which are often only available on the attachment.
Example with this expense where I can't access the attachment

Another related situation is that hosts need to be able to access full records for Collectives that were previously with that Host but have since moved to a new Host. I need to be able to access everything from when the Collective was under my Host.

@Betree we need to give access to this archived Collective's expenses to people with "accountant" team role. Can this please be enabled? We need to let them review transactions pretty urgently for this specific case.

The fix for root users was an easy one because we don't need to check permissions against the collective, we just allowed them to access the data of any archived collectives.
Now solving that for accountants basically means solving this issue: like for admins, we have to check the permissions against this specific collective. The root problem is that we remove the host when archiving, so it's not straightforward to check this permission. More info in https://github.com/opencollective/opencollective/issues/5137#issuecomment-1023058302.
@alanna Is there another way we could solve this? How many collectives are we talking about? Which parts do the accountants need access to (view transactions? download PDFs?)?

The real issue is a pretty deep one - at some level transactions/expenses
belong to the host as much as the collective, as in if a transaction goes
through while a collective is with a given host, that transaction always
needs to maintain association with that host because it went through their
bank account, even if the collective moves hosts later, or is archived.
It's for reasons like we have now - there's an issue and we have to look at
the transaction record historically. Our lawyer and accountant need to be
able to review everything, including transactions, expenses, and expense
attachments.
We absolutely need this for tax reporting as well. When OCF is audited for
2021, how will we provide access to receipts for expenses of collectives
who have been archived or moved hosts in the meantime? We are legally
obligated to maintain these records as a host, and our auditors must be
given access. The way they work is through randomly selecting transactions
and then digging up every detail about them, including stuff like Updates
associated with the Collective the expense is for, etc etc. If they can't
do this through the platform it's going to be painful.
For the urgent issue of this particular investigation, I have created a
data export from metabase for the lawyer, and I should be able to dig out
related attachments, etc, if needed. But she wants to be able to review
when the expense was submitted, by whom, when it was approved, and by whom,
and when and how it was paid. This level of detail is hard to achieve with
metabase, and of course is not accessible to third party hosts, so it's not
really a solution.

The specs proposed in https://github.com/opencollective/opencollective/issues/5137#issuecomment-1023058302 can be a good fix. It's not perfect, as it will basically allow host admins/accountants to access all financial activity of collectives they have hosted in the past (including what happened with the new host), whereas we would want something more like accessing only the activity for the period when they were hosted.
I can try to prioritize in the next few weeks if it's time sensistive.

If the lawyer is OK with the data export, then this is less urgent. I'll report back soon. Long term we do need to solve this though, especially before OCF does its 2021 audit in a couple months.

We got another request for this on support

The Activity Log is partially going to solve this issue: with https://github.com/opencollective/opencollective/issues/5808 we're going to associate the host account with the activity, which means it will continue to appear in the host's activity log even if the collective changes host.


Dynamic Message support?

Does the dynamic message supported in ProtoBuf?
If not, is there any better solution to can emulate message types which are not known at compile-time?
For example, there are several messages type defined as below
message msg1
{
    require string version = 1;
    require int type = 2;
    optional string data = 3;
    //...
}

message msg2
{
     require string version = 1;
     require int type = 2;
     optional string time = 3;
     //...
}

How can I distinguish those two different message in recipient application?

That's not supported yet. A clean approach would be to use a container message, like in: https://github.com/dcodeIO/ProtoBuf.js/blob/master/examples/protoify/json.proto

Thank you very much


Support to edit Service 'Active Until' date field

Hiya!
In the Alma e-collection quick update Cloud App, would it be possible to introduce support to edit (clear / replace) the 'Active Until' date .  We have a situation where 18 collections of JSTOR content that were made freely available during the pandemic were due to have access end on 30th June 2021, but it has been pushed back to 30th June 2022.  If a situation like this crops up again, it would be great to be able to change these in bulk.
Thanks,
Fiona

Hi @fionatinto - thanks for your request. We added these two fields in the latest release. Let us know if there are any issues.

Josh,
Thanks very much for this!  I've tested.  Clearing the date works fine.  When I replace the 'Active Until' date though, it is consistently entering a date 1 day prior to the date I selected from the calendar in the cloud app.  I've attached screenshots.  Is this a bug ; or is this deliberate in that it's saying 'if you want it to be inactive by on e.g. 31st June then the date you need to enter in Alma is 30th June'?  (Or is this just an error and I'm really overthinking it....?  I get in such a fankle trying to work out whether stuff switches off at midnight at the beginning of  date or the end of a date.... )
Support to edit Service 'Active Until' date field - attachment 05-07-2021.docx
Ta,
Fiona

Thanks- checking.....

Thanks for pointing this out @fionatinto . I think we've squashed that bug. Let us know if you still see an issue.


Documentation out of date

The documentation is out of date, I tried to follow it to install using the bash scripts and the deploy script failed while trying to pull the manifest file.

Updated docs to refer to mig-operator for installation, removed stale bash scripts


Preview: environment maps

Closing in favor of https://github.com/webaverse/app/issues/625.
The preview server will get this automatically, modulo caching (https://github.com/webaverse/app/issues/669).

Closing in favor of https://github.com/webaverse/app/issues/625.
The preview server will get this automatically, modulo caching (https://github.com/webaverse/app/issues/669).


Better handle access tokens

We don't store access tokens, they are lost every restart of Home Assistant.
I still don't want to store access tokens. They change too often.
Instead I suggest that we make the access tokens JWT tokens signed with the refresh token.
That way we can check validity without having to keep track of them.

Do we ever need revoke/invalid one or all access_token?

We will add support for revoking refresh tokens.

Just to expand a bit more on my last comment: revoking a refresh token will revoke all access tokens it ever created.


Implement a Trie and use that for path prefix-matching

Is your feature request related to a problem? Please describe.
Prefix matching is needed in many places like:

Quickly decide which mount point a path is under
Sub-tree cutting while traversing a tree

Currently the prefix matching is often done with comparing path strings.
Describe the solution you'd like
A Trie may be helpful in size and performance. Imagine a path /a/b/c/d. It can be translated into
a -> b -> c -> d

which is exactly how an Alluxio path is made up of by Inodes and Edges.
Then a Trie will be
root inode - a - b - c - d
            |        |- ...
            |----- ..

To save space, each node in the trie will store the inode ID instead of name. Sure we can keep a reference to the inode.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Urgency
Explain why the feature is important
Additional context
Add any other context or screenshots about the feature request here.

Compared to the existing method PathUtils.hasPrefix:
public static boolean hasPrefix(String path, String prefix)

The API should be
public static boolean hasPrefix(LockedInodePath path, LockedInodePath prefix)

where each LockedInodePath contains a list of inodes, and we can find the inodeId out of each Inode.
Typically the prefix parameter is an Alluxio path, and we can use LockedInodePath instead of a String.
Then in the MountTable class we can keep a Trie of all the mount points in Alluxio. Then it will be much easier to quickly find if a path belongs to a mount point.

Whenever we check hasPrefix(String path, String prefix), the two paths are typically both from LockedInodePath. For example here the paths are from LockedInodePath parameters. This is almost always the norm in our code.

The usages of hasPrefix(String path, String prefix) can be concluded into 3 cases:

Handling external events and commands
In this case, two parameters, path and prefix come from the raw strings in the events and commands, or are extracted from AlluxioURI, which is just an encapsulation of a string literal. For example:

    // DistributedCpCommand.java
    // ...
    String[] args = cl.getArgs();
    AlluxioURI srcPath = new AlluxioURI(args[0]);
    AlluxioURI dstPath = new AlluxioURI(args[1]);
   // Here, `path` and `prefix` are extracted from the `srcPath` and `dstPath`
  // And these two AlluxioURI are constructed just from string arguments.
    if (PathUtils.hasPrefix(dstPath.toString(), srcPath.toString())) {
      throw new RuntimeException(
          ExceptionMessage.MIGRATE_CANNOT_BE_TO_SUBDIRECTORY.getMessage(srcPath, dstPath));
    }

Therefore, I think the string-comparison hasPrefix is fine in these situations, since it will be costly to construct 2 Trie trees and compare them.

Checking the relationship of internal paths
In this case, path and prefix come from two internal data structures, which contain the data members that describe the route from root Inode to current Inode. For example:

    // DefaultFileSystemMaster.java
    // ...
    // Renaming a path to one of its subpaths is not allowed. Check for that, by making sure
    // srcComponents isn't a prefix of dstComponents.
    // here, dstInodePath and srcInodePath are two internal paths, which have InodeLockList member variable
    // which contain the route from root Inode to current Inode.
    if (PathUtils.hasPrefix(dstInodePath.getUri().getPath(), srcInodePath.getUri().getPath())) {
      throw new InvalidPathException(ExceptionMessage.RENAME_CANNOT_BE_TO_SUBDIRECTORY
          .getMessage(srcInodePath.getUri(), dstInodePath.getUri()));
    }

In this situation, the Trie-traversal-comparison hasPrefix will be profitable on space and time. And to minimize the space usage, I think a new member function defined like hasPrefix(LockedInodePath) can be added to the class LockedInodePath.

Global MountTable maintenance
In this case, MountTable instance will call hasPrefix many times in order to verify the relationship between existed alluxioPath and ufsPath, and newly-added alluxioPath and ufsPath. For example:

          // MountTable.java
          // Here, ufsPath is the string literal of the about-to-mount ufsUri,
          //   and mountedUfsPath is the string literal of mounted ufsUri
          if (PathUtils.hasPrefix(ufsPath, mountedUfsPath)) {
            throw new InvalidPathException(ExceptionMessage.MOUNT_POINT_PREFIX_OF_ANOTHER
                .getMessage(mountedUfsUri.toString(), ufsUri.toString()));
          }

Just like the case 1, it is unwise to construct a Trie route from these string literals, but a new member variable can be added to MountTable. This new variable can maintain the Trie of the Alluxio FS namespace and Trie of other mounted UFS. hasPrefix can be speeded up by looking through these Tries, and there will be some overheads when maintaining these Tries. I will suggest a more detailed strategy for this case.

MountTable currently provides 2 modified methods:

void add(Supplier<JournalContext> journalContext, AlluxioURI alluxioUri, AlluxioURI ufsUri,    long mountId, MountPOptions options)
boolean delete(Supplier<JournalContext> journalContext, AlluxioURI uri,    boolean checkNestedMount)

I checked the places where these two methods are called, and found that both two methods are called only in DefaultFileSystemMaster, and the calling contexts do contain the LockedInodePath. For example, according to the implementation of mountInternal in DefaultFileSystemMaster:
private void mountInternal(Supplier<JournalContext> journalContext, LockedInodePath inodePath,
      AlluxioURI ufsPath, long mountId, MountContext context)
      throws FileAlreadyExistsException, InvalidPathException, IOException {
    // The AlluxioURI is extracted from inodePath here
    AlluxioURI alluxioPath = inodePath.getUri();
    // ...
    try {
      // ...
      // MountTable.add is called here, and the alluxioPath and ufsPath are passed as two string parameters
      mMountTable.add(journalContext, alluxioPath, ufsPath, mountId, context.getOptions().build());
    } catch (Exception e) {
      // ...
    }
  }

alluxioPath was first extracted from inodePath, then was passed two mMountTable.add. The implementation of unmountInternal is similar.
So My point is that it is eligible to overload the add and delete, switch the parameter AlluxioURI alluxioUri to LockedInodePath alluxioUri, and implement based on the global alluxio path Inode Trie in MountTable.

After examining LockedInodePath, I found two interesting things:

LockedInodePath cannot guarantee that it has the up-to-date inode list.
LockedInodePath has a member variable called mPathComponents.

I think the target of implementing Trie<Long>  is to reduce the iteration times, since PathUtils.hasPrefix will travel through the two path literals. And now we already have mPathComponents, which contains each inode's name along the path. So why don't we directly add a new method that can get mPathComponents of each path and then compare them?

Inside LockedInodePath, there are two member functions that will make inodes synchronized with mPathComponents:

void traverse()
void addNextInode(Inode inode)

traverse() is called in two class: InodeSyncStream and InodeTree:

InodeSyncStream calls traverse in sync method, which sync the metadata, and in loadFileMetadataInternal and loadDirectoryMetadata;
InodeTree calls traverse in lockInodePath, which locks existing inodes on specified path and LockPattern, and in ensureFullInodePath.

addNextInode is called mainly in InodeTree:

InodeTree calls addNextInode in createPath, which creates a new path based on previous LockedInodePath and extends the locks.

To optimize the MountTable, I think we can build a Trie for each ufs path.
According to current implementation, when we want to add a new entry <mountPoint(AlluxioUri), ufsPath>, we need to iterate over all existing entries in mountTable, check whether the parent path of ufsPath has already been mounted by calling hasPrefix, therefore the time complexity is O(n*m)(n is the number of entries, m is the length of ufsPath).
However, if there is a coordinating Trie of the ufs, which memorize the mounted ufs paths and their mount points, we don't need to iterate the hole mountTable at all, and we can just travel the ufs Trie from the root to see if the parent of ufsPath has already been mounted. The time complexity can be reduced to O(m).

Also, I think we can build a Trie for the mountPoints(AlluxioUri) too.
Since in some methods of MountTable class, we need to find the children mount points of a specified alluxioUri. And in current implementation, we still have to iterate over all entries and call hasPrefix to check if the specified alluxioUri is the parent of any mount points.
If we have a Trie that can store mount points, just like the above comment, we can avoid iterate over all mount points.

For now, MountPointInodeTrieNode<T> is defined and completed. But I think we still need to discuss how to add it to MountTable, to be more specific, which T we should use.
From the perspective of performance, MountPointInodeTrieNode<T> is not a cache which tolerates misses, instead, it is a new mechanism used to substitute costly iterations in current implementations of MountTable. Thus, the MountPointInodeTrieNode<T> root node, if added in MountTable, should save the up-tp-date mount points. In other words, we need to maintain it when updating, deleting and recovering MountTable.
So how to choose T? I think there are 3 options:

String, MountPointInodeTrieNode<String>

pros: since current implementations use String as the type of mount point, MountPointInodeTrieNode<T> can avoid lots of cascaded changes. And most importantly, since mState will journal mount points as String, it can guarantee  that the mount points are up-to-date with journals without changing mState and related journal formats.
cons: String still involves comparison of relatively high time complexity comparing to Long.

Long, MountPointInodeTrieNode<Long>

pros: since there will be lots of comparison when calling methods including add, update, getMountPoint,and containMountPoints, Long` can achieve the best performance in both time and memory consumption.
cons: we need to change mState and corresponding journal entries. Also, when theMountTable is constructed, we need to make sure that root inode's inodeID is determined first. This will involve some changes in DefaultFileSystemMaster and other classes that use MountTable.

InodeView, MountPointInodeTrieNode<InodeView>

pros: similar to Long, using InodeView can guarantee the performance of new implementations. Besides, since InodeView stores more information like the name of inode, we can keep the previous interfaces and definitions intact.
cons: same with Long

@jiacheliu3 i guess this issue is still alive and @voddle is working on it correct? can you confirm?


Fails to create instance when using AWSRequest sigining

I have specified aws_region:us-west-2 in my config.yaml. I have access policy assigned to my AWS ES instance that allows access from IAM role assigned to the instance where I'm running elastalert container. But i get error when creating index:
elastalert-create-index --index elastalert_status --old-index ""

Creating Elastalert index in Elasticsearch...
Traceback (most recent call last):
  File "/usr/local/bin/elastalert-create-index", line 9, in <module>
    load_entry_point('elastalert==0.0.85', 'console_scripts', 'elastalert-create-index')()
  File "/usr/local/lib/python2.7/dist-packages/elastalert-0.0.85-py2.7.egg/elastalert/create_index.py", line 80, in main
    send_get_body_as=send_get_body_as)
  File "/usr/local/lib/python2.7/dist-packages/elasticsearch/client/__init__.py", line 150, in __init__
    self.transport = transport_class(_normalize_hosts(hosts), **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/elasticsearch/transport.py", line 113, in __init__
    self.set_connections(hosts)
  File "/usr/local/lib/python2.7/dist-packages/elasticsearch/transport.py", line 166, in set_connections
    connections = map(_create_connection, hosts)
  File "/usr/local/lib/python2.7/dist-packages/elasticsearch/transport.py", line 165, in _create_connection
    return self.connection_class(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/elasticsearch/connection/http_requests.py", line 35, in __init__
    http_auth = http_auth.split(':', 1)
AttributeError: 'AWSRequestsAuth' object has no attribute 'split'

According to #551 you can fix this by upgrading setuptools and the elasticsearch library
pip install setuptools
pip install elasticsearch==1.7.0
Also listed that may need upgrading are mock, pbr, requests-oauthlib and configparser

@Qmando Thanks for the help. Updating elasticsearch to 1.7 gets me further but now i get auth error:
Creating Elastalert index in Elasticsearch...
/usr/local/lib/python2.7/dist-packages/elasticsearch/connection/http_requests.py:53: UserWarning: Connecting to https://XXX:443 using SSL with verify_certs=False is insecure.
  'Connecting to %s using SSL with verify_certs=False is insecure.' % self.base_url)
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:821: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
Traceback (most recent call last):
  File "/usr/local/bin/elastalert-create-index", line 9, in <module>
    load_entry_point('elastalert==0.0.85', 'console_scripts', 'elastalert-create-index')()
  File "/usr/local/lib/python2.7/dist-packages/elastalert-0.0.85-py2.7.egg/elastalert/create_index.py", line 107, in main
    if es_index.exists(index):
  File "/usr/local/lib/python2.7/dist-packages/elasticsearch/client/utils.py", line 69, in _wrapped
    return func(*args, params=params, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/elasticsearch/client/indices.py", line 224, in exists
    params=params)
  File "/usr/local/lib/python2.7/dist-packages/elasticsearch/transport.py", line 307, in perform_request
    status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
  File "/usr/local/lib/python2.7/dist-packages/elasticsearch/connection/http_requests.py", line 78, in perform_request
    self._raise_error(response.status_code, raw_data)
  File "/usr/local/lib/python2.7/dist-packages/elasticsearch/connection/base.py", line 105, in _raise_error
    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.AuthorizationException: TransportError(403, u'')

I also tried the following suggestions from @Gittyhub in issue #551
pip install -U setuptools
pip install -U mock
pip install -U pbr
pip install -U requests-oauthlib

As well as update in requirements.txt
configparser==3.5.0
elasticsearch==1.7.0

but still get the above error.

I skipped the upgrade step for setuptools, mock, pbr & requestspoauthlib and just updated configparser and elasticsearch and now it works. Thanks for all the help @Qmando  & @Gittyhub

:+1: