opening enable_cuda_graph only support two different size image when reference

Thank you for your excellent work on this project, @chengzeyi.
We have integrated the project into our cloud service, which has resulted in significant speed improvements. However, we recently encountered a specific issue. When enabling enable_cuda_graph, the project functions well with images of the first and second size. However, upon changing the image size to the third, it consistently throws an exception.
Our environment setup includes:
torch: 2.2.0
cuda: 11.8
stable_fast: 1.0.4 wheel
xformers: 0.0.24
python: 3.10
Below is the exception log along with additional logging information:
2024-04-10 02:21:19,103 - graphs.py:38 - INFO - Dynamically graphing RecursiveScriptModule
2024-04-10 02:21:27,405 - graphs.py:130 - ERROR - CUDA error: operation failed due to a previous error during capture
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/sfast/cuda/graphs.py", line 127, in make_graphed_callable
    static_outputs = func(*static_inputs,
  File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
RuntimeError: CUDA driver error: operation not permitted when stream is capturing

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/sfast/cuda/graphs.py", line 124, in make_graphed_callable
    with torch.cuda.graph(fwd_graph,
  File "/opt/conda/lib/python3.10/site-packages/torch/cuda/graphs.py", line 183, in __exit__
    self.cuda_graph.capture_end()
  File "/opt/conda/lib/python3.10/site-packages/torch/cuda/graphs.py", line 81, in capture_end
    super().capture_end()
RuntimeError: CUDA error: operation failed due to a previous error during capture
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

To address this issue, we've added additional logging to the code, as shown below:
in \python3.10\Lib\site-packages\sfast\cuda\graphs.py 32 line add the log
    @functools.wraps(wrapped)
    def dynamic_graphed_callable(*args, **kwargs):
        if isinstance(func, torch.nn.Module):
            training = getattr(func, 'training', False)
        elif hasattr(func, '__self__') and isinstance(func.__self__,
                                                      torch.nn.Module):
            training = getattr(func.__self__, 'training', False)
        else:
            training = False
        key = (training, hash_arg(args), hash_arg(kwargs))
        logger.info(f"dynamic_graphed_callable key:{key}")
        cached_callable = cached_callables.get(key)
        if cached_callable is None:
            with lock:
                cached_callable = cached_callables.get(key)
                if cached_callable is None:
                    logger.info(
                        f'Dynamically graphing {getattr(func, "__name__", func.__class__.__name__)}'
                    )
                    cached_callable = simple_make_graphed_callable(
                        func, args, kwargs)
                    cached_callables[key] = cached_callable
        return cached_callable(*args, **kwargs)
line 130  added the log
    try:
        with execution_env.lock:
            with torch.cuda.device(execution_env.device), torch.cuda.stream(
                    execution_env.stream):

                with torch.cuda.graph(fwd_graph,
                                      pool=execution_env.mempool,
                                      stream=execution_env.stream):
                    static_outputs = func(*static_inputs,
                                          **static_kwarg_inputs)
    except Exception as e:
        logger.exception(e)
        logger.error('Failed to capture CUDA Graph, please try without it')
        raise

The issue seems to occur upon the third logging of "Dynamically graphing RecursiveScriptModule," leading to a service disruption. We're actively finding a solution and appreciate any assistance.
Thank you very much.

@zhangp365 CUDA Graph capture has one implicit law: During capturing, only one thread can utilize the GPU and execute computation one the GPU device. This is designed by NVIDIA. So you need to modify your program to adopt a single thread pattern or use create a critical section to respect their law.

Thank you very much for your reply.
I have searched for a solution. Actually, I found that CUDA supports updating the image size of the CUDA graph, but there is no interface function to update the parameters in PyTorch. Are there any other ways we can update the size before inference?


[Fix #13364] Fix incorrect autocorrect with Lint/UselessAssignment a multiple assignment or for contains an inner assignment

With code such as:
a, b = func(c = 3)
[a, b]

Lint/UselessAssignment was previously considering the inner assignment (c = 3) to be part of the multiple assignment for autocorrection. This changes it to not consider assignment inside a method argument to be part of the containing meta_assignment_node for masgn and for nodes.
Fixes #13364.

Before submitting the PR make sure the following are checked:

[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Wrote good commit messages.
[x] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
[x] Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

Thanks!


OCPBUGS-24400: Recover the ETCD member on HostedCluster boot

Eventually, the ETCD deployment encountered issues booting when many HostedControlPlanes were being created. This caused one or more members to get stuck while trying to join the cluster but unable to do so. Once a pod is stuck in CrashLoopBackOff, the script will now create a snapshot and then remove the member folder, allowing the member to be properly formed and added to the cluster on the next attempt.
Which issue(s) this PR fixes:
Fixes #OCPBUGS-24400

/hold

/retest

/retest

/retest

docker custom image: quay.io/jparrill/hypershift:OCPBUGS-24400 for testing.

/retest


Api/v2

@joeljunstrom you need to set environment variables in Travis CI:
EGREE_API_KEY and EGREE_API_SECRET
You can create/find them here: https://test.egree.com/a/account/api

Hey!
To release a v2 compatible client (even with a subset of functionality) I think we need to ensure that we support:

All new case properties
All new options when creating cases (including templateId and the new EventCallback structure)
Creating a case from a template (support the createcasefromtemplate endpoint`)
Remove all v1 properties that still exists in the code base (CaseReferenceId etc)

Another thing is to decide how we want to handle responses from Egree. Since we do not get a simple url back from a specific call I think we should either just use raw hashes (as it is now with the get_case response) or support read only representations (ie. RemoteCase?) as ruby objects.
Initially I wanted to hide the internals of the egree structure as much as possible since I found it to a bit awkward (creating cases payload includes both properties on the actual case and options surrounding how the process should be handled) and I do not generally like to deal with hashes as data objects, especially when we do not control the structure of them.
What do you think?
Regarding the credentials, I've had them in the .travis.yml so far. I added them to Travis now even though just rebuilding does not seem to use them. I should probably ask for a test user for this client instead of using a personal one.
How would you like to proceed? Should we merge this as a beginning of a v2 release and continue in that branch?

Hi, I'm interested in the v2 functionality and have some time today and next week to contribute. How can I best get started?

Hey! That would be great.
I'll merge this as a starting point. Please make a pr against this branch with anything you feel up to that I mentioned in the comment above. I'm out and about today but I'll probably sit down with this in the weekend.

Sounds good! If you can make the merge soon I'll be able to put in an hour today, otherwise it'll be after the weekend...

Yea sorry, apparently you can't merge PR's with failing CI from a cell phone o.O

Merged and I'm creating a few issues to track what's needed


Maintainers have an automated migration and update tool

Script that compares keys of schema.json file and updates it

This compares two JSONs of any shape


Scrcpy KDE Plasmoid

[x] I have checked that a similar feature request does not already exist.

I'd love to see a scrcpy KDE widget (plasmoid).
Like any other plasmoid it would sit on the desktop but not as a window.

Seems like it would be a better fit as a KRdc plugin :)


Ensure that all needed imports are tracked in reconciler generator

Currently it is possible for the generator to omit these imports, although this behavior appears to depend on the generator dependency versions.

/assign @n3wscott

/lgtm
/approve
Thanks for the cleanup!!

Thanks for reviewing! Reassigning to Matt for approval.
/assign @mattmoor


Error on require gem

When running any lane on latest fast lane an error is thrown when trying to include a gem.
We are including the 'rest-client' gem to do a github comment when builds finish.
The 'rest-client' gem is listed in our Gemfile, and installed.
Thanks for any help.
$ fastlane --version
fastlane 1.41.0
$ gem list | grep rest
rest-client (1.8.0)

The error message is:
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require': cannot load such file -- rest-client (LoadError)
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
	from Fastfile:18:in `parsing_binding'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/fastlane-1.41.0/lib/fastlane/fast_file.rb:48:in `eval'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/fastlane-1.41.0/lib/fastlane/fast_file.rb:48:in `block in parse'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/fastlane-1.41.0/lib/fastlane/fast_file.rb:37:in `chdir'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/fastlane-1.41.0/lib/fastlane/fast_file.rb:37:in `parse'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/fastlane-1.41.0/lib/fastlane/fast_file.rb:27:in `initialize'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/fastlane-1.41.0/lib/fastlane/lane_manager.rb:12:in `new'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/fastlane-1.41.0/lib/fastlane/lane_manager.rb:12:in `cruise_lane'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/fastlane-1.41.0/lib/fastlane/command_line_handler.rb:31:in `handle'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/fastlane-1.41.0/bin/fastlane:35:in `block (2 levels) in run'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/runner.rb:68:in `run!'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/fastlane-1.41.0/bin/fastlane:152:in `run'
	from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/fastlane-1.41.0/bin/fastlane:158:in `<top (required)>'
	from /usr/local/var/rbenv/versions/2.2.3/bin/fastlane:23:in `load'
	from /usr/local/var/rbenv/versions/2.2.3/bin/fastlane:23:in `<main>'

(Note: this error is not generated on fast lane 1.39.0)
Fastfile
# Customise this file, documentation can be found here:
# https://github.com/KrauseFx/fastlane/tree/master/docs
# All available actions: https://github.com/KrauseFx/fastlane/blob/master/docs/Actions.md
# can also be listed using the `fastlane actions` command

# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`

# By default, fastlane will send which actions are used
# No personal data is shared, more information on https://github.com/fastlane/enhancer
# Uncomment the following line to opt out
# opt_out_usage

# If you want to automatically update fastlane if a new version is available
require 'rest-client'

fastlane_version "1.39.0"

default_platform :ios

def load_env(the_env) Dotenv.overload ".env.#{the_env.to_s.downcase}" end

platform :ios do
  before_all do
    ENV['IS_PULL_REQUEST'] = ENV['PULL']
    ENV['SERVER_ENV'] = ENV['env']
    if is_ci()
      ENV['ARTIFACTS'] = ENV['CIRCLE_ARTIFACTS']
    else
      ENV['ARTIFACTS'] = "./fastlane/artifacts/"
    end
  end

  lane :setup do
    carthage(platform: 'iOS',
             use_binaries: false)
    cocoapods
  end

  lane :xcode do
    install_xcode_plugin(
      url: "https://github.com/fastlane/FixCode/releases/download/0.1.0/FixCode.xcplugin.zip"
    )
  end

  lane :test do
    setup()
    scan(
      clean: true,
      scheme: ENV['SCHEME'],
      output_directory: ENV['ARTIFACTS'],
      buildlog_path: ENV['ARTIFACTS'],
      configuration: 'Debug',
      destination: 'platform=iOS Simulator,OS=9.0,name=iPhone 6',
      sdk: 'iphonesimulator',
      slack_only_on_failure: true
    )
  end

  lane :build do
    setup()

    cert(output_path: "./certs")
    sigh(output_path: "./fastlane/profiles")
    ENV["PROFILE_UDID"] = lane_context[SharedValues::SIGH_UDID]

    gym(
      scheme: ENV['SCHEME'],
      configuration: ENV['CONFIGURATION'],
      codesigning_identity: ENV['IDENTITY'],
      output_directory: './fastlane/build',
      buildlog_path: ENV['ARTIFACTS'],
      use_legacy_build_api: true
    )
  end

  lane :increment do
    increment_build_number build_number: "3000.#{ENV['CIRCLE_BUILD_NUM']}"
  end

  desc "Build an ipa locally"
  lane :local do
    load_env(:recengine)
    load_env(:alpha)
    load_env(:dev)

    increment_build_number build_number: "3000.1568"

    build()
  end

  desc "Submit a new Dev Build to Hockeyapp"
  lane :qa do
    load_env(:nsi)
    load_env(:qa)

    if !is_ci() || ENV['IS_PULL_REQUEST']
      env = "dev"
      if ENV['SERVER_ENV']
        env = ENV['SERVER_ENV']
      end

      load_env(:"#{env}")

      increment()
      build()

      hockey(
        ipa: Actions.lane_context[ Actions::SharedValues::IPA_OUTPUT_PATH ],
        public_identifier: ENV["HOCKEY_DEV_APP_ID"],
        notes: Actions.last_git_commit,
        api_token: ENV['HOCKEYAPP_TOKEN']
      )
      config_url = Actions.lane_context[SharedValues::HOCKEY_BUILD_INFORMATION]['config_url']
      version = config_url.split('/')[-1]

      post_comment_to_pr("CircleCI: Download requested build hitting the #{env} server for #{ENV["CIRCLE_SHA1"]} at #{Actions.lane_context[SharedValues::HOCKEY_DOWNLOAD_LINK]}/app_versions/#{version}/")
    end
  end

  desc "Submit a new Alpha Build to Apple TestFlight, that points to the dev server"
  desc "This will also make sure the profile is up to date"
  lane :alpha do
    load_env(:recengine)
    load_env(:alpha)
    load_env(:dev)

    if !is_ci() || ENV['IS_PULL_REQUEST'] || ENV['RUN_NIGHTLY_BUILD']
      increment()
      build()

      pilot(changelog: Actions.last_git_commit)

      slack(
        message: "fastlane deploy of Alpha app to TestFlight was successful :rocket:, expect a push from :apple:",
        success: true,
        default_payloads: [:lane, :test_result, :git_branch, :git_author]
      )
    end

  end

  desc "Submit a new Beta Build to Apple TestFlight"
  desc "This will also make sure the profile is up to date"
  lane :beta do
    load_env(:recengine)
    load_env(:beta)
    load_env(:prod)

    increment()
    build()

    pilot(changelog: Actions.last_git_commit)

    slack(
      message: "fastlane deploy of TRIPSTR BETA to TestFlight was successful :rocket:, expect a push from :apple:",
      success: true,
      default_payloads: [:lane, :test_result, :git_branch, :git_author]
    )

  end

  def post_comment_to_pr(comment)
    github_token = ENV['GITHUB_TOKEN']
    repo = ENV['REPO']
    owner = ENV['OWNER']
    issue_number = ENV['PULL']

    if github_token && repo && owner && issue_number
      url = "https://api.github.com/repos/#{owner}/#{repo}/issues/#{issue_number}/comments"
      body = comment

      puts "Trying to post to URL - #{url}"
      RestClient.post url, {body: body}.to_json, {Authorization: "token #{github_token}"}
    end
  end

  after_all do |lane|
    # This block is called, only if the executed lane was successful

    # Leaving this in case we want it later
    # slack(
    #   message: "fastlane deploy to TestFlight was successful :rocket:, check yo mail",
    #   success: true,
    #   default_payloads: [:lane, :test_result, :git_branch, :git_author]
    # )
  end

  error do |lane, exception|
    if ENV['IS_PULL_REQUEST'] && ENV['REPO'] && ENV['OWNER']
      post_comment_to_pr("CircleCI: Unable to complete build request for #{ENV["CIRCLE_SHA1"]}. See https://circleci.com/gh/#{ENV['OWNER']}/#{ENV['REPO']}/#{ENV['CIRCLE_BUILD_NUM']}")
    else
      if is_ci()
        slack(
          message: exception.message,
          success: false
        )
      end
    end
  end
end

# More information about multiple platforms in fastlane:
# https://github.com/KrauseFx/fastlane/blob/master/docs/Platforms.md

You can't require gems in the current DSL. Fastlane parses the fastlane file in a safe way so you can't just use any ruby method.


Modify vm sizes

Closes https://github.com/Quansight/qhub-hpc/issues/82

Actually, I just tried to solve again and the host machine requires at least 10GB of RAM so don't merge this yet.

superceded by other PRs


SageMaker

See also #50.
Your own Stable Diffusion endpoint with AWS SageMaker

Amazon SageMaker Pricing
Available Studio Instance Types


Publish 7.6-20220825235240+0000

Publish 7.6-20220825235240+0000

@bot-gradle test and merge

OK, I've already triggered a build for you.


having issues on the item which has 387 options

💬 Questions and Help
The column item with 387 options leads to a crash, therefore this item doesn't show the dropdown options in excel. Please help me out on showing 387 dropdown options.

@YanLIU0822 Can you post the code? And by the way, would you like a screenshot or excel file of the excel project?


Registration form: newsletter signup

User story
As a hosting provider who wants to register their services in TGWF directory,
when I fill in the data in the registration form,
I'm able to select an option to sign up for newsletter.
Developer notes:
We're using SendinBlue to manage newsletter subscriptions. It's possible to generate a new API key in the SendinBlue account, and then make a single API call from Django. The question is: when should this API call be made. The request to SendinBlue should be made when the form is submitted.

 Registration form: newsletter signup


Adding pandas as requirement for installation.

Describe the bug
Hey,
we have a environment where only linters are installed. After running mypy . we install all missing subs with mypy --install-types --non-interactive.
After running mypy --ignore-missing-imports --disallow-any-generics --disallow-untyped-defs --no-implicit-optional --disallow-incomplete-defs . we geht an error for accessing a series:
dummy = test_df["dummy"].tolist()

Raises:
bug_minimal_example.py:5: error: "Series[Any]" not callable  [operator]
Found 1 error in 1 file (checked 1 source file)
Error vanishes after numpy or pandas is installed.
To Reproduce
import pandas as pd

test_df = pd.DataFrame()
test_df["dummy"] = [1, 2, 3, 4, 5]
dummy = test_df["dummy"].tolist()
print(dummy)

bug_minimal_example.py:5: error: "Series[Any]" not callable  [operator]
Found 1 error in 1 file (checked 1 source file)
Please complete the following information:

OS: Ubuntu [WSL]
OS Version: 22.04.2 LTS
python version: 3.8
version of type checker: mypy 1.2.0
version of installed pandas-stubs: <IP_ADDRESS>501

Additional context
Suggested fix:
Adding pandas to requirements

It's not pandas, it is numpy.   You have to have numpy installed because we depend on the typing provided by numpy.  I removed pandas from my environment, and your code passed.  When I removed numpy, I then got the same error message.
I think we will need to add numpy as a requirement.
@twoertwein Your thoughts?

I'm very hesitant to add (large) runtime dependencies to pandas-stubs. I believe we got the opposite issues when we had pandas/typing-extensions as a dependency. I think typeshed stubs do not(?) have dependencies.
Does this error also happen with pyright?

I think typeshed stubs do not(?) have dependencies.

They do. If a typeshed stub package used numpy in its stubs, we'd add numpy as a dependency.

Does this error also happen with pyright?

Yes, same as with mypy.  So pyright isn't seeing that the numpy referenced by an installed version of pandas-stubs is missing.

Does this error also happen with pyright?

Yes, same as with mypy. So pyright isn't seeing that the numpy referenced by an installed version of pandas-stubs is missing.

Although if you don't have pandas installed, then you do get a message from pyright about it not being resolved from source.  Whereas mypy gives no such warning.

I think typeshed stubs do not(?) have dependencies.

They do. If a typeshed stub package used numpy in its stubs, we'd add numpy as a dependency.

I guess we should then make numpy a dependency (and theoretically all the other non-pandas libraries)

Asking an obvious question here, but is there any context in which pandas-stubs would be useful and one did not have pandas installed? Cause if not, then you have pandas installed, and you thereby have numpy installed.
I don't know what the convention is, but I just pulled up django-stubs for instance, and they appear to have django itself as a dependency, So extrapolating from a sample size of one....,maybe the proper thing to do is in fact have the actual package as a dependency of the stub package?

Asking an obvious question here, but is there any context in which pandas-stubs would be useful and one did not have pandas installed? Cause if not, then you have pandas installed, and you thereby have numpy installed.

Context is in the original part of the issue.  Someone wanted to just do type checking using the stubs without installing any of the packages.

Context is in the original part of the issue. Someone wanted to just do type checking using the stubs without installing any of the packages.

If you mean me, at least from our site it would be totally fine to install numpy (or pandas). I just wanted to explain how we had an environment which has pandas-stubs but not pandas itself installed.

FYI, mypy people said the option --no-install-site-packages is a way to detect that packages that are being checked are not installed.

Should we run mypy with --no-silence-site-packages on the CI?

Should we run mypy with --no-silence-site-packages on the CI?

It would then pick up that things like matplotlib has no typing, so I don't think we should.


Failed to parse URL when using $fetch plugin + proxy

Environment

Operating System: Darwin
Node Version:     v20.12.2
Nuxt Version:     3.12.4
CLI Version:      3.12.0
Nitro Version:    2.9.7
Package Manager<EMAIL_ADDRESS>Builder:          -
User Config:      modules, app, css, routeRules, runtimeConfig, colorMode, ui, devtools
Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Build Modules:    -

Reproduction
https://stackblitz.com/edit/github-c51gfm-fpwdjf?file=app.vue
Describe the bug
$fetch plugin with proxy cannot parse URL on server side
Error: [GET] "/api/auth/me": <no response> Failed to parse URL from /api/auth/me
Additional context
No response
Logs
No response

@pi0 Hello! can you look at this bug please, really dont understand why this error happens. i want to proxy request custom $fetch plugin


Confusing this sentence about Iaas Extension

Confusing this sentence about Iaas Extension:
"To manage your SQL Server VM from the portal, register it with the SQL IaaS Agent extension in lightweight management mode, currently the only mode supported with FCI and SQL Server on Azure VMs."
the above sentnece make readers be confused.
It seems Lighte weight mode is only supporting mode on all kind of SQL Server on Azure Vms.

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

ID: 6d361f5c-7d29-fedc-60d6-7256ab836e5b
Version Independent ID: 9426ee36-f308-8022-f3ef-e267a518976f
Content: Create an FCI with Azure shared disks - SQL Server on Azure VMs
Content Source: azure-sql/virtual-machines/windows/failover-cluster-instance-azure-shared-disks-manually-configure.md
Service: virtual-machines-sql
Sub-service: hadr
GitHub Login: @adbadram
Microsoft Alias: adbadram

@minjich
Thanks for your feedback! We will investigate and update as appropriate.

Hi @minjich , thanks for contacting Microsoft! The sentence is meant to imply that lightweight mode is the only mode supported when you have a failover cluster instance with SQL Server on Azure VMs. I've updated the language to clarify this and the change should be live later this week. I'll close out this Git Issue but please feel free to comment should you need anything further.
Thanks for improving our docs and hope you have a wonderful rest of your day!
Masha from the SQL Docs team
#please-close

#reassign:MashaMSFT


How to make Jquery player play more than one track ?

I have a website www.gricemusic.com and I created a folder with 10 mp3 tracks.
How would I go about giving the user options to choose a track to play ? (so user can select from the10 tracks).

You can use the playlist plugin or set and play a new media in the ended callback.


Fixes EncryptionException::forNoHandlerAvailable() handler parameter call

Two things:

EncryptionException::forNoHandlerAvailable is for to pass handler name, it was passed driver in Encryption::__construct().
EncryptionException::forNoHandlerAvailable() require $handler parameter, it was no parameter.

Checklist:

[x] Securely signed commits

For note, it catched by phpstan level 1 that I run locally (currently level 0 that in github). For phpstan level 1, it may require separate PR as there will be a false positives to registered.

Actually, the $this->handlers is not really needed ?

I updated to remove unneeded $this->handlers definitions as never used, use $this->driver as the handler definition instead.


Collection notification notified only once.

Goals
Refresh the UI when new data are inserted
Expected Results
Auto updating results should fire a notification with changes
Actual Results
I have two collections, alerts and standard measures. The same code is used to add a notification block. The alerts fire the notification, the standardMeasures don't
Steps to Reproduce
I'm afraid I can't reproduce it, but within my code it is consistent
Code Sample
instantiation:
var standardMeasures:Results<StandardMeasure>? = nil
var alerts:Results<AlertStatus>? = nil
var measuresToken:NotificationToken? = nil
var alertsToken:NotificationToken? = nil

alerts = node?.alerts.sorted(byProperty: "timestamp")
standardMeasures = node?.standardMeasures.sorted(byProperty: "timestamp")

alertsToken = alerts?.addNotificationBlock({ (changes) in
    if !self.isChangingValues{
        self.updateAlertsUI()
    }
})

measuresToken = standardMeasures?.addNotificationBlock({ (changes) in
    if !self.isChangingValues{
        self.updateMeasuresUI()
    }
})

Only alertsToken's block is fired every time a data is written. Standardmeasures' block is fired only once. Weird. Also, when the alerts block is fired, I can see node.standardMeasures.count has increased.
po node?.standardMeasures.count
▿ Optional<Int>
  - some : 405
----
po node?.standardMeasures.count
▿ Optional<Int>
  - some : 406

Version of Realm and Tooling
RealmSwift 2.0.2
Xcode version: 8
iOS/OSX version: 10.12
Dependency manager + version: CocoaPods

If the number of items in a Results being observed changes, its notification block should certainly be fired.
Keep in mind that notifications may be coalesced (grouped), including the initial notification. For example, by the time the standardMeasures notification block fires its initial notification, it may have already processed the first change (count from 405 to 406).
I suggest your read our documentation on Collection Notifications as well as the docs for Results.addNotificationBlock(_:).

@superandrew do you still have questions regarding this?

I think everything has been cleared, thank you.
On Wed, Nov 9, 2016 at 1:10 AM +0100, "JP Simard"<EMAIL_ADDRESS>wrote:
@superandrew do you still have questions regarding this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.


gRPC package in opensuse/tumbleweed installs broken Abseil

The latest gRPC 1.32.0 package provided by opensuse/tumbleweed doesn't work and broke the https://github.com/googleapis/google-cloud-cpp build, but I believe it will break anyone who uses gRPC and Abseil. See https://github.com/googleapis/google-cloud-cpp/issues/5277 for more details.
SUMMARY
The opensuse/tumbleweed Docker image was updated a few days ago. The updated image contains a zypper package for gRPC 1.32.0. Here's the spec file: https://build.opensuse.org/package/view_file/openSUSE:Factory/grpc/grpc.spec?expand=1
As you can see in that spec file, they invoke cmake for grpc like
%cmake -DgRPC_INSTALL=ON                  \
       -DgRPC_INSTALL_LIBDIR:PATH="%_lib" \
       -DgRPC_INSTALL_CMAKEDIR:PATH="%_libdir"/cmake/grpc \
       -DgRPC_ABSL_PROVIDER=module        \
       -DgRPC_CARES_PROVIDER=package      \
       -DgRPC_PROTOBUF_PROVIDER=package   \
       -DgRPC_RE2_PROVIDER=package        \
       -DgRPC_SSL_PROVIDER=package        \
       -DgRPC_ZLIB_PROVIDER=package
%cmake_build

I believe the problem is  -DgRPC_ABSL_PROVIDER=module, which I think results in the "cmake install" for gRPC actually installing binary artifacts (like libabsl_foo.so) for Abseil. It doesn't install Abseil headers, or Abseil's .cmake files. So the gRPC install installs partial binary artifacts for some other project.
The problem is that now callers cannot use the installed Abseil binary artifacts, because there are no headers or .cmake files. And similarly, if a caller separately compiles and compiles Abseil, there will be multiple copies of Abseil binary artifacts, which can easily lead to ODR or ABI problems.
THE FIX
I think it's a mistake for any package to ever install artifacts that it doesn't own. So I think it's a bug that gRPC's install target would install any artifacts of Abseil's. This doesn't look right to me.
I think gRPC's "install" should fail if any of its deps was fetched as a "module", as is Abseil in the opensuse example above. If that failed, then the opensuse maintainers would have known to make an Abseil package first and tell gRPC to depend on that instead.
/cc: @derekmauro FYI about Abseil stuff
/cc: @coryan JFYI

Thanks Greg for bring up this issue.
First of all, installing from the module is supposed to be used in the formal package so gRPC OpenSUSE package has a bug and should address it to avoid potential ODR problems.
Installation-from-the-module is (I believe) for users to build and install gRPC easily as a better out-of-box experience. (#21411) and this applies to all dependencies gRPC has. @jtattermusch, WDTY?

First of all, installing from the module is supposed to be used in the formal package so gRPC OpenSUSE package has a bug and should address it to avoid potential ODR problems.

Did you mean "... is not supposed to be used in the format package ..." ?

First of all, installing from the module is supposed to be used in the formal package so gRPC OpenSUSE package has a bug and should address it to avoid potential ODR problems.

Did you mean "... is not supposed to be used in the format package ..." ?

Dang, you're right! I edited it. Thanks!

First of all, installing from the module is not supposed to be used in the formal package so gRPC OpenSUSE package has a bug and should address it to avoid potential ODR problems.

OK, will you or someone on the gRPC team file a bug against opensuse and follow up so they can fix their package?

Installation-from-the-module is (I believe) for users to build and install gRPC easily as a better out-of-box experience. (#21411) and this applies to all dependencies gRPC has. @jtattermusch, WDTY?

There are other ways to improve the out of the box experience, such as a CMake super build, which is what I'd recommend. And these have the advantage that each project will install itself. I maintain that it's a mistake/bug for any project to install artifacts that it does not own, because then users cannot use your project AND the project that actually owns those artifacts.

I found the change to introduce -DgRPC_ABSL_PROVIDER=module in the package. Since I couldn't find the right channel to file the issue, I just sent a mail to a maintainer.
Can you elaborate superbuild? I guess this is the right one to understand it. I think what we have in the gRPC repo is similar to it, though.

I found the change to introduce -DgRPC_ABSL_PROVIDER=module in the package. Since I couldn't find the right channel to file the issue, I just sent a mail to a maintainer.

Excellent. Thank you.

Can you elaborate superbuild? I guess this is the right one to understand it. I think what we have in the gRPC repo is similar to it, though.

The link you provided is good. The big difference between a super build and what gRPC is currently doing is that a super build fetches the deps that it needs and each dep installs itself. The difference with gRPC's current strategy is that gRPC is installing part of Abseil and it's doing so incorrectly, thus making it so users can no longer use both gRPC AND Abseil.
I believe it's always a bug for a project to install artifacts that it does not own.
It looks like this probably started with gRPC in https://github.com/grpc/grpc/pull/21411. I think that PR should probably be rolled back or undone in some way.

@devjgm I see. If gRPC can install easily without hurting interoperability, I like to have that change. Before starting to work on it, I like to here from Jan's opinion. @jtattermusch

In case it helps, you can take a look at the super build for our project at https://github.com/googleapis/google-cloud-cpp/tree/master/super. We're also happy to chat and help out. Let me know if there's something you need.

Ok, so to summarize:

I agree that when installing, -DgRPC_ABSL_PROVIDER=package should be used by packages that are meant for consumption by users (such as linux distro packages, in this case it's OpenSuse).
If OpenSuse creates their package in a wrong way, it's not gRPC's responsibility as we don't maintain that package. From that perspective it's not a gRPC bug that someone uses gRPC wrong.
as veblush@ has pointed out, we use -DgRPC_ABSL_PROVIDER=module to simplify our internal builds and that's completely fair and I don't see a problem with that (it's true that we don't explicitly forbid running  "install" target with a build configured like that but we cannot have protection for every wrong use pattern there is).
I'm familiar with "superbuild" and we've actually experimented with it in the past in our cmake build, but there result's weren't very encouraging (basically it lead to a build that's not easy to understand and it didn't quite solve any of our problems), so I'm quite sceptical here as I don't really understand how exactly that would help us (but I guess I can be convinced).

To me, the only usability problem would beif absl cannot really be installed as a separate library (in some reasonable way) and then depended upon by using -DgRPC_ABSL_PROVIDER=package - I'm not sure if that's the case currently.

Ok, so to summarize:

I agree that when installing, -DgRPC_ABSL_PROVIDER=package should be used by packages that are meant for consumption by users (such as linux distro packages, in this case it's OpenSuse).

Agreed. I think this statement could be made a little stronger by saying that -DgRPC_ABSL_PROVIDER=package should be used by anyone who is installing gRPC.

If OpenSuse creates their package in a wrong way, it's not gRPC's responsibility as we don't maintain that package. From that perspective it's not a gRPC bug that someone uses gRPC wrong.

Agreed. I don't actually think that this is gRPC's bug, other than the OpenSuse gRPC package is currently broken, and the gRPC folks might want to alert the OpenSuse package maintainers to the problem so they can fix it. Otherwise, customers will have a bad experience with gRPC on OpenSuse.
It looks like @veblush sent them a message according to https://github.com/grpc/grpc/issues/24476#issuecomment-716870223

as veblush@ has pointed out, we use -DgRPC_ABSL_PROVIDER=module to simplify our internal builds and that's completely fair and I don't see a problem with that (it's true that we don't explicitly forbid running  "install" target with a build configured like that but we cannot have protection for every wrong use pattern there is).

If the goal of -DgRPC_ABSL_PROVIDER=module is only to simplify your internal builds, maybe you could add some loud warnings to discourage users from accidentally using it. I think the OpenSuse maintainers made the mistake because it was an easy mistake to make.
Do you need the ability to "install" when using -DgRPC_ABSL_PROVIDER=module for your internal builds? If not, prohibiting installs of gRPC's module deps would prevent users from accidentally doing the wrong thing.
To be clear, the main issue I'm reporting in this thread is that gRPC makes it very easy to do the wrong thing by allowing "module" deps to be installed.

I'm familiar with "superbuild" and we've actually experimented with it in the past in our cmake build, but there result's weren't very encouraging (basically it lead to a build that's not easy to understand and it didn't quite solve any of our problems), so I'm quite sceptical here as I don't really understand how exactly that would help us (but I guess I can be convinced).

I'd be happy to chat/GVC to see if there's anything I can do to help. But I'd first need to understand what your goals are and how -DgRPC_ABSL_PROVIDER=module satisfies those goals.

To me, the only usability problem would beif absl cannot really be installed as a separate library (in some reasonable way) and then depended upon by using -DgRPC_ABSL_PROVIDER=package - I'm not sure if that's the case currently.

Abseil can be installed correctly along with its own .cmake files, and I believe it should work fine with -DgRPC_ABSL_PROVIDER=package.

Just chiming in here --- as the person who originally introduced the issue into the openSUSE pkg --- that this has been fixed at our end for about a month now, thanks to Jan [1]. We didn't have the abseil-cpp shared libraries packaged at the time, and I had understood --- incorrectly, I have since learnt --- that using -DgRPC_ABSEIL_PROVIDER=module would just build and install the abseil-cpp library as required too.
I agree with @devjgm that some warning when using -DgRPC_<foo>_PROVIDER=module would be helpful for us downstream packagers or really anyone compiling this on their own.
[1] https://build.opensuse.org/request/show/844726

This was fixed so closing this.


Pixel values

I did this with the help of Claude and it works. What are your thoughts?
// Helper function to convert pixels to rem
function pxToRem(px: number): number {
  return px / 16 // Assuming base font size is 16px
}

const customHeadlines: Record<string, TypeDefinition> = {
  'text-display-xxl': {
    clamp: [pxToRem(64), pxToRem(264)],
    classAlias: ['text-display-xxl'],
  },
}

Thanks for using the package!
I see what you're looking for, I can improve the API with options on the types of inputs for the clamping. Ideally you can pass REM or pixel units. I think your workaround works. You could also eliminate the function and just do:
const customHeadlines: Record<string, TypeDefinition> = {
  'text-display-xxl': {
    clamp: [64 / 16, 264 / 16],
    classAlias: ['text-display-xxl'],
  },
}

When you get around to it I'd love to see how your using the type system :)


ParameterBindingArgumentTransformationException while attempting to pass an array of class objects to a function

Steps to reproduce
Module.psm1
class CosmosDbDatabase {
  [string]$Name;
  [bool]$Autoscale;
  [int]$Throughput;

  CosmosDbDatabase() {
  }

  CosmosDbDatabase([string]$Name, [bool]$Autoscale, [string]$Throughput) {
    $this.Name = $Name;
    $this.Autoscale = $Autoscale;
    $this.Throughput = $Throughput;
  }
}

function Invoke-MyFunction() {
  [CmdletBinding()]
  param(
    [Parameter(Mandatory = $True)][CosmosDbDatabase[]]$Databases
  )

 # do stuff inside
}

Script.ps1
using module Module.psm1

Import-Module Module.psm1 -Force;

[hashtable]$arguments = @{
  "Databases" = @(
      # [CosmosDbDatabase]::new("Database1", $true, 4000),
      # [CosmosDbDatabase]::new("Database2", $false, 400)
    (New-Object CosmosDbDatabase -Property @{
      "Name"        = "Database1";
      "Autoscale"   = $true
      "Throughput"  = 4000;
    }),
    (New-Object CosmosDbDatabase -Property @{
      "Name"        = "Database2";
      "Autoscale"   = $false
      "Throughput"  = 400;
    })
  );
};

Invoke-MyFunction @arguments;

Expected behavior
I'm expecting the function to be invoked with all parameters bound successfully, given the fact that I'm using strong typing.
Actual behavior
I'm getting a ParameterBindingArgumentTransformationException saying
Cannot process argument transformation on parameter 'Databases'. Cannot convert the "CosmosDbDatabase" value of type "CosmosDbDatabase" to type "CosmosDbDatabase".

Trace-Command -Name ParameterBinding -Expression {Deploy-AzureCosmosDB @arguments} -PSHost;

yields
DEBUG: 2020-11-24 18:14:04.4883 ParameterBinding Information: 0 :     BIND arg [System.Object[]] to parameter [Databases]
DEBUG: 2020-11-24 18:14:04.4884 ParameterBinding Information: 0 :         Executing DATA GENERATION metadata: [System.Management.Automation.ArgumentTypeConverterAttribute]
DEBUG: 2020-11-24 18:14:04.4887 ParameterBinding Information: 0 :             ERROR: DATA GENERATION: Cannot convert the "CosmosDbDatabase" value of type "CosmosDbDatabase" to type "CosmosDbDatabase".

Apparently I'm attempting to pass a [System.Object[]] ? How can I ensure that the type is as expected?
I've checked Write-Host ($arguments["Databases"].GetType().FullName); before the invocation of my function and got [CosmosDbDatabase[]] in return as expected. Could this be happening during the splatting?
Callstack
"   at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)   at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)"

Environment data

Name                           Value
----                           -----
PSVersion                      7.1.0
PSEdition                      Core
GitCommitId                    7.1.0
OS                             Darwin 19.6.0 Darwin Kernel Version 19.6.0: Thu Oc…
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

I've made some progress, but the behavior is still odd...
using module Module.psm1

Import-Module Module.psm1 -Force;

[hashtable]$arguments = @{
  "Databases" = @(
      [CosmosDbDatabase]::new("Database1", $true, 4000),
      [CosmosDbDatabase]::new("Database2", $false, 400)
  );
};

Trace-Command -Name ParameterBinding -Expression { Invoke-MyFunction @arguments} -PSHost;

yields:
DEBUG: 2020-11-24 20:17:16.4799 ParameterBinding Information: 0 :     BIND arg [CosmosDbDatabase[]] to parameter [Databases]
DEBUG: 2020-11-24 20:17:16.4799 ParameterBinding Information: 0 :         Executing DATA GENERATION metadata: [System.Management.Automation.ArgumentTypeConverterAttribute]
DEBUG: 2020-11-24 20:17:16.4802 ParameterBinding Information: 0 :             ERROR: DATA GENERATION: Cannot convert the "CosmosDbDatabase" value of type "CosmosDbDatabase" to type "CosmosDbDatabase".

Is this bind failure expected ?

Does your example repro the problem for you? I can't get it to error.
Anyway, my guess without repro is that it's related this these lines:
using module Module.psm1

Import-Module Module.psm1 -Force

Try taking out the Import-Module line.  There are some circumstances where you could be creating two instances of the module, importing the types from the first, and importing the commands from the second.  That shouldn't really happen outside of design time though.

@SeeminglyScience I think you've hit the nail in the head. It started to work.
I recall that I've added the Import-Module in order to reload changes I've made during development - I don't think the same effect is possible with using module - is it?

@mmisztal1980 Yeah unfortunately you can't.  Even with Import-Module -Force it's not super consistent in whether it actually loads the new types.  For now the best workflow is a refresh session.
I do something like this:
PS> cd to/project/directory
PS> pwsh # enter nested shell
PS> PS> & ./script.ps1
PS> PS> exit
PS> pwsh # hit up arrow
# repeat

Can we please re-activate this Issue? I came to github today to find-and-upvote or file an Issue for this exact problem. I also believe it's due to the "Import-Module [...] -Force" to reload the module. And just like re-executing Add-Type for a snippet of C# code that has not changed, reloading a module that uses classes should also continue to work.
This does not only come up during development scenarios. For example, I have a module that auto-updates itself, and then instructs the end user to run "Import-Module [...] -Force" to pick up the changes.

I should also note that key to the repro is touching the file where the class is defined (before re-importing the module). You don't have to change the class definition; just add some whitespace somewhere else in the file. Which makes me think that the logic out there for deciding whether to generate a new runtime type for the class is making its decision based on whether the containing file has changed or not, but could do better by looking at just the extent where the class is defined.

Here is solid repro code:
mkdir Repro_gh_14250 | Out-Null
pushd Repro_gh_14250
New-ModuleManifest -Path .\Repro.psd1 -RootModule Repro.psm1

@'
$script:data = [ordered] @{
    First = @("Primo", 123)
    Second = @("Secundo", 456)
}

class ReproType
{
    [string] $Name
    [int] $Number
}

$TheList = @()
foreach( $key in $script:data.Keys )
{
    $newThing = [ReproType]::new()
    $newThing.Name = $script:data[ $key ][ 0 ]
    $newThing.Number = $script:data[ $key ][ 1 ]

    $TheList += $newThing
}

function Get-TheList
{
    [CmdletBinding()]
    param()

    process { return $TheList }
}
'@ > Stuff1.ps1

@'
function Show-TheList
{
    [CmdletBinding()]
    param( [ReproType[]] $TheItems )

    process
    {
        foreach( $item in $TheItems )
        {
            Write-Host $item.Name -Fore Cyan -NoNewline
            Write-Host ": " -NoNewline
            Write-Host $item.Number -Fore Yellow
        }
    }
}

function Repro
{
    [CmdletBinding()]
    param()

    $stuff = @( Get-TheList )
    Show-TheList $stuff
}
'@ > Stuff2.ps1

@'

. "$PSScriptRoot\Stuff1.ps1"
. "$PSScriptRoot\Stuff2.ps1"

'@ > Repro.psm1

ipmo .\Repro.psd1 -Force
Repro
'# nothing' >> .\Stuff1.ps1
ipmo .\Repro.psd1 -Force
Repro    # EXPECTED: it works. ACTUAL: Cannot process argument transformation on parameter 'TheItems'. Cannot convert the "ReproType" value of type "ReproType" to type "ReproType".

@jazzdelightsme what does Trace-Command -Name ParameterBinding -Expression { Invoke-MyFunction @arguments} -PSHost; tell you?

I think it is basically what is expected (given the bug). For my repro code, the trace command should be:
Trace-Command -Name ParameterBinding -Expression { Repro } -PSHost

The relevant snippet of output:
BIND POSITIONAL cmd line args [Show-TheList]
    BIND arg [System.Object[]] to parameter [TheItems]
        Executing DATA GENERATION metadata: [System.Management.Automation.ArgumentTypeConverterAttribute]
            result returned from DATA GENERATION: System.Object[]
        Binding collection parameter TheItems: argument type [Object[]], parameter type [ReproType[]], collection type Array, element type [ReproType], no coerceElementType
        Arg is IList with 2 elements
        Creating array with element type [ReproType] and 2 elements
        Argument type System.Object[] is IList
        COERCION REQUIRED: Did not attempt to coerce collection element from type ReproType to type ReproType
        BIND arg [System.Object[]] to param [TheItems] SKIPPED
    BIND arg [System.Object[]] to parameter [TheItems]
        Executing DATA GENERATION metadata: [System.Management.Automation.ArgumentTypeConverterAttribute]
            ERROR: DATA GENERATION: Cannot convert the "ReproType" value of type "ReproType" to type "ReproType".

@jazzdelightsme I think I know what's going on:
$stuff = @( Get-TheList )

replace with
$stuff = [ReproType[]]( Get-TheList )

And see what Trace-Command gives you

Yes, that makes the "cannot convert" error happen earlier, before parameter binding. But of course it doesn't matter whether I hit the problem during parameter binding or just trying to manually cast; I think it should work.

Thing is the @ character causes the array to be cast to [Object[]] irregardless of types within :)

With or without the @, I get the "cannot convert" error, so I am confused why you bring it up.

I haven't tested your code sample, but as I'm also developing classes inside modules, I have seen similar confusing errors as you have reported. (I'm actually in the process of trying to find a work-around for a class issue, hence me perusing the PowerShell issues. I noticed this one and thought I should give my 2 pence worth, so just bear with me)
There are some really important notes you should bear in mind when it comes to classes in PowerShell.

Unlike functions, once a class is defined in a PS session it can NOT be modified. This is a real problem that I hope the PS team will resolve one day. The only way to fix the issue is to restart your session then re-do your import. But let's say you have some Pester tests that imort the module under development. This will work the first time in one way, but if you modify the c;lass defintion and thn re-run the tests, the class definition will not change and you get errors very similar to the one you have reported and that I have experienced. Restart the session and you should pick up the new class definition. This is a problem because it implies that every time you re-run these tests, you first need to restart the session (which clearly is very onerous on the developer).

If the module you are developing is imported in your profile, then if you start making changes to the classes in the module, you will run into the same problem as 1) above except that restarting the session will no longer fix the issue. Remove the import from the sesssion (note there is another VSC specific session file: Microsoft.VSCode_profile) and leave the import to the Pester unit test, eg:

  BeforeAll {
    InModuleScope ModuleUnderTest {
      Get-Module ModuleUnderTest | Remove-Module -Force
      Import-Module .\Output\ModuleUnderTest\ModuleUnderTest.psm1 `
        -ErrorAction 'stop' -DisableNameChecking
    }
  }

You need to be very caeful how you structure your powershell code if it contains classes. In your example (*CosmosDbDatabase *), with the function Invoke-MyFunction, this will work ok as long as they reside in the SAME file.

If Invoke-MyFunction is defined inside a different file to CosmosDbDatabase then the line containing the parameter definition:

[CosmosDbDatabase[]]$Databases

will not work; the type CosmosDbDatabase can't be resolved unless there is a using module  statement at the top of the file. But a common pattern for constructing powershell modules is to have a build stage that concatenates all sources into the .psm file, which means you can't use the using module technique, unless your build stage has some logic in it to strip out alll using statements before combining them into the psm file,, then injecting the required using statements at the top of the file. (PS: the using statements inside the original source files would stop VSC from reporting errors in the text editor, but need to be injected into the top of the psm file as stated already)
A technique I've had to start using is to create a new module (for the purposes of this discussion, lets call this new class module CosmosDbDatabaseClass and the client code which contains Invoke-MyFunction resides in module CosmosDbDatabaseClient). (By the way, I am not suggestting you have 1 class per module, that clearly is ridiculous, I'm just explaining the technique). The purpose of CosmosDbDatabaseClass module is to contain only the class definitions and develop this module independently. Then CosmosDbDatabaseClient module has a dependency on CosmosDbDatabaseClass module. With this new arrangemnt in place, now what you can do is have CosmosDbDatabaseClient have a using module CosmosDbDatabaseClass statement in its psm1 file, and you can safely declare variables of type CosmosDbDatabase or CosmosDbDatabase[] ok. This won;t fix the issue of classes not being able to be modified inside the current session, but you can declare variables to be of that class type. I'm not that happy about having to extract out my class code like this, but at least it allows me to use class references easily.
It looks like you and others are aware of the issue of class definition requiring a session restart, but I thought I would contribute, sharing my experience may help to find a way forward. Of course, the best way forward would be for The PS team to fix this class issue once and for all, but I'm sure they would have done so already if it was easy and not breaking existing code. However, because of the real problems of classes in modules, I would hope that the PS team would at some stage make a breaking change, because the status quo is almost intolerable and (arguably it is already in a broken state) needs a resolution to avert extravagent work arounds.

I haven't tested your code sample, but as I'm also developing classes inside modules, I have seen similar confusing errors as you have reported. (I'm actually in the process of trying to find a work-around for a class issue, hence me perusing the PowerShell issues. I noticed this one and thought I should give my 2 pence worth, so just bear with me)
There are some really important notes you should bear in mind when it comes to classes in PowerShell.

Unlike functions, once a class is defined in a PS session it can NOT be modified. This is a real problem that I hope the PS team will resolve one day. The only way to fix the issue is to restart your session then re-do your import. But let's say you have some Pester tests that imort the module under development. This will work the first time in one way, but if you modify the c;lass defintion and thn re-run the tests, the class definition will not change and you get errors very similar to the one you have reported and that I have experienced. Restart the session and you should pick up the new class definition. This is a problem because it implies that every time you re-run these tests, you first need to restart the session (which clearly is very onerous on the developer).

If the module you are developing is imported in your profile, then if you start making changes to the classes in the module, you will run into the same problem as 1) above except that restarting the session will no longer fix the issue. Remove the import from the sesssion (note there is another VSC specific session file: Microsoft.VSCode_profile) and leave the import to the Pester unit test, eg:

  BeforeAll {
    InModuleScope ModuleUnderTest {
      Get-Module ModuleUnderTest | Remove-Module -Force
      Import-Module .\Output\ModuleUnderTest\ModuleUnderTest.psm1 `
        -ErrorAction 'stop' -DisableNameChecking
    }
  }

You need to be very caeful how you structure your powershell code if it contains classes. In your example (*CosmosDbDatabase *), with the function Invoke-MyFunction, this will work ok as long as they reside in the SAME file.

If Invoke-MyFunction is defined inside a different file to CosmosDbDatabase then the line containing the parameter definition:

[CosmosDbDatabase[]]$Databases

will not work; the type CosmosDbDatabase can't be resolved unless there is a using module  statement at the top of the file. But a common pattern for constructing powershell modules is to have a build stage that concatenates all sources into the .psm file, which means you can't use the using module technique, unless your build stage has some logic in it to strip out alll using statements before combining them into the psm file,, then injecting the required using statements at the top of the file. (PS: the using statements inside the original source files would stop VSC from reporting errors in the text editor, but need to be injected into the top of the psm file as stated already)
A technique I've had to start using is to create a new module (for the purposes of this discussion, lets call this new class module CosmosDbDatabaseClass and the client code which contains Invoke-MyFunction resides in module CosmosDbDatabaseClient). (By the way, I am not suggestting you have 1 class per module, that clearly is ridiculous, I'm just explaining the technique). The purpose of CosmosDbDatabaseClass module is to contain only the class definitions and develop this module independently. Then CosmosDbDatabaseClient module has a dependency on CosmosDbDatabaseClass module. With this new arrangemnt in place, now what you can do is have CosmosDbDatabaseClient have a using module CosmosDbDatabaseClass statement in its psm1 file, and you can safely declare variables of type CosmosDbDatabase or CosmosDbDatabase[] ok. This won;t fix the issue of classes not being able to be modified inside the current session, but you can declare variables to be of that class type. I'm not that happy about having to extract out my class code like this, but at least it allows me to use class references easily.
It looks like you and others are aware of the issue of class definition requiring a session restart, but I thought I would contribute, sharing my experience may help to find a way forward. Of course, the best way forward would be for The PS team to fix this class issue once and for all, but I'm sure they would have done so already if it was easy and not breaking existing code. However, because of the real problems of classes in modules, I would hope that the PS team would at some stage make a breaking change, because the status quo is almost intolerable and (arguably it is already in a broken state) needs a resolution to avert extravagent work arounds.

Unlike functions, once a class is defined in a PS session it can NOT be modified.

It's a little bit more complicated than that.  They can be modified (well sort of, a new type is generated and type resolution is changed to point to the new version) if they weren't imported using using module X.  For example, if the class is used purely for internal module logic and not exposed as a public API, Import-Module X -Force will work in most cases. The new module session state will point to the new class just like expected.
On the subject of adding a using module X -Force, the complication there is that it's a parse time concept.  There are a lot of bits in the compiler where the type is currently cached that would need to be invalidated.  That's not impossible, but getting that to work right is a large work item.
Another problem that would need to be solved is subclasses. Lets say you have these files:
# ModuleX.psm1
class Foo { }

# Bar.ps1
using module ModuleX
class Bar : Foo { }

# Bar2.ps1
using module ModuleX -Force
class Bar2 : Foo { }

# Main.ps1
. ./Bar.ps1
. ./Bar2.ps1

Update-Module ModuleX
. ./Bar2.ps1

After the last line of Main.ps1, what does Bar inherit now? Is the type recreated because Bar2.ps1 has -Force? Or are they just now incompatible with each other?  What if the new version has breaking changes that Bar2.ps1 expects, but Bar.ps1 doesn't?

Unlike functions, once a class is defined in a PS session it can NOT be modified.

It's a little bit more complicated than that.  They can be modified (well sort of, a new type is generated and type resolution is changed to point to the new version) if they weren't imported using using module X.  For example, if the class is used purely for internal module logic and not exposed as a public API, Import-Module X -Force will work in most cases. The new module session state will point to the new class just like expected.
On the subject of adding a using module X -Force, the complication there is that it's a parse time concept.  There are a lot of bits in the compiler where the type is currently cached that would need to be invalidated.  That's not impossible, but getting that to work right is a large work item.
Another problem that would need to be solved is subclasses. Lets say you have these files:
# ModuleX.psm1
class Foo { }

# Bar.ps1
using module ModuleX
class Bar : Foo { }

# Bar2.ps1
using module ModuleX -Force
class Bar2 : Foo { }

# Main.ps1
. ./Bar.ps1
. ./Bar2.ps1

Update-Module ModuleX
. ./Bar2.ps1

After the last line of Main.ps1, what does Bar inherit now? Is the type recreated because Bar2.ps1 has -Force? Or are they just now incompatible with each other?  What if the new version has breaking changes that Bar2.ps1 expects, but Bar.ps1 doesn't?

Its a shame that these details are not widely known and documented. This article: About Classes is woefully deficient and this article About Using has only a small entry relating to classes.

Its a shame that these details are not widely known and documented. This article: About Classes is woefully deficient and this article About Using has only a small entry relating to classes.

@mmisztal1980 Why close this Issue?

@mmisztal1980 Why close this Issue?


ci: remove<EMAIL_ADDRESS>deps from macos lint

PR o'clock
Description
master branch ci is failed, because of conflict python versions.
To solve it, unlink<EMAIL_ADDRESS>before install pre-commit which depends on<EMAIL_ADDRESS>https://formulae.brew.sh/formula/pre-commit
Checklist

[x] CI tests are passing
[ ] README.md has been updated after any changes to variables and outputs. See https://github.com/terraform-aws-modules/terraform-aws-eks/#doc-generation

https://github.com/terraform-aws-modules/terraform-aws-eks/pull/1074 approach might be better.

Closing this in favor of #1074


Uncaught (in promise) Unable to find element in cloned iframe - on second attempt to render & download

Describe the bug
Running in Nuxt am able to download the PDF the firs time.  But when attempting to do so a second time, get the following error in the console:
Uncaught (in promise) Unable to find element in cloned iframe in downloadPDF
it seems to get to the following in the module:
this.pdfFile = await html2PdfSetup.output('bloburl');
(
To Reproduce
Steps to reproduce the behavior:

Implement in Nuxt per instructions
Run generatePdf 1st time - all good,
Run generatePdf 2nd time - see above error

Screenshots
N/A
Package Version
e.g. 1.8.0
Additional context
Add any other context about the problem here.

I meet this problem too. Any solutions?


owner 0x442fff8f054e52ee99c54bb7b59c27230d3c8063, 0x660283041b289fdf1697f194b33800172b3f0382. add and remove same

Related Safe Addresses
0x08c90a74792ba359adf8b8599c87729253a30f07
0xa8d42835bb5357220c2cca885e93fa0a00d1ae1d
0x259d643313e72b2f0db3e645091d3464ecc641f9
0x59bd691a7787638555b904137a1cdbfcab9dc8e1
0x61b940ca1e0e2685532e9791bae6ed45528aeb66

0x15125df64304613024cb09df4f8ec261619e1e25
0xb1881ea5292713057b8cace2cd8371515f400c92
0x22e4272159b4e8c83051aa5a3a59a45640058904
0x7ddb08109a51999f6f6907256070ebca72d4333f
0x93719f835a57115fd06aad763677d64e0c891ed0

Reasoning

There is an abnormal behavior that is understandable 🍄

However, if there are many abnormal behaviors, then there is enough reason to determine that these addresses are airdrop farmer.

All of group1 the owner is same 0x442fff8f054e52ee99c54bb7b59c27230d3c8063, only this address

All of group2 the owner is same 0x660283041b289fdf1697f194b33800172b3f0382, only this address

All of the multi-sign address, the behaviour is always same and stange .

100% of the group1 multi-sign adddress addOwner and removeOwner transaction took place from 2021-06-26 to 2021-06-29.(at the same tx, no exception)

100% of the group2 multi-sign adddress addOwner and removeOwner transaction took place from 2021-09-12.(at the same tx, no exception)

The group1 and the group2 , All of them execute 1 transactions, add owner and remove owner in 1 tx, always the same tx.

the group1 add owner address is always 0x442fff8f054e52ee99c54bb7b59c27230d3c8063 , remove owner address is always 0x66A0FF664f8509370C5D718A0f69AC1DC01f5c3D

the group2 add owner address is always 0x660283041b289fdf1697f194b33800172b3f0382 , remove owner address is always 0x66A0FF664f8509370C5D718A0f69AC1DC01f5c3D

Please Check Table

Address -- multi-sign address
Execute transactions -- The number of execute transactions by multi-sign address
AddOwnerTxAmount -- The number of add owner
AddOwnerAddress -- The Address of add owner
AddOwnerTx -- The tx of add owner
AddOwnerDate -- The date of add owner
RemoveOwnerTxAmount -- The number of remove owner
RemoveOwnerAddress -- The Address of remove owner
RemoveOwerTx -- The tx of remove owner
RemoveOwerDate -- The date of remove owner

Address
Execute transactions
AddOwnerTxAmount
AddOwnerAddress
AddOwnerTx
AddOwnerDate
RemoveOwnerTxAmount
RemoveOwnerAddress
RemoveOwerTx
RemoveOwerDate

0x08c90a74792ba359adf8b8599c87729253a30f07(group1)
1
1
0x442fFF8F054e52EE99c54Bb7B59c27230d3c8063
https://etherscan.io/tx/0x38bce23d16e431fcf57d721a1cd86350aa7c685608cd92ee198e2f9b78022a54
2021/06/26T21:44:05.000Z
1
0x66A0FF664f8509370C5D718A0f69AC1DC01f5c3D
https://etherscan.io/tx/0x38bce23d16e431fcf57d721a1cd86350aa7c685608cd92ee198e2f9b78022a54
2021/06/26T21:44:05.000Z

0xa8d42835bb5357220c2cca885e93fa0a00d1ae1d(group1)
12
1
0x442fFF8F054e52EE99c54Bb7B59c27230d3c8063
https://etherscan.io/tx/0xf3d8cebdd75ac3a97f2429ded4d93f8b21a4f845fa6ac75c0d305665c2082ec8
2021/06/29T21:12:31.000Z
1
0x66A0FF664f8509370C5D718A0f69AC1DC01f5c3D
https://etherscan.io/tx/0xf3d8cebdd75ac3a97f2429ded4d93f8b21a4f845fa6ac75c0d305665c2082ec8
2021/06/29T21:12:31.000Z

0x259d643313e72b2f0db3e645091d3464ecc641f9(group1)
1
1
0x442fFF8F054e52EE99c54Bb7B59c27230d3c8063
https://etherscan.io/tx/0x862b12c825a5e84dd9d2880cd767e21c01f2fb3fc7d49def6fa22102f90dfbfe
2021/06/26T19:53:55.000Z
1
0x66A0FF664f8509370C5D718A0f69AC1DC01f5c3D
https://etherscan.io/tx/0x862b12c825a5e84dd9d2880cd767e21c01f2fb3fc7d49def6fa22102f90dfbfe
2021/06/26T19:53:55.000Z

0x59bd691a7787638555b904137a1cdbfcab9dc8e1(group1)
1
1
0x442fFF8F054e52EE99c54Bb7B59c27230d3c8063
https://etherscan.io/tx/0xf97412851bd9487dae386bb14116b1c5703c1f4c806fa2556ca637f1b10825bf
2021/06/26T19:37:01.000Z
1
0x66A0FF664f8509370C5D718A0f69AC1DC01f5c3D
https://etherscan.io/tx/0xf97412851bd9487dae386bb14116b1c5703c1f4c806fa2556ca637f1b10825bf
2021/06/26T19:37:01.000Z

0x61b940ca1e0e2685532e9791bae6ed45528aeb66(group1)
1
1
0x442fFF8F054e52EE99c54Bb7B59c27230d3c8063
https://etherscan.io/tx/0x2e9f466f1bfa2c1fe004627c52dc89550d74b1b5a80858715c3457bc4021c95c
2021/06/26T19:51:18.000Z
1
0x66A0FF664f8509370C5D718A0f69AC1DC01f5c3D
https://etherscan.io/tx/0x2e9f466f1bfa2c1fe004627c52dc89550d74b1b5a80858715c3457bc4021c95c
2021/06/26T19:51:18.000Z

---
---
---
---
---
---
---
---
---
---

0x15125df64304613024cb09df4f8ec261619e1e25(group2)
1
1
0x660283041B289fDF1697f194b33800172B3f0382
https://etherscan.io/tx/0x249d278197acdf0f03bf8c018fd1da1ba44c3c59ef1826a47194f00bfa5003eb
2021/09/12T12:27:22.000Z
1
0x66A0FF664f8509370C5D718A0f69AC1DC01f5c3D
https://etherscan.io/tx/0x249d278197acdf0f03bf8c018fd1da1ba44c3c59ef1826a47194f00bfa5003eb
2021/09/12T12:27:22.000Z

0xb1881ea5292713057b8cace2cd8371515f400c92(group2)
11
1
0x660283041B289fDF1697f194b33800172B3f0382
https://etherscan.io/tx/0xdca29d577f63754dfca270c9a2901faa6e6ae0571ce597601118241443ac64df
2021/09/12T12:35:45.000Z
1
0x66A0FF664f8509370C5D718A0f69AC1DC01f5c3D
https://etherscan.io/tx/0xdca29d577f63754dfca270c9a2901faa6e6ae0571ce597601118241443ac64df
2021/09/12T12:35:45.000Z

0x22e4272159b4e8c83051aa5a3a59a45640058904(group2)
1
1
0x660283041B289fDF1697f194b33800172B3f0382
https://etherscan.io/tx/0xbc41c4a9b5d3291ab60d0ae53149e8b25cd32059d2b10de3ba283f2fb2e0987b
2021/09/12T12:20:58.000Z
1
0x66A0FF664f8509370C5D718A0f69AC1DC01f5c3D
https://etherscan.io/tx/0xbc41c4a9b5d3291ab60d0ae53149e8b25cd32059d2b10de3ba283f2fb2e0987b
2021/09/12T12:20:58.000Z

0x7ddb08109a51999f6f6907256070ebca72d4333f(group2)
1
1
0x660283041B289fDF1697f194b33800172B3f0382
https://etherscan.io/tx/0xeb5812b080dc8a6cbadd2dfdc4bb025a67d4855ba39bc6fee5135985780f783e
2021/09/12T12:23:58.000Z
1
0x66A0FF664f8509370C5D718A0f69AC1DC01f5c3D
https://etherscan.io/tx/0xeb5812b080dc8a6cbadd2dfdc4bb025a67d4855ba39bc6fee5135985780f783e
2021/09/12T12:23:58.000Z

0x93719f835a57115fd06aad763677d64e0c891ed0(group2)
1
1
0x660283041B289fDF1697f194b33800172B3f0382
https://etherscan.io/tx/0x00b25a3e2a06bcfc24076af1d5a94761fab1a2d02e68d0da71313c59785d04af
2021/09/12T12:33:26.000Z
1
0x66A0FF664f8509370C5D718A0f69AC1DC01f5c3D
https://etherscan.io/tx/0x00b25a3e2a06bcfc24076af1d5a94761fab1a2d02e68d0da71313c59785d04af
2021/09/12T12:33:26.000Z

Methodology
Addresses are reported by retrieving information from the chain, using bitquery's graphql, and detecting abnormal behavior, such as empty wallets, mutual transfers, etc.
When only some of the anomalous behaviors are present, we can consider the address reasonable, but when an address has all the anomalous behaviors, we have good reason to suspect that the address is false. Especially if the multi-signature address and the owner address have obvious exceptions both, then it is obvious that this is airdrop farmer.
Abnormal behaviors include

For Multi-Sign Address

Few transactions were executed
There is a lot of overlap in the interactions, such as the destination address, and the time
The owner of multiple multi-signature addresses is exactly the same, and never changes from start to finish

For Owner Address

Empty address
The first source of funds is the owner.
Mutual transfer
Behavior similarity

If the verification is passed and  my strategy is great,  I can provide my source code, but for now it is not conveninet
Safe Address
0xce495858e36c95f491b5a32ca2664405cf10ab76
Thanks

Thanks for the report. All of these Safes except for 2 have been found by a previous report, unfortunately.
And for this one I'm unable to follow your reasoning. It might be legitimate use.
0xa8d42835bb5357220c2cca885e93fa0a00d1ae1d
0xb1881ea5292713057b8cace2cd8371515f400c92


time and frequency axes are permuted in FC

These should be the other way around.

@kkappler Not sure where the transpose is coming from, could you provide an example cause the tests seem to work fine.

This is now fixed - thanks @kujaku11


Remove socket timeout setup

setting timeout on asyncio socket leads to an Exception being thrown
What do these changes do?
This changes remove settimeout call as suggested by @Andrew-Chen-Wang
Are there changes in behavior for the user?
No
Related issue number
https://github.com/aio-libs/aioredis-py/issues/951#issuecomment-827322087

@ivan-antonyuck thanks for checking in. So this persists even on current master branch? Did you make sure to install from master first? Just double checking in case I'll need to do a regression from #960

I certainly wish a test with like a mock would be here but not sure if it's possible

@Andrew-Chen-Wang i've tested with the latest master. It seems that the exception in question is always risen if timeout is set on the asyncio socket, that's why i've removed the timeout setting.
Here's the code for the method in question: https://github.com/python/cpython/blob/834498e178684a7e2da49b4efe1adea33e0026b0/Lib/asyncio/trsock.py#L185

Are you guys counting on packaging and publishing these fixes to PyPi?

@fjbsantiago yes including this one before 2.0.0. I just need to double check (and maybe @abrookins can double check) that

this PR actually fixes the problem (which it seems it does),
we don't need a regression from the previous PR that attempted to fix this (i.e. #960
not only does this fix the problem but there is also a solution that is already in the code or needs to be implemented

@Andrew-Chen-Wang Been backed up this week! I'll read through this in the morning.

Ok, I dug into this a bit. We can't set a timeout on the socket, but we're already handling the timeout correctly here: https://github.com/aio-libs/aioredis-py/blame/master/aioredis/connection.py#L820-L824
Ivan's change removes our erroneous call to sockettimeout without breaking timeouts. You can generate a timeout using his code pointed at a URL that drops connections:
# -*- coding: UTF-8 -*-
__author__ = u'antonyuck'
import aioredis
import asyncio
async def test():
    redis = aioredis.Redis(connection_pool=aioredis.ConnectionPool.from_url("redis://www.google.com:81", socket_timeout=5))
    await redis.get('key')

asyncio.get_event_loop().run_until_complete(test())

If you run it:
[...]

Traceback (most recent call last):
  File "/Users/andrewbrookins/src/aioredis-timeout-test/test.py", line 9, in <module>
    asyncio.get_event_loop().run_until_complete(test())
  File<EMAIL_ADDRESS>line 642, in run_until_complete
    return future.result()
  File "/Users/andrewbrookins/src/aioredis-timeout-test/test.py", line 7, in test
    await redis.get('key')
  File "/Users/andrewbrookins/src/aioredis-py/aioredis/client.py", line 1034, in execute_command
    conn = self.connection or await pool.get_connection(command_name, **options)
  File "/Users/andrewbrookins/src/aioredis-py/aioredis/connection.py", line 1359, in get_connection
    await connection.connect()
  File "/Users/andrewbrookins/src/aioredis-py/aioredis/connection.py", line 658, in connect
    raise TimeoutError("Timeout connecting to server")
aioredis.exceptions.TimeoutError: Timeout connecting to server


Feature request: Get all documents within a given vault

Hi!
It would be useful if data vaults have some sort of a "Get all documents within a given vault" feature, along with some sort of pagination syntax. Are there any plans to add such a feature, or could it be considered?
Thanks!

No need for this as per my previous comment


Add SFTP guide to README

Add advice and instructions on setting up an SFTP connection and using XGA like that. Possibly most useful for XCS members

Decided that its not my job to baby people on how to access their data.
I will however mention that they should use SFTP.


support separate aws account for s3 backend bucket

detect role_arn and create s3 client based on it
detect profile and respect it also

Fixes #6
Related #8

Released in v0.3.2


How to use access control plugin with aws s3?

I want to use aws s3 as origin server and access control plugin to access control. Can do that ?
I'm  using s3_auth plugin of traffic server to aws s3
authentication.

The access control plugin needs the origin to decide if a user is authorized to get a piece of content (and really that they are authenticated as well). It seems unlikely that amazon simple storage service would be able to do that. It may be possible to use other amazon cloud services to perform the authentication/authorization functions and do the cookie dance with the plugin to deputize it to release the content from cache.

Thank @mlibbey .

Thank @mlibbey .


Use a minimal containerized Travis build

These set of options should cause Travis to build using a fast-start Docker container, which should knock off a considerable amount of time off Travis builds.

@AbigailBuccaneer
Since GMod April update, it is using LuaJIT v2.0.4.
How about for Wire to make a switch from v2.0.3 to v2.0.4?

@CaptainPRICE Luacheck is the script that is actually doing the linting here (hardly even static analysis), so it would actually be more appropriate to go with the latest, which is LuaJIT 2.0.5.


Auto attach debugger to Python processes started from integrated terminal

See similar functionality added for node.js in VS Code https://github.com/Microsoft/vscode/issues/42521

It would be really great to enable auto-reattaching for debugging on a debugpy integrated docker container.
An example use case would be that when developing e.g. a Pyramid app, the server has to be sig HUP'd to reload the code, and this kills the debugger as well (when started within the code using the import method). If the debugger has been attached, it could helpfully try to reattach if it loses connection.

I think this has been done hasn't it? See this bit of the docs.:
The only thing is there's no Python: Attach in the default list of targets so it's not very discoverable.

@Timmmm , can you explain how?  And is it possible to attach the jupyter interactive window to a debugging session?
In an ideal world, my code is properly factored and I can create mock arguments to inspect the behavior of a function within the interactive window.  In reality, my code is nested too much.  The ability to debug code run via the interactive window would help that refactoring.

I am not sure now! I might have misread things, sorry.

I created a simple wrapper utility to more easily debug with varying command line arguments. It works well for me so others may be interested in using it. I would have attached this comment on issue #620 where it is directly appropriate but it is closed for comments and linked to here.

This kind of functionality is also available for PowerShell as interactive sessions.
Debugging command line tools is kind of a nightmare right now, I have to edit my launch.json any time I want to debug a command...
Pretty sure there is some way to hack this while invoking debugpy directly, but as a noob to python, virtualenv, etc this is way too complicated to look into!

I ended up writing a function that starts debugpy on a random port and then writes that port to ~/.debugpy_port. Then I also have an extension that watches that file and starts a debug session when it changes. You just need to call setup_debugpy_hack() at the start of __main__.
It works ok, but it's very hacky, doesn't work well with multiple VSCode instances, and you have to remember to run the setup function.

Hey @bulletmark Thanks for this nice tool! It is extremely helpful if you have lots of console scripts and need to find out quickly why some to not work as expected. Vey well done, now I can debug my console scripts! :)

By the way I updated my extension so instead of using a file like ~/.debugpy_port (which doesn't work with multiple VSCode windows), it creates an IPC socket and then sets the path in an environment variable for the terminal (there's a VSCode API for this). Works much better in general since everything is scoped to the VSCode window properly.
The only issue I found was when you restart VSCode it will restore the terminal from the previous session with the old socket path, but the extension listens on a new random path. Haven't thought of a good solution for that yet. Probably need to set the socket name based on some workspace ID or something (whatever ID VSCode uses to restore the terminal sessions).

Closing as we do not plan to implement this change in the Python extension.


Cohere LLM does not work for cohere-ai versions 7 and above ('cohere.init' is undefined)

index.ts
import { Cohere } from 'langchain/llms/cohere';

const llm = new Cohere({ apiKey: Bun.env.COHERE_API_KEY });

const text = "What would be a good name for a company that makes colourful socks?";
const llmResult = await llm.predict(text);

package.json
{
  "name": "langchain",
  "module": "index.ts",
  "type": "module",
  "devDependencies": {
    "bun-types": "latest"
  },
  "peerDependencies": {
    "typescript": "^5.0.0"
  },
  "dependencies": {
    "cohere-ai": "^7.4.3",
    "langchain": "^0.0.198"
  }
}

Full Error
76 |         return "cohere";
77 |     }
78 |     /** @ignore */
79 |     async _call(prompt, options) {
80 |         const { cohere } = await Cohere.imports();
81 |         cohere.init(this.apiKey);
            ^
TypeError: cohere.init is not a function. (In 'cohere.init(this.apiKey)', 'cohere.init' is undefined)

A previous pull request has reverted the version support for cohere-ai but I could not find more information as to why that was. https://github.com/langchain-ai/langchainjs/pull/3277

Hey @amanape,
Yes unfortunately Chroma (which we have as a peer dep) had Cohere as a peer dep locked to 5 || 6. If we bumped to 7, it broke npms default peer dependency resolution strategy.
We'll be looking into splitting integrations like Chroma out in the future to avoid this

Opened https://github.com/chroma-core/chroma/issues/1445 but will also work on this.

Thanks, jacoblee93 - it seems that chroma fixed the issue.


Add Python samples?

At a recent CL advisory panel meeting, there was discussion about adding Python samples to the SDK. The ones I've currently collected live here:
https://github.com/inducer/pyopencl/tree/main/examples
I would say that these are of varying quality and scope. The most interesting ones are potentially these:
Simple functionality demos

demo.py ("hello-world")
transpose.py (slightly nontrivial kernel)
dump-properties.py (a mini-clinfo)
gl_interop_demo.py (though I've found GL interop is pretty fragile, and I'm not currently able to test it)

App-level demos

NBody.py
PiXPU.py
TrouNoir.py

These represent more complete programs that were contributed by @numa65536 in https://github.com/inducer/pyopencl/pull/436. Maybe he'd be open to contributing/maintaining them here and/or adding perspective.
One concern I have about adding these examples here is CI. In the PyOpenCL repo, there is CI to ensure that these examples continue to work. If they were copied/moved here, it would be good to have a similar setup to ensure nothing breaks. The corresponding CI job is not complicated.

@numa65536 Thanks for your response, and for your willingness to help. Also, I should have explained the context better. (Sorry!) This is not about a new approach at all. To my mind, the purpose of this SDK is simply to have a collection of examples of OpenCL in use, similar to what some vendors provide for their APIs. The idea is to help potential users get started by being able to draw inspiration from existing examples.
In this case, my view is that we would simply include some examples of the use of PyOpenCL here in order to give potential users a glimpse of that "way of doing business". From your end, this shouldn't look any different from having the same code live in PyOpenCL's examples.

Before I go open a PR for this: what would a good path for these examples be? The existing structure appears to be very CMake-centric. Is it OK if I just make a "python/core" folder at the top level and add things there?

@inducer I believe opening a PR is adequate, as that's where the nitpicking happens (in all repos). Having Python samples is a wanted feature, that's been established. Getting the basics right will be done through code review. IMHO python/core seems appropriate.
Since Python samples don't require building in the same sense C/C++ samples do, building doesn't need to be hooked up to CMake. However, if execution will be tested (even if not result verification, just checking that they don't crash), I would be against involving any other testing framework which aren't present in other OpenCL repos (mainly CTest) where they can't get the job done.

Thanks for submitting python samples @inducer!
I plan on submitting Ruby samples and am prototyping a pull request here:
https://github.com/Kerilk/OpenCL-SDK/pull/1
I think we need at least a samples/bindings directory or a top level bindings directory.
I did some CI on Ubuntu with pocl, and a few with MacOS, but apparently they broke their CPU Opencl in the latest security patch from the 28 of April, and building programs fails... Anyway for now I built dedicated CI runs for ruby. I think I can come up with a matrix that would cover all ruby CI tests in the end.

I think we need at least a samples/bindings directory or a top level bindings directory.

Personally, I think I'd prefer exposing all the bindings at the top level, with python, ruby as individual directories. If they're hidden under bindings, it just makes them less discoverable.

I did some CI on Ubuntu with pocl, and a few with MacOS, but apparently they broke their CPU Opencl in the latest security patch from the 28 of April, and building programs fails... Anyway for now I built dedicated CI runs for ruby. I think I can come up with a matrix that would cover all ruby CI tests in the end.

I am hoping to  use https://github.com/conda-forge/ for CI. It's three-odd commands to get a working CL install. Are the ruby CL bindings packaged for conda-forge?

I think we need at least a samples/bindings directory or a top level bindings directory.

Personally, I think I'd prefer exposing all the bindings at the top level, with python, ruby as individual directories. If they're hidden under bindings, it just makes them less discoverable.

I was worried about cluttering the base folder, but you are probably right.

I am hoping to use https://github.com/conda-forge/ for CI. It's three-odd commands to get a working CL install. Are the ruby CL bindings packaged for conda-forge?

I install them using gem:
https://github.com/Kerilk/OpenCL-SDK/blob/0cf14269eec269a3cbb0de18844bd271c5034499/.github/workflows/presubmit.yml#L68-L69
ruby's own installer, but I am open to other mode of distribution.

So, if I understand clearly your message, you just want me to put my
examples I provided in examples of PyOpenCL in
https://github.com/Kerilk/OpenCL-SDK/tree/0cf14269eec269a3cbb0de18844bd271c5034499/samples
in order to give use cases of PyOpenCL. I suppose it would be better if I
introduce some explanations about the context, the use and the results of
the 3 examples I provided.
For example, would you like some explanations like these ones ?

PiXPU.py illustrates the Parallel Rate influence of a single job and that
it's necessary to divide the job to do by a specific number, depending of
the GPU or CPU, to get the best performance (it's also a prime number
detector ;-) ). RNG using integers and explorations on different kinds of
variables It's also a coarse grain code, with very reduced memory
fingerprint and low memory access
NBody.py shows the artefacts between different implementaions of OpenCL
and results. User can visualise with OpenGL the resulsts and swap between
speed and positions of particles. It's a fine grain code with low memory
fingerprint but high memory stress.
TrouNoir.py (probably better to rename it BlackHoleAccretion.py) is the
porting of C code, heriting from Fortran 77 code. I explore several
strategies of parallelization of simulation and it's available in OpenCL
and CUDA. The memory fingerprint can overload any GPU by generating
billions pixels images. I largelly use it to compare 30 years of CPU and
GPU 2 years ago.
https://www.linkedin.com/pulse/episode-3-la-gépufication-dun-code-pour-simuler-un-trou-quemener
or the conference done in january 2020 :
http://www.cbp.ens-lyon.fr/emmanuel.quemener/documents/CRAL-200131.pdf

For these 3 examples, the initial goal was to compare performances (so
metrology included) and portabilty for all OpenCL devices and
implementations.
In fact, I oftenly use these 3 codes as "Matrix" codes : is this that your
have in mind ? Showing that sample codes can be used to start a project
(using perturbation method).
If you confirm that I have understood your wishes correctly, I will put my
examples is a specific folder, for example, samples/python/reallife or
samples/python/metrology
Le mer. 12 mai 2021 à 19:23, Andreas Klöckner @.***> a
écrit :

@numa65536 https://github.com/numa65536 Thanks for your response, and
for your willingness to help. Also, I should have explained the context
better. (Sorry!) This is not about a new approach at all. To my mind, the
purpose of this SDK is simply to have a collection of examples of OpenCL in
use, similar to what some vendors provide for their APIs. The idea is to
help potential users get started by being able to draw inspiration from
existing examples.
In this case, my view is that we would simply include some examples of the
use of PyOpenCL here in order to give potential users a glimpse of that
"way of doing business". From your end, this shouldn't look any different
from having the same code live in PyOpenCL's examples.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/KhronosGroup/OpenCL-SDK/issues/30#issuecomment-839956798,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA2Y5JNVXGR25E66H3S3JILTNK2QLANCNFSM44R2PHUQ
.

So, if I understand clearly your message, you just want me to put my examples I provided in examples of PyOpenCL in https://github.com/Kerilk/OpenCL-SDK/tree/0cf14269eec269a3cbb0de18844bd271c5034499/samples

No I don't think so, I just wanted to open the discussion so that we would create pull requests with some coherency. But I see @inducer has open one already:
https://github.com/KhronosGroup/OpenCL-SDK/pull/31
I will refactor mine to match the same architecture.

I think #31 is ready for a first look. No idea if the CI passes. I've left @numa65536's app-level examples out for now to avoid complicating the copyright assignment process. Maybe he can add these later (perhaps in the versions from https://github.com/inducer/pyopencl/pull/470)

Since we've merged the first round of python samples (see #31) can we close this issue?


AOT compile

Hi, thanks for this great library.
I am trying to compile to AOT but I get the following error:
Error: Error encountered resolving symbol values statically. Could not resolve ng2-sharebuttons relative to..
Does the libarary support AOT at this time?
Thanks!

Hi @MurhafSousli I now get the compile error
Property 'tCount' is private and only accessible within class 'ShareButtonsComponent'.
Using version 1.1.3

We are having a similar issue but with Angular Universal and ng2-sharebuttons, the only error message we get is Uncaught Exception invalid token export If we remove ng2-sharebuttons, then this error disappears. Any ideas?

Hi guys,
@doorman02: Sorry,  we indeed miss that in PR #21.
I'll have a look tonight.
@u12206050:  did you try temporary fix mentioned by @doorman02? (removing  private modifier from tCount and buttons in share-buttons.component.js?
Cheers,

Can confirm that this is fixed in Angular Universal. I was getting the same Uncaught Exception invalid token export using version 1.1.5 but updating to version 2.0.0 (currently published as beta on npm) fixed it for me.


risc0 → python ZKVM

Hello everyone, risc0 is a zkvm implemented in rust. Is there a zkvm project implemented in python? It can be better combined with python programs.

One that I know of is stark-brainfuck. However, it is meant as an explainer of how zkVMs work, and I'm pretty sure it's too slow & memory hungry for anything beyond toy problems.

Hello everyone, risc0 is a zkvm implemented in rust. Is there a zkvm project implemented in python? It can be better combined with python programs.

We have a binary called r0vm that can run guest code. You could do something like subproccess calls in python to this binary to get it to work with python


Better recursive paging

Make recursive paging more flexible

@Rexios80 thanks for the PR. could you update the docs with some of these new features, and behaviors?

This is mostly in preparation for #55 so no behavior changed. The only addition is the fetchAllPackages call.

@leoafarias Do you need anything from me on this?


[BUG] cluster owners are made to re login if a cluster is stuck in removing state

Rancher Server Setup

Rancher version: v2.6-head a3b5237
Installation option (Docker install/Helm Chart):

If Helm Chart, Kubernetes Cluster and version (RKE1, RKE2, k3s, EKS, etc): RKE1 v1.24.4

Proxy/Cert Details: BYO-valid

User Information

What is the role of the user logged in? (Admin/Cluster Owner/Cluster Member/Project Owner/Project Member/Custom)
Cluster owner. Tested for a cluster member, admin and restricted admin

Describe the bug
When a cluster is stuck in removing state for a cluster owner, if we try to refresh the UI after a few minutes, the cluster owners get a 401 must authenticate and are made to re login to access the rancher server.
To Reproduce

Create an rke2 node driver cluster [I tried with AWS and Linode]as an admin
Create a standard user and add the user to the downstream rke2 as a cluster owner
Delete the rke2 cluster as admin
Notice the cluster stays in removing state for the cluster owner because of the issue noted here https://github.com/rancher/rancher/issues/36072#issuecomment-1244122612
Wait for a few minutes approximately 15 min refresh the UI for cluster owner

Result
Noticed the cluster owner gets a 401 and made to re login.
GET
	https://<rancherIP>/v3/users?me=true
POST
	https://<rancherIP>/v3/tokens?action=logout
GET
    https://<rancherIP>/v3/principals

type	"error"
status	"401"
message	"Unauthorized 401: must authenticate"

Expected Result
Not expected cluster owners to get a 401 and made to re login.
Additional context
Note: I was able to reproduce this 2 out of 4 times.
Do not see this for cluster members and restricted admins.

backport /v2.6.10


Implemented Maximizing Expression

Related Issue

#1533

Proposed Changes

Code to implement Maximize Expression
Readme file for the same.

Additional Info

All kind of information is in the readme file as well as comments present in the code file wherever necessary.

Checklist

[x] ✅ My code follows the code style of this project.
[x] 📝 My change requires a change to the README.
[x] 🎀 I have updated the README accordingly.
[x] 👀 I have read the CONTRIBUTING document.
[x] ✨ I have added tests to cover my changes.
[x] 🚩 All new and existing tests passed.
[x] 🌟 ed the repo

I have implemented the Maximize Expression problem using the concept of the Bit Manipulation technique.

The problem shows how to maximize the given expression by taking the value of X and Y from the input and which can solve some real-life problems.

This concept is not yet implemented and it solves understanding about Maximizing Expression using the Bit Manipulation Technique.

It fixes #1533

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Output Screenshots

Screenshot #1

Code

Screenshot #2

Output

@all-contributors please add @072arushi code


How to use this Source for mobile APP.

Hi,
pls any one suggest me that how could use this jabbr web application for mobile app.
i can get all signalr methods functionalities from hosted server. but i could not brake the authentication.
probably i use cordova for mobile development.but login authentication gives me big trouble.
please please any one suggest me how to resolve this. its based on cookie based authentication .is there any possible for override this concept into mobile ?? .. i m in the urgent to solve this.. waiting for ur help.....
Vasanth.

Your question is more of a stackoverflow question not an issue for this repo. You will get more help there with signalR and mobile tags.


Tables Implementation

This includes:
•	the table client
•	relevant core updates
•	table tests
•	pom.xml is updated to reference apache commons lang
•	Updating useragent to v1.1.2

Merged took place in dev


Fixed flaky test

Q
A

Fixed Issues?
Fixes #2606

Patch: Bug Fix?
Yes

Minor: New Feature?
No

Major: Breaking Change?
No

Tests Added + Pass?
Not Applicable

Documentation Provided
No

Any Dependency Changes?
No

License
Apache License, Version 2.0

Waiting for the description to be updated.

Waiting for the description to be updated to review.

@deekshacheruku I have updated my description. Could you please review it?