Can't install extension via console

Please check screenshot. I think this issue is linked with service account permissions but i can find which service account is associated with extension.

@mkarkachov have you enabled Firebase on your project?

@mkarkachov have you enabled Firebase on your project?

ofc, i tried to install extension via console.firebase.google.com

@mkarkachov have you enabled Firebase on your project?

We can close ticket. Service account "Google APIs Service Agent" was missed, not sure how it was happened :) Restored it with Editor role and all works as expected.


Add #[pyo3(from_python_with = ...)] attribute

I've been thinking for a while it would be interesting to have an attribute which can be used to customize the from-python conversion in our proc macros. This need has come up in Gitter as well as #884.
The attribute will go on #[pyfunction] arguments or #[derive(FromPyObject)] fields. It takes a value which is a path to a function fn (&PyAny) -> Result<T, E>, where T is the annotated type and E: Into<PyErr>. For examples see the detailed design below.
This issue is invite users to comment on the design and for anyone interested to volunteer to implement it (before I eventually get around to it).
In detail, the two applications I see for this attribute are:
In #[pyfunction] arguments
Consider the following pyfunction:
#[pyfunction]
fn foo(datetime: chrono::DateTime) { ... }

Currently chrono::DateTime does not implement FromPyObject, so this function won't compile. An existing workaround is to create a newtype MyDateTime(chrono::DateTime) and implement FromPyObject for that, but it's a lot of boilerplate.
The attribute would allow the user to leverage a single function without adding extra types:
fn extract_datetime(any: &PyAny) -> PyResult<chrono::DateTime> { ... }

#[pyfunction]
fn foo(
    #[pyo3(from_python_with = extract_datetime)]
    datetime: chrono::DateTime
) { ... }

On #[derive(FromPyObject)] fields
Similarly, this applies in a #[derive(FromPyObject)] struct:
#[derive(FromPyObject)]
#[pyo3(transparent)]
struct Foo {
    #[pyo3(from_python_with = extract_datetime)]
    datetime: chrono::DateTime
}

The cool thing here is that this lets us add #[derive(FromPyObject)] to a struct which has a field which itself doesn't implement FromPyObject.
Bikeshedding

should it be from_py_with instead of from_python_with?
should the function be allowed to take more specific argument types than &PyAny? E.g. in the examples above it could be helpful to take &PyDateTime. But it's also trivial to convert PyAny with .downcast().

cc @gilescope

Hi, I would like to try to implement this, if it's okay.
I haven't touched procedural macros yet though so I think it may take a while

Hi, I would like to try to implement this, if it's okay.
I haven't touched procedural macros yet though so I think it may take a while

Go for it! (quote! macro is usually pretty helpful with proc macros)
On Tue, 12 Jan 2021 at 11:03, Daniil Konovalenko<EMAIL_ADDRESS>wrote:

Hi, I would like to try to implement this, if it's okay.
I haven't touched procedural macros yet though so I think it may take a
while
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/PyO3/pyo3/issues/1239#issuecomment-758581268, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGEJCCP4K73EY4DOD2FGELSZQUBNANCNFSM4SRUEOGQ
.

Go for it! (quote! macro is usually pretty helpful with proc macros)
On Tue, 12 Jan 2021 at 11:03, Daniil Konovalenko<EMAIL_ADDRESS>wrote:

Hi, I would like to try to implement this, if it's okay.
I haven't touched procedural macros yet though so I think it may take a
while
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/PyO3/pyo3/issues/1239#issuecomment-758581268, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGEJCCP4K73EY4DOD2FGELSZQUBNANCNFSM4SRUEOGQ
.

Please feel welcome to take it on! I'm happy to answer any questions you have.

Please feel welcome to take it on! I'm happy to answer any questions you have.


[WIP] Update to match jvm 0.14

Includes support for PersistenceQuery

Any idea how to review that (9 KLOC changes, nice! ;) )? Or why the tests are failing?

@Horusiath no idea how to review, sorry. It's a full rewrite. Tests were failing because the streams and persistence query packages where not public yet.

Tests are still failing.

Constantin, have you had a chance to look at the unit test failures? Any specific items I could help out with?

looking at this shortly


Add Clojure

~84% as fast as Java.
AOT compilation to Java classes makes no difference in this case, performance-wise it speeds up only startup time.

Thanks! It was added.


rake aws_record:migrate broken with two table configs on the same model

When creating two global secondary indexes for the same model, this leads to the following error message:
$ rake aws_record:migrate
running db/table_config/gsi_user_login.rb
running db/table_config/user_email_gsi.rb
Aws::DynamoDB::Errors::LimitExceededException: Subscriber limit exceeded: Only 1 online index can be created or deleted simultaneously per table (Aws::DynamoDB::Errors::LimitExceededException)

It gets especially weird: When I uncomment one global_secondary_index from the user model, rake aws_record:migrate runs just fine (so it's not the db/table_config files). When I then Re-Insert the global_secondary_index in the user model and run rake aws_record:migrate again, all indexes are created correctly.
So the gem can't correctly handle if two global_secondary_indexes are defined in the same model and the migrations will be run after each other.
class User
  include Aws::Record

  string_attr :user_email
  string_attr :user_login

  global_secondary_index(:user_email_gsi,
                         hash_key: :user_email,
                         projection: { projection_type: 'ALL' })

  global_secondary_index(:user_login_gsi,
                         hash_key: :user_login,
                         projection: { projection_type: 'ALL' })

end

db/table_config/gsi_user_login.rb
require "aws-record"

module ModelTableConfig
  def self.config
    Aws::Record::TableConfig.define do |t|
      t.model_class User
      t.billing_mode "PAY_PER_REQUEST"
      t.global_secondary_index(:user_login_gsi)
    end
  end
end

db/table_config/user_email_gsi.rb
require "aws-record"

module ModelTableConfig
  def self.config
    Aws::Record::TableConfig.define do |t|
      t.model_class User
      t.billing_mode "PAY_PER_REQUEST"
      t.global_secondary_index(:user_email_gsi)
    end
  end
end

Thanks for opening an issue. The error you encountered is a service side error - it looks like you are modifying the same table at the same time. I actually think you only need one migration here. t.global_secondary_index appends to a hash before execution. Try just a single migration:
module ModelTableConfig
  def self.config
    Aws::Record::TableConfig.define do |t|
      t.model_class User
      t.billing_mode "PAY_PER_REQUEST"
      t.global_secondary_index(:user_email_gsi)
      t.global_secondary_index(:user_login_gsi)
    end
  end
end

That seems to work, thank you.

Sorry, I have to reopen. I run into the same issue again:
# db/table_config/gsis_user.rb.rb
require 'aws-record'

module ModelTableConfig
  def self.config
    Aws::Record::TableConfig.define do |t|
      t.model_class User
      t.billing_mode 'PAY_PER_REQUEST'
      t.global_secondary_index(:user_email_gsi)
      t.global_secondary_index(:telegram_username_gsi)
    end
  end
end

class User < BaseModel
  include Aws::Record
  include ActiveModel::Validations
# […]
  global_secondary_index(:user_email_gsi,
                         hash_key: :user_email,
                         projection: { projection_type: 'ALL' })

  global_secondary_index(:telegram_username_gsi,
                         hash_key: :telegram_username,
                         projection: { projection_type: 'ALL' })

results with dynamodb local in
running db/table_config/gsis_user.rb.rb
rake aborted!
Error deleting table: Subscriber limit exceeded: Only 1 online index can be created or deleted simultaneously per table

You mentioned this issue for dynamodb local. Does it work in dynamodb production?

@mullermp Just tried it in production, it also breaks in production with the real dynamodb.
I have a own rake task in an own namespace, which does as first task Rake::Task['dynamo_db:reset_db'].invoke.  That's when it fails. Let me know if you need more info to help.

Yeah, what's in that reset db task? I don't think that is anything we have defined in this gem.

Oh, sorry, I oversaw that, my bad. In the end it calls Rake::Task['aws_record:migrate'].invoke. For reference, here's the code:
namespace :dynamo_db do
  desc 'Reset Database'
  task reset_db: :environment do
    if Rails.env.production? && ENV['RESET_PROD_DB'].blank?
      raise 'When running in production, you need to set env RESET_PROD_DB'
    end
    begin
      db = Aws::DynamoDB::Client.new

      # Check if using DynamoDB Local or AWS DynamoDB
      if db.config.endpoint && db.config.endpoint.to_s.include?('localhost')
        puts 'Using DynamoDB Local'
      else
        puts 'Using AWS DynamoDB'
      end
      table_name = BaseModel.table_name
      puts "Deleting DynamoDB table: #{table_name}"
      db.delete_table(table_name: table_name) rescue nil
      puts 'Waiting for table deletion'
      db.wait_until(:table_not_exists, table_name: table_name)
      puts "Table #{table_name} successfully deleted."

      Rake::Task['aws_record:migrate'].invoke
    rescue Aws::DynamoDB::Errors::ServiceError => e
      raise "Error deleting table: #{e.message}"
    end
  end
end

@mullermp Thanks for the feedback! While I understand the concern about potential overloading, I believe the reset_db task is appropriately designed :
1.	The rescue nil is intentional because the delete operation isn’t always guaranteed (e.g., if the table doesn’t exist). However, I agree that being too broad could obscure legitimate issues, and I might refine this. I don't think that this is the cause of the problem, because i still do the wait_until, unless that's broken. Creating or updating the table is exactly what I want btw, so nothing bad about this.
2.	The task’s steps (delete, wait, migrate) reflect my requirement to reset the state completely before applying changes. ActiveRecord features something similar with rake db:migrate:reset.
I’ll add debugging code like you suggested to track it down.

Deletion and creation in the same task is fine. My point is that rescuing from the base service error is fairly broad - you probably want to handle cases where deletion failed, or creation failed. Somehow I think update_table is being called. From what I can find, that error you are getting is from update_table called by migrate! in the table config. I think we just need to track down what calls are made there with a logger/wire trace.
As far as waiting goes, if the table doesn't exist, it should rescue and return nil immediately for you:
[3] pry(Aws)> dynamodb.wait_until(:table_not_exists, table_name: 'asdf')
[Aws::DynamoDB::Client 400 0.318157 0 retries] describe_table(table_name:"asdf") Aws::DynamoDB::Errors::ResourceNotFoundException Requested resource not found: Table: asdf not found
=> nil

@mullermp The problem is still a real. As soon as I create two indexes in the same model, it's dysfunctional and I can't create indexes. Please try it for yourself, here is the exact steps to recreate the problem:
Create a new rails app
rails new checkme --css=tailwind --skip-active-record --skip-action-mailbox && cd checkme
Add SDK To Gemfile
gem 'aws-sdk-rails'
gem 'aws-record-rails'

Create an initializer
# config/initializer/aws.rb
aws_config = {
  log_level: Rails.env.production? ? :warn : :debug,
  region: Rails.application.credentials.dig(:aws, :region) || "eu-central-1",
  credentials: Aws::Credentials.new('test', 'test')
}

Aws.config.update(aws_config)
if Rails.env.development?
  DYNAMODB_ENDPOINT = "http://localhost:8000"
  Aws.config.update(dynamodb: { endpoint: DYNAMODB_ENDPOINT })
end

Create a base model
# app/models/base_model.rb
require "aws-record"
require "active_model"

class BaseModel
  include ActiveModel::Model
  include ActiveModel::Validations
  include Aws::Record
  extend ActiveModel::Callbacks
  define_model_callbacks :save, :update

  set_table_name "checkme"
  string_attr :hk, hash_key: true
  string_attr :rk, range_key: true
  string_attr :gsi_filter                 # Multi Function Filter Key
  string_attr :gsi_filter_rk            # Multi Function Filter Value

  global_secondary_index(:filter_gsi,
                         hash_key: :gsi_filter,
                         range_key: :gsi_filter_rk,
                         projection: { projection_type: "ALL" })
end

Create a simple user model
# app/models/user.rb
class User < BaseModel
  include Aws::Record
  include ActiveModel::Validations

  string_attr :user_email
  string_attr :telegram_username

  validates_presence_of :user_email

  global_secondary_index(:user_email_gsi,
                         hash_key: :user_email,
                         projection: { projection_type: "ALL" })

  # FIXME https://github.com/aws/aws-sdk-ruby-record/issues/143
  global_secondary_index(:telegram_username_gsi,
                         hash_key: :telegram_username,
                         projection: { projection_type: "ALL" })
end

Create table configs for the models
# db/table_config/base_model_config.rb
require "aws-record"

module ModelTableConfig
  def self.config
    Aws::Record::TableConfig.define do |t|
      t.model_class BaseModel
      t.billing_mode "PAY_PER_REQUEST"
      t.global_secondary_index(:filter_gsi)
    end
  end
end

# db/table_config/gsis_user.rb
require 'aws-record'

module ModelTableConfig
  def self.config
    Aws::Record::TableConfig.define do |t|
      t.model_class User
      t.billing_mode 'PAY_PER_REQUEST'
      t.global_secondary_index(:user_email_gsi)
      # FIXME https://github.com/aws/aws-sdk-ruby-record/issues/143
      t.global_secondary_index(:telegram_username_gsi)
    end
  end
end

Run the migration
(assuming we have dynamodb local running, but same problem also appears in production)
. $ rake aws_record:migrate
running db/table_config/base_model_config.rb.rb
running db/table_config/gsis_user.rb.rb
rake aborted!
Aws::DynamoDB::Errors::LimitExceededException: Subscriber limit exceeded: Only 1 online index can be created or deleted simultaneously per table (Aws::DynamoDB::Errors::LimitExceededException)

Tasks: TOP => aws_record:migrate
(See full trace by running task with --trace)

Thanks for the reproduction steps. I'll try to recreate this on Monday.

@mullermp have a nice weekend:)

Ok, so I am able to reproduce this, but I think this is expected behavior. What was not clear in your previous snippets was that you were running two migrations on the same table again (specifically, your base model config). I believe this was discussed earlier but I may have not done a good job explaining it. Table configs are intended to be declarative for a single table only. I understand you are using a base model for reusing code for your models, and that part is fine. However both your base model and the user model have the same table. You should only need one table config per table. Your migration should be:
# note - name your table configs after your table since they are 1:1
# should probably be users instead of checkme.
# consider also single table design: https://aws.amazon.com/blogs/compute/creating-a-single-table-design-with-amazon-dynamodb/

# db/table_config/checkme.rb
require 'aws-record'

module ModelTableConfig
  def self.config
    Aws::Record::TableConfig.define do |t|
      t.model_class User
      t.billing_mode 'PAY_PER_REQUEST'
      t.global_secondary_index(:user_email_gsi)
      t.global_secondary_index(:filter_gsi)
      t.global_secondary_index(:telegram_username_gsi)
    end
  end
end

If you're looking to reuse configuration for each of your tables, similar to having your base model, you could add a utility method perhaps:
# db/base_table_config.rb
module BaseTableConfig
  def self.base_config(t)
    t.billing_mode "PAY_PER_REQUEST"
    t.global_secondary_index(:filter_gsi)
  end
end

# db/table_config/checkme.rb
require 'aws-record'
require_relative '../base_table_config'

module ModelTableConfig
  def self.config
    Aws::Record::TableConfig.define do |t|
      t.model_class User
      BaseTableConfig.base_config(t)
      t.global_secondary_index(:user_email_gsi)
      t.global_secondary_index(:telegram_username_gsi)
    end
  end
end

@mullermp Thanks for taking the time. Unfortunately, this hasn't led to a success yet either, so any way I turn it, I still get the same result regarding the index.
Let me maybe explain the (I think fairly straightforward) setup to make sure we're on the same page:

I use a single table dynamodb table only, STI
I have a ActiveModel (the base_model.rb) which defines hash and range keys, some basic callbacks like setting created_at/by + updated_at/by plus some secondary indexes which are valid for all types of data (like an index on last_changed_at). The type of item is hardcoded in the hash key (something like id1234|USER). This way way I implement easily e.g. a find_by_id class which inherits to all subclasses (translating into build_query with id1234|CLASS_NAME).
I have about 7-8 other classes (like User, Tenant, …) which are based on the base_model. Again, it's all STI so the base_model defines the table_name and all the data is using it. That should be standard AWS practice.

Regarding secondary indexes:

The base_model defines basic secondaries like the GSI on updated_at (same hash key like id1234|CLASS_NAME and range key for updated_at) eg via:

  global_secondary_index(:updated_at_gsi,
                         hash_key: :hk,
                         range_key: :updated_at_epoch,
                         projection: { projection_type: 'ALL' })

The models themselves define other indexes they might need for their specific data (like user_email for the User Model:

  global_secondary_index(:user_email_gsi,
                         hash_key: :user_email,
                         projection: { projection_type: 'ALL' })

Maybe I haven't understood the idea of the migrations correctly, but the documentation for Aws::Record::TableConfig leaves more questions open for me than it answeres. Let me maybe face my problems/questions.
I understand that Aws::Record::TableConfig.define is just there to support the rake aws_record:migrate task so it can create/modify/add missing config data to the dynamodb table itself. As I only use PAY_PER_USE, the only meaningful configuration I supply there is my global_secondary_index (otherwise there would be no reason to redefine the global_secondary_index again as it's already defined in the model).
I don't actually really understand why I have to define a model_class as it this doesn't make sense in the (AWS recommended) way to use STI, as all models are basically mapping to the same data in the same table, which means you can't have different capacity configs anyway. And the global_secondary_indexes are globally defined for the tables anyway, so a self.build_query.on_index(:user_email_gsi) command doesn't care from what model I call it.
So technically the config I would like to have in an ideal world would be:
require 'aws-record'
module ModelTableConfig
  def self.config
    Aws::Record::TableConfig.define do |t|
    t.model_class BaseModel # This is even superfluous IMHO, but anyway.
    t.billing_mode 'PAY_PER_REQUEST'
    t.global_secondary_index(:filter_gsi)
    t.global_secondary_index(:item_id_gsi)
    t.global_secondary_index(:updated_at_gsi)
    t.global_secondary_index(:user_email_gsi)
    t.global_secondary_index(:telegram_username_gsi)
    end
  end
end

But that one doesn't work as I get an error
Aws::DynamoDB::Errors::ValidationException: The table does not have the specified index: user_email_gsi (Aws::DynamoDB::Errors::ValidationException)
The config how it's documented in https://docs.aws.amazon.com/sdk-for-ruby/aws-record/api/Aws/Record/TableConfig.html does only make sense in my understanding if you maintain a table per class, which is against AWS STI recommended practices.
So either I understood everything totally wrong or the way Aws::Record::TableConfig.define is built doesn't really align to STI practices.
Please enlighten me, what is the shortest and most recommended way to get my simple requirements working:

Single Table Deisgn
Multiple Models, inheriting from the same base class
Simple Migration which just a) creates the table with the correct billing_mode and b) creates the secondary indexes.

@mullermp Hi Matt - just kindly checking in if you got any hint how the functionality is to be used with a STI model?

Hey. My understanding is that you should only have one table config class per table, regardless of using STI or not. That is because the table configs are declarative, for a single table. When you are running multiple table configs against one table, DynamoDB throws that error you are seeing, because it's already modifying the table. If you really want to have multiple table configs for the same table, you'll probably have to run them manually and not through the rake task, with some sleeping or some "waiter" that checks status of the table. If you are using multiple tables, you can share logic using the module approach. You may have multiple models for a single table and use inheritance as you've already done. As far as designing your STI, I am probably not the best person to consult for that.
Perhaps @alextwoods can provide any input or guidance.

Yeah, you're right that the TableConfig just does not map well to STI - I believe it was added in the library well before STI became a common/recommended pattern and we haven't added better abstractions to account for it.
The way you have structured your BaseModel and User, ect models using the same table make sense to me - I think thats generally the correct way to do that.
As to the TableConfig though - it does really fall apart.  Its an area of this gem that I don't personally love - in my own projects, I've generally preferred using cloudwatch/cdk to manage the infrastructure....  Anyway, that being said, I'd potentially recommend creating a "migration" only model that represents the desired state of the table, but doesn't have domain behavior (ie, letting you define the name/primary/secondary keys/gsi and nothing else.  I know thats not ideal though.  Improving this libraries STI functionality has been on my general list for awhile, but the changes I'd want to do would definitely require a new major version.

@alextwoods @mullermp thanks for the reply and the reinforcement of my doubts. It's not really built for the way DynamoDB is intended to be used.
I read in issue 142 that your work on aws-record is deprioritized, which is really a pity. I would really love to urge you to reconsider your position as seeing Ruby on Rails (especially in its current renaissance) as a second-class-citizen which it seems to have become the last years.
Quick Backstory:
I was involved in the development of many Rails apps highly utilizing DynamoDB (+Elastic/OpenSearch), deployed via FarGate which is a really winning combination for highly scaling apps which pose nearly no maintenance. Those apps are still running gazillions of records and are super rock solid. DynamoDB is an amazing product and IMHO for many applications the better backend than MySQL+Co is.
Back in the days when DynamoDB started, we started out with really basic-handcoding of every DynamoDB interaction, effectively building half of aws-record.
Then Dynamoid (https://github.com/Dynamoid/dynamoid) came out, which is a great effort and offers a great developer experience (sorry to say, I think way better developer experience then aws-record(-rails)), but unfortunately the developer pushed it into a direction of emulating MySQL: Multitable, Pseudo-Association-Relations, etc. which effectively is a really bad design pattern and does not conform to the STI idea of DynamoDB.
But it has many features out of the box which aws-record(-rails) should have, for example easy finder methods (find, find_by_id, where, .all, etc.) out of the box, updated/created_at timestamps, easy table configuration + working migrations, a .create method, support OOTB for validation callbacks, easy integration of third party classes (like Money), etc. Just take a look at the README, it's better documented and has a better API. But still there's the downside with the wrong design pattern. Yes, it does some kind of STI, but it's not fish, not meat. But in the end, that's the libary which should have come from AWS.
So that's why I decided against using Dynamoid in my projects but rather rely on aws-record. But of course it's not reassuring to start building larger apps on a technical basis where "We have not prioritized aws-record work right now".
Fast Forward: I really wish you would promote the use of DynamoDB much more, involve in the Rails community and give the GEM a real push by providing a great developer experience.
My ideal wish list for aws-record(-rails) would be:

First Class Rails support, including those developer-experience-features mentioned for Dynamoid
Native Support for using ActiveJob with DynamoDB + SQS
Integration and support for the searchkick (https://github.com/ankane/searchkick) gem to index the records written to Elastic/OpenSearch
If you think maybe CDK would make more sense, why not use CDK to run migrations on tables for aws-record-rails. All better than the current state.

Ideally the aws-sdk-rails would also make a deployment to Fargate (including main app + workers) a breeze, but that's maybe even another different story.
It's really a pity that your own integration of DynamoDB for Ruby+Rails doesn't support THE main architectural STI pattern of DynamoDB.
At the moment, you have to work around a lot of shortcomings and problems of the gem if you really want to seriously use it.
Just my 2 cents. Happy to give more input if required.


_includes: regen function docs

This change is

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/8f5f2bd2183e467b3523023e5c02c82fe717a86f/


Thanks

URL to the linked Repo/Org:
Steps to reproduce the problem:

What is the expected result?
What happens instead?

Thank you for positive feedback 😃


Edit Menu appears behind Swift Entry Kit when selecting text

So when I select text (in a WKWebView, but I've also seen this happen with normal UITextViews), the Edit Menu popup appears behind the View Controller that I've presented with Swift Entry Kit.
To Reproduce
Steps to reproduce the behavior:

Present custom view controller
Select text in UITextView/WKWebView
See error

Here's a screenshot:

The Edit menu appears in the back....

same issue....

@MichaelHuyp I ended up just presenting this normally, with present(_:animated:completion:).

@aheze
/**
     Displays a given entry view using an attributes struct.
     - A thread-safe method - Can be invokes from any thread
     - A class method - Should be called on the class
     - parameter view: Custom view that is to be displayed
     - parameter attributes: Display properties
     - parameter presentInsideKeyWindow: Indicates whether the entry window should become the key window.
     - parameter rollbackWindow: After the entry has been dismissed, SwiftEntryKit rolls back to the given window. By default it is *.main* which is the app main window
     */
    public class func display(entry view: UIView, using attributes: EKAttributes, presentInsideKeyWindow: Bool = false, rollbackWindow: RollbackWindow = .main) {
        DispatchQueue.main.async {
            EKWindowProvider.shared.display(view: view, using: attributes, presentInsideKeyWindow: presentInsideKeyWindow, rollbackWindow: rollbackWindow)
        }
    }

RollbackWindow Appointed as keywindow Fixed this problem


[BugFix] Fix partition prune null predicate error

Signed-off-by: Seaven<EMAIL_ADDRESS>What type of PR is this：

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

Which issues of this PR fixes ：

Fixes https://github.com/StarRocks/starrocks/issues/17204

invaild predicate can't pruned
Problem Summary(Required) ：

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto backported to target branch

[ ] 2.5
[ ] 2.4
[ ] 2.3
[ ] 2.2

[FE PR Coverage Check]
:heart_eyes: pass : 3 / 3 (100.00%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/analysis/LiteralExpr.java
1
1
100.00%
[]

:large_blue_circle:
com/starrocks/sql/optimizer/rule/transformation/PartitionPredicatePrune.java
2
2
100.00%
[]

I don't think the problem in the issue is a really problem.

run starrocks_admit_test


Metadata

Added some ua specific metadata, minor restructuring.  has some node from the causeEx ontology that Mitre requested

@BeckySharp and/or @vanh17, can you tell me what these take_args things are?  Eidos doesn't use them and a few remain in the ontology to this day.  Are they for a different reader?  Thanks.


Add shadow mapping to renderer

To enhance visual appearance of the map I'd like to suggest adding shadow mapping like e.g. here for data sources with extruded buildings. Seems like first steps in that direction have been taken by @karimnaaji, see examples here and here.
Is anything shadow-related currently planned or in progress? Do you support/object the idea?

Hi @grefab, thanks for the interest and apologies for leaving this unanswered.
We have also been keen on the idea of shadow mapping for 3D geometry! I also really like those examples by Karim.
When we've thought about this feature in the past, a few things arise that make shadows difficult:

Tangram is built around an extremely customizable pipeline - users can literally write the GLSL shaders used to render the scene. This means we can't make many assumptions about the shading pipeline, we'd have to give users control over the application of shadows if we wanted it to work well in all scenarios.
Tangram runs on a very wide range of hardware, and not all the target devices support things like depth textures (which makes shadow mapping much simpler). To implement shadows well, we'd probably need to implement multiple pipelines for different device capabilities.

In the end, since Tangram maps are typically more focused on clarity and flexibility than on photo-realism, we're not going to prioritize shadow mapping in the near future.
(However, if someone else figured out a nice implementation we certainly wouldn't mind ;) )

Tangram runs on a very wide range of hardware, and not all the target devices support things like depth textures (which makes shadow mapping much simpler). To implement shadows well, we'd probably need to implement multiple pipelines for different device capabilities.

For future references or anyone interested in this support for Tangram, I'll draft the pipeline I had for shadow mapping that can be inspired of. It appears to be working quite nicely on a wide range of hardware so far, and solves some of the issues mentioned.

Lack of depth texture support or floating point texture: for this the trick to pack the depth data into a color texture (since writing to texture is to my knowledge, usually well-behaving on any ES 2.0 hardware), and unpack when sampling the depth. This 'packing' pass to generate the depth texture only needs to be generated when tiles are added or deleted (It is not necessary to run every frame).

GLSL code to pack depth data:
// Stores the 24 bits depth value in each 8 bits components, depth between 0..1
vec3 packDepth888(float depth) {
    vec3 packedDepth;

    packedDepth.x = depth * 65536.0;
    packedDepth.y = depth * 256.0;
    packedDepth.z = depth;
    packedDepth.x = fract(packedDepth.x);
    packedDepth.y = fract(packedDepth.y) - packedDepth.x / 256.0;
    packedDepth.z = fract(packedDepth.z) - packedDepth.y / 256.0;

    return packedDepth;
}
// used as gl_FragColor= vec4(packDepth888(gl_FragCoord.z), 1.0);

Debug view of such a texture:

When reading from it:
float unpackDepth888(vec3 depthRGB) {
    return depthRGB.r / 65536.0 + depthRGB.g / 256.0 + depthRGB.b;
}
float texture2DCompare(sampler2D depths, vec2 uv, float compare) {
    return step(compare, unpackDepth888(texture2D(shadowMap, uv).rgb));
}
float getShadow(sampler2D shadowMap, float shadowBias, vec4 shadowCoord) {
    vec2 uv = shadowCoord.xy * 0.5 + vec2(0.5);
    float shadowCoordDepth = (0.5 * shadowCoord.z + 0.5) - shadowBias;
    if (uv.x < 0.0 || uv.y < 0.0 || uv.x >= 1.0 || uv.y >= 1.0) { return 1.0; }
    return texture2DCompare(shadowMap, uv, shadowCoordDepth);
}

Lack of NPOT texture, instead of making a framebuffer with an attached texture of the size of the viewport, simply shrink it to a 512x512 texture to have support over a wider range of devices. At sampling time, shadow artifact can appear (Also refer https://software.intel.com/en-us/articles/dynamic-resolution-rendering-on-opengl-es-2).

Shadow artifact, use a bias and increase shadow map resolution: the goal to do so is to 'fit' the cuboid volume of the shadow caster to the scene area, sample code for this:

// Assuming boundingBox encompasses the whole set of visible tiles for the current viewport:
FrustrumFit fit(BBox boundingBox, glm::vec3 sunDirection) {
    glm::vec3 up = glm::vec3(0.0, 0.0, 1.0);
    glm::vec3 center = glm::vec3(0.0);
    glm::vec3 at = -sunDirection;
    glm::mat4 view = glm::lookAt(at, center, up);

    // Kill translation component
    view[3][0] = 0.0;
    view[3][1] = 0.0;
    view[3][2] = 0.0;

    glm::vec3 BBoxCorners[8] {
        glm::vec3(boundingBox.max.x, boundingBox.min.y, boundingBox.min.z),
        glm::vec3(boundingBox.max.x, boundingBox.min.y, boundingBox.max.z),
        glm::vec3(boundingBox.max.x, boundingBox.max.y, boundingBox.min.z),
        glm::vec3(boundingBox.max.x, boundingBox.max.y, boundingBox.max.z),
        glm::vec3(boundingBox.min.x, boundingBox.min.y, boundingBox.min.z),
        glm::vec3(boundingBox.min.x, boundingBox.min.y, boundingBox.max.z),
        glm::vec3(boundingBox.min.x, boundingBox.max.y, boundingBox.min.z),
        glm::vec3(boundingBox.min.x, boundingBox.max.y, boundingBox.max.z),
    };

    BBox cameraSpaceBBox;
    for (int i = 0; i < 8; ++i) {
        glm::vec3 cameraSpaceBBoxPoint = view * glm::vec4(BBoxCorners[i], 1.0);
        cameraSpaceBBox = merge(cameraSpaceBBox, cameraSpaceBBoxPoint);
    }

    // Camera looking at -z
    double far = std::max(-cameraSpaceBBox.min.z, -cameraSpaceBBox.max.z);
    double near = std::min(-cameraSpaceBBox.min.z, -cameraSpaceBBox.max.z);

    glm::mat4 projection = glm::ortho(
        (double)cameraSpaceBBox.min.x,
        (double)cameraSpaceBBox.max.x,
        (double)cameraSpaceBBox.min.y,
        (double)cameraSpaceBBox.max.y,
        near, far);

   return { projection, view };
}

Thanks @karimnaaji


ERROR: "The project to be billed has not configured billing."

I did a fresh install of forseti-2-rc1 and in the initial scan that it is doing (which has been running for like 45 minutes), I see a lot of errors recurring (including the previously-mentioned issue with requestor pays buckets).
Currently, the /tmp/deployment.log has over 225,000 lines and growing. But when I sort | uniq -c | sort -rn on the file I see some errors recurring quite often.
For example, I have this same error on over 30,000 rows of the file currently, all referring to the same bucket.
{
  "error": {
    "errors": [
      {
        "domain": "global",
        "reason": "accountDisabled",
        "message": "The project to be billed has not configured billing.",
        "locationType": "header",
        "location": "Authorization"
      }
    ],
    "code": 403,
    "message": "The project to be billed has not configured billing."
  }

I agree that it's a useful error to know about, but It seems like it's spending too much effort retrying rather than proceeding to the next resource.

henry:
Is there anything else in issue #1349 that needs to be addressed?  Such as any of the specific errors themselves?  Or is the noisiness bit what you are really looking for?

lukas:
Well, it depends. If the existence of 250,000 rows in the file for the same error on the same resource is just happening because your log file is too chatty and keeps writing the same events over and over, then yes, fixing the duplicating of logs is a great root cause fix.

If the existence of those 250,000 rows for the same error on the same resource is because you checked that resource 250,000 times each time getting the same error. If that is the case, then I think trying 3 times is enough and then give up and move on to the next resource or call that one failed.

For example, if the bucket is requester pays and no billing project has been specified, then just write that error once and don't bother checking that resource again because it will not suddenly start working the next time.

I have looked into the repetition of the errors here, and below is what I found:

I can not reproduce the repeating errors, even though I have forced the exceptions to occur in my testing.

The behavior I observed is that the errors are handled once per distinct resource.

This matches the code that I reviewed, including that googleapiclient.errors.HttpError is not a retryable exception

So, can you please check your inventory process again?  Do you see the same issue on the latest codebase?  You should be able to verify this in stackdriver, after you have run the inventory process.

If you do see the same issue, can you please include the complete log record, including the initial 2 lines of each log record as bolded below?

2018-05-15 22:03:36,739 ERROR google.cloud.forseti.common.gcp_api.storage(get_bucket_iam_policy): GCP API Error: unable to get bucketIamPolicy, bucket = forseti-server-3520, from GCP:
<HttpError 404 when requesting https://www.googleapis.com/storage/v1/b/forseti-server-3520aaa/iam?alt=json returned "Not Found">
{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "notFound",
    "message": "Not Found",
    "debugInfo": "com.google.net.rpc3.RpcException: cloud.bigstore.ResponseCode.ErrorCode::BUCKET_NOT_FOUND: BUCKET_NOT_FOUND: No such bucket: forseti-server-3520aaa\n\tat com.google.cloud.bigstore.common.BigstoreException.toRpc3Exception(BigstoreException.java:118)\n\tat com.google.cloud.bigstore.api.json.framework.BackendCallUtil.call(BackendCallUtil.java:131)\n\tat com.google.cloud.bigstore.api.json.framework.BackendCallUtil.call(BackendCallUtil.java:61)\n\tat com.google.cloud.bigstore.api.json.handlers.iam.GetIamPolicy.handleRequestReceived(GetIamPolicy.java:74)\n\tat com.google.cloud.bigstore.api.json.handlers.iam.GetIamPolicy.handleRequestReceived(GetIamPolicy.java:23)\n\tat com.goog

2018-05-15 22:03:39,605 ERROR google.cloud.forseti.common.gcp_api.storage(get_bucket_iam_policy): GCP API Error: unable to get bucketIamPolicy, bucket = forseti-server-3634, from GCP:
<HttpError 404 when requesting https://www.googleapis.com/storage/v1/b/forseti-server-3634aaa/iam?alt=json returned "Not Found">
{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "notFound",
    "message": "Not Found",
    "debugInfo": "com.google.net.rpc3.RpcException: cloud.bigstore.ResponseCode.ErrorCode::BUCKET_NOT_FOUND: BUCKET_NOT_FOUND: No such bucket: forseti-server-3634aaa\n\tat com.google.cloud.bigstore.common.BigstoreException.toRpc3Exception(BigstoreException.java:118)\n\tat com.google.cloud.bigstore.api.json.framework.BackendCallUtil.call(BackendCallUtil.java:131)\n\tat com.google.cloud.bigstore.api.json.framework.BackendCallUtil.call(BackendCallUtil.java:61)\n\tat com.google.cloud.bigstore.api.json.handlers.iam.GetIamPolicy.handleRequestReceived(GetIamPolicy.java:74)\n\tat com.google.cloud.bigstore.api.json.handlers.iam.GetIamPolicy.handleRequestReceived(GetIamPolicy.java:23)\n\tat com.goog

Another update here.  If you got these errors from the /tmp/deployment.log, it is very likely the client's last warning output that is captured in the /tm/deployment.log as the inventory steps through additional resources.  So, it is more of a re-display rather than an actual retry.  If you can include a few more lines preceding the error, this would validate the assumption here.


Remove prefix from services

supersedes https://github.com/woodpecker-ci/woodpecker/pull/1960

i wonder where we get the collision :/


Unwanted angle bracket autocompletion in TypeScript

VSCode Version: 1.6
OS Version: Windows 10

When writing code in TypeScript, I often go to fix an expression by changing the comparison operator. I'll highlight the operator, such as the >= in if(a >= b) { ..., then type the correct operator, such as <. In VS Code 1.6, I've noticed that it is treating angle brackets in the same way as other types of brackets when applied to a selection, presumably for the purposes of improved editing of casting syntax and generic type arguments. In my example above, this means that rather than replacing my selection with the correct operator, it changes >= into <>=>, which is obviously not what was desired.
I want autocompletion in general, but I'd like to turn it off for angle brackets in TypeScript, as I find it more of a hindrance than a help. Is there an option for this, and if not, could it be added in a future version of VS Code? Note that turning it off should be a language-specific feature, as it would be undesirable to also turn it off for tsx, jsx, xml and html.

Huh, I see this too, only when highlighting a < or >. Not when highlighting something else.

This is very strange. Confirmed with latest Insider bits. @dbaeumer can you confirm that this is a JavaScript language service issue?

@waderyan it is not a language server issue. This is in the TS extension language configuration (vscode\extensions\typescript\language-configuration.json). And we added with for cast and generic types. Unfortunately this can not be disabled separately. Would be a feature request.

Would it be possible to perform a quick contextual check before applying brackets around the selection? Specifically, if there are no alphanumeric characters in the selection, then it shouldn't be applied. This would cover casting and generic types, as both would have alphanumeric characters within the selection. If the selection does not have any alphanumeric characters, then it's very probably not going to be a case where the user is trying to wrap a selection for casting or as a generic type.

@axefrog thank you for your feedback. This is a good suggestion.
@dbaeumer just to confirm I understand correctly - this issue should stay in VS Code and not be migrated to TypeScript? In other words who owns the TS extension language configuration (vscode\extensions\typescript\language-configuration.json)?

We :-)

I'm unable to repo in current insiders builds. I believe this was fixed by c5251468766314f6ed634303adc3a765cf621966
Please let me know if you still see the problem.
Thanks


feat: switch from semantic-release to release-it

PR Checklist

[x] Addresses an existing open issue: fixes #000
[x] That issue was marked as accepting prs
[x] Steps in CONTRIBUTING.md were taken

Overview
Switches from semantic-release to release-it because semantic-release doesn't support 0.X.Y versioning. release-it just works. I'm very pleased.
Thanks to @danielroe and @nartc for mentioning on Twitter! https://twitter.com/JoshuaKGoldberg/status/1603076531693449216
Co-authored-by: @danielroe

No way to really make sure this works until it hits the main branch. I set up a temporary repo and tinkered with the config there.


Preflight Checklist

[X] I agree to follow the Code of Conduct that this project adheres to.
[X] I have searched the issue tracker for an issue that matches the one I want to file, without success.
[X] I am not looking for support or already pursued the available support channels without success.

Version
最新版本
Installation Type
Official Docker Compose
Service Name
DongTai-agent-java
Describe the details of the bug and the steps to reproduce it
server使用centos7.9-docker部署。拉取最新版本。
部署参考：
https://zone.huoxian.cn/d/2552-iastsqlbypasscve

客户端用windows部署。
tomcat版本:apache-tomcat-9.0.56
cms使用jspxcms测试。
无法加载agent。一直错误

Additional Information
No response
Logs
No response

Are you running the process with Adminstrator? If so it could be this problem: https://github.com/apangin/jattach/issues/23, and we need to upgrade jattach for agent

This issue has been resolved in v1.10.0 of the agent.


method_RESEPT

Update metadata:
https://docs.google.com/spreadsheets/d/1QCeAF4yQG4bhZSGPQwwVBj_XF7ADY_2mK5xivAIfHsc/edit#gid=0
Details of method (publication, GitHub):
https://www.sciencedirect.com/science/article/pii/S2001037022003646
https://github.com/OSU-BMBL/RESEPT/

A Conda environment file containing all of RESEPT's dependencies (but not the method itself, as it is not packaged) is provided in #164. It was partially tested on an 8-core x86_64 laptop without any issues, as described in the PR. More extensive tests should probably run on a machine with GPU access (or at least on a machine with more cores). The code to wrap the tool for inclusion in SpaceHack was not provided.


A better way to get all friends than Cursor

The typical way of getting all friends is by:
friends_list = []
for friend in tweepy.Cursor(API.friends).items():
    friends_list.append(friend)

However, this is limited by the rate 200/15min. It's very time consumable if there are hundreds or even thousands of friends (followers, blockers, etc.).
While API.get_friends_ids() returns a list of 5000 ids of user, once at most, per 15 minutes (5000/15min), and API.get_user() has a limit of 900/15min.
The results of the combination of the two function above are exactly the same as which done by tweepy.Cursor, and much time saving.
Could this method be implemented to tweepy?

Does it help if you pass count and provide the maximum supported amount of 200?

Does it help a little if you provide the count parameter and provide the maximum supported amount of 200?
IE: tweepy.Cursor(API.friends, count=200).items()
But not doubt using API.friends_ids() is far better.

Hi! Thank you for your suggestion.
I just tried and the count worked, so by adding this the limit can be expand from the default 300/15min (not 200) to 3000/15min. That's, on the contrary, much better than my suggested solution.
Thanks for sharing this!

Hoping this helps .items(number) will fetch the amount required in the data
friends_list = []
for friend in tweepy.Paginator(API.friends).items(200):
    friends_list.append(friend)

@Cody-coder017 That doesn't circumvent the rate limit in question.

I opted for using the Cursor and api.friends_ids to get 5000 friend IDs per request.
...
friends_ids_list = []
for friend_id in tweepy.Cursor(api.friends_ids, screen_name=username, count=5000).items():
    friends_ids_list.append(friend_id)

This issue was kept open as a feature request because, while the rate limit calculations were incorrect and a less efficient method / endpoint for user lookup was suggested, the general proposition has merit:

API.get_friends / GET friends/list supports a maximum count of 200 and has a rate limit of 15 / 15 min., allowing retrieval of 3000 friends / 15 min.
API.get_friend_ids / GET friends/ids supports a maximum count of 5000 and has a rate limit of 15 / 15 min., allowing retrieval of 75000 friend IDs / 15 min.
API.lookup_users / GET users/lookup supports a maximum of 100 user IDs per request and has a rate limit of 900 / 15 min. (with user auth), allowing retrieval of 90000 users by ID / 15 min.

This means that using API.get_friend_ids with API.lookup_users allows retrieval of 75000 friends / 15 min., much higher than the 3000 / 15 min. with API.get_friends.
Note, with Twitter API v2, Client.get_users_following / GET /2/users/:id/following supports a maximum max_results of 1000 and has a rate limit of 15 / 15 min., allowing retrieval of 15000 friends/following / 15 min., a rate in between the two API v1.1 approaches.
This seems like an oversight on Twitter's end in determining the rate limits though, and I'm not sure if Tweepy should encourage circumventing the rate limits of an endpoint by using double the requests to two other endpoints. A method implementing this would also be unique in being the only method (besides API.chunked_upload) to make multiple requests to the API, inconsistent with the current convention of a single request per method.

I develop in Python and I've got some solution for this stuff.
There are scripts to get friends/followers. They get blocks of 5k, up to 14 times in 15 minutes. I leave one token free, saves me from grief if some other process wants to use one. When they get down to a single token, they sleep(60), then check API, until they can proceed again. The numeric IDs are placed in a named Redis queue. I used Walrus over the Redis queue so I'm dealing with native Python objects.
The Redis queue name corresponds to an Elasticsearch index and an ArangoDB graph. I've been slowly moving things from Elastic or Redis into ArangoDB or RabbitMQ, when that makes sense. I've got tokens for several dozen accounts, and they're employed by a numeric ID to user object resolver, which then writes a minimized portion of the JSON blob to an Elasticsearch index. They are allowed 900 lookups/15 minutes, so I permit them only 800 per period.
A single account doing this can collect 280k followers in an hour. The resolvers run in parallel, so they'll handle about 200k an hour. As an beneficial parallel process if you stream a set of accounts and pull the user objects out there, it'll get you the active accounts w/o an API load.
The API, at least to me, seems to be biased for mobile developers who aren't going to do thousands of operations. If you're going bigger, you're going to need to cache, to do things in parallel. A sunset of the 75k/15 minutes friends/followers and replacing it with 15k/15 minutes would be ... a huge hassle for me. I periodically look for ways to start the retrieval of those relationships somewhere other than the beginning of the set - it's really difficult to do large accounts with the 280k/hour cap I put on things.

i'm trying to get the friends of a particular account and then in turn follow, like their latest tweet, and retweet it.

This issue was kept open as a feature request because, while the rate limit calculations were incorrect and a less efficient method / endpoint for user lookup was suggested, the general proposition has merit:

API.get_friends / GET friends/list supports a maximum count of 200 and has a rate limit of 15 / 15 min., allowing retrieval of 3000 friends / 15 min.
API.get_friend_ids / GET friends/ids supports a maximum count of 5000 and has a rate limit of 15 / 15 min., allowing retrieval of 75000 friend IDs / 15 min.
API.lookup_users / GET users/lookup supports a maximum of 100 user IDs per request and has a rate limit of 900 / 15 min. (with user auth), allowing retrieval of 90000 users by ID / 15 min.

This means that using API.get_friend_ids with API.lookup_users allows retrieval of 75000 friends / 15 min., much higher than the 3000 / 15 min. with API.get_friends.
Note, with Twitter API v2, Client.get_users_following / GET /2/users/:id/following supports a maximum max_results of 1000 and has a rate limit of 15 / 15 min., allowing retrieval of 15000 friends/following / 15 min., a rate in between the two API v1.1 approaches.
This seems like an oversight on Twitter's end in determining the rate limits though, and I'm not sure if Tweepy should encourage circumventing the rate limits of an endpoint by using double the requests to two other endpoints. A method implementing this would also be unique in being the only method (besides API.chunked_upload) to make multiple requests to the API, inconsistent with the current convention of a single request per method.

The method which is expected to return 75000 friends, in action just received me around 16500! Do you have any idea?


[PE-D][Tester E] helpwindow: Help window command displays incorrect information

The helpwindow command displays the format of adding a student as 'student n/NAME s/STUDENT_ID ...'
However, this is inconsistent with the actual implementation of student as id/ is used instead of s/ to add the STUDENT_ID.

Labels: severity.Medium type.FunctionalityBug
original: zlch/ped#22

Can be fixed


Filter column values based on selected directory #195

Take jstree path selection into account when populating column
filter values

LGTM :+1:


Warnings:

Hi,
these warnings are popping. Was just wondering if they are ok:
/home/jmt/Projects/panama/panama-external/src/jax/lru_mlflow/pkg/core/model.py:19: UserWarning:

Explicitly requested dtype <class 'jax.numpy.float64'>  is not available, and will be truncated to dtype float32. To enable more dtypes, set the jax_enable_x64 configuration option or the JAX_ENABLE_X64 shell environment variable. See https://github.com/google/jax#current-gotchas for more.

They mainly correspond to these fns
https://github.com/NicolasZucchet/minimal-LRU/blob/a46b6da7f3f5273e799f2551774af0992b005df1/lru/model.py#L18-L35
This one I did not chek 100% where is triggered.
/home/jmt/Projects/panama/panama-external/env/lru/lib/python3.10/site-packages/jax/_src/lax/lax.py:2660: ComplexWarning:

Casting complex values to real discards the imaginary part

Hello!
I fixed the Float64 warnings but couldn't find the reason for the complex one. It does not seem to affect performance though.

Thanks!


[SMALLFIX] Handle UFS directory not in sync

@calvinjia @jsimsa

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/15472/Failed Tests: 2org.alluxio:alluxio-core-server-master: 2alluxio.master.file.FileSystemMasterTest.deleteUnsyncedPersistedDirectoryWithCheckalluxio.master.file.FileSystemMasterTest.deleteUnsyncedPersistedMultilevelDirectoryWithCheck
Test FAILed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/15473/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/15486/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/15500/
Test PASSed.


fix(kube-runtime): setup backoff with builder pattern

Filling the fields manually and leaving the current_interval out meant that the current_interval is set to its default rather than track the initial_interval
The builder addresses this for us by setting it on the build method.

Motivation

Noticed that the current_interval of the watcher backoff is left empty, which may lead to unintended behaviour.
Granted the difference is currently minimal (800ms to 500ms)
Solution

Using the builder pattern method from the backoff crate can be used to set the fields appropriately rather than simply the default value.

Thanks @clux, I've fixed the fmt and also added a test, so hopefully code cov is also ok now.


show document of callable objects doesn't works when "python.autoComplete.addBrackets" is on.

Environment data

Language Server version: XXX
OS and version: XXX
Python version (& distribution if applicable, e.g. Anaconda): XXX

Expected behaviour
show args of print function after write pr and enter with "python.autoComplete.addBrackets" enable.
Actual behaviour
XXX
Logs

XXX

Code Snippet / Additional information

XXX

Hey there. You should use the new python.analysis.completeFunctionParens to enable this functionality in Pylance.
If there is another issue with this feature, can you please provide more details?

Assuming this is the signature help that shows up when () is typed, it doesn't work because VS Code doesn't trigger it until the user types (, ), or ,, and with the snippet that adds the parens, the user's not typing it anymore.
We'd need a way to force VSC to run editor.action.triggerParameterHints when the completion item is selected, which could be done via a command, but we have other uses for commands and can't send more than one. Or, the LSP needs an extension to allow us to ask the client to immediately request the hints.

Hey there. You should use the new python.analysis.completeFunctionParens to enable this functionality in Pylance.
If there is another issue with this feature, can you please provide more details?

still now working.

I found a relatively clean way to handle this. The next release will open the signature help when one of these completion items is selected.

This issue has been fixed in version 2020.9.0, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#202090-3-september-2020


Support for Carmack's act on press vs on release option

Provide a general summary of the feature here
Basically some way to act on press as described by John Carmack. Could either be a separate variant of the usePress hook or be some option within it to act this way.
🤔 Expected Behavior?
On pointer devices:
The press would activate on pointer down. Moving the pointer out while still pressed and back in changes nothing. On release the press ends. So isPressed is false initially. On pointer down isPressed is set to true and the onPress event / handler is called. Moving the pointer outside of the button changes nothing. On pointer up regardless of where the pointer is - inside or outside the button - the isPressed is set to false. Depending on your philosophy it might also be fine to make the isPressed prop false on pointer out and true on pointer in but that might communicate the wrong idea as the press should not fire again since this should only act on pointer down.
On touch devices:
For static controls that you want to act on press instead of on release which is the default for touch devices:
Same as above but on touch down. Since the default is to act the same as usePress does now and there are two ways to deal with presses there would have to be some option at least for touch devices but probably pointer devices too to decide if you should act on press on release.
Other controls (default)
Same behavior as the usePress has now.
😯 Current Behavior
Currently there is no way to make a button act on press as described by Carmack with the provided handlers for the usePress hook. Using something like onPressStart would be the closest but it retriggers when dragging out and in again which should not happen.
💁 Possible Solution
Either add some new press hook or add an option to the usePress to act on press vs act on release. Maybe { actOn?: "press" | "release" }. This should change when the various events e.g. pressEnd, pressChange, press are fired and when the isPressed boolean would change. Since there should be a way to control it separately for touch devices e.g. have act on press for all buttons on desktop or whatever and then only some fixed position ones on touch devices be act on press others act on releas maybe something more like { actOn?: "press" | "release" | { touch?: "press" | "release"; pointer?: "press" | "release" } }
🔦 Context
I am trying to make buttons that act on press as described by Carmack i.e. on pointer down, with no press change when dragging out of the button and no retrigger when dragging back in. This I have not been able to do with the provided usePress hook and its methods. I was considering making my own version but then I'd loose the many features and niceties this library and hook provide in terms of consistency and bug fixes across browsers.
💻 Examples
No response
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response

Be careful with this, as acting on pointer down is an accessibility failure in many cases. The user needs to be able to cancel their press after starting it, and dragging off of the button is a common way to support that. See https://www.w3.org/WAI/WCAG21/Understanding/pointer-cancellation.html There are some exceptions, but generally most presses should activate on pointer up.
That being said, usePress has a shouldCancelOnPointerExit option, which I think could work here. When true, it will cancel the press when dragging off the button and will not fire onPressStart again when the pointer returns.

@devongovett Noted on the accessibility point. I think as this is not the default but instead an option you need to make a conscious decision on when and where to use it should not add any problems in this area if it were included. For accessibility one could include undo functionality in the app or not use the on press action in important places or perhaps offer an "are you sure" modal. Basically this as many other things is an option and you choose to use it. As it would not be the default it should not trample anyone's existing interactions.
Thanks for letting me know about that shouldCancelOnPointerExit I did not see it mentioned anywhere on the usePress docs page. Will look into it. Regardless I still think it would be a neat option as it certainly is used in multiple places - if for no other reason then for things like switching tabs or clicking on an option in a radio input and such things that do not cause any problems when clicked on and don't really need to be cancelled but acting on press there makes things feel crazy faster - seriously I've tested myself and there is at least 65ms between down and up events and that's the fastest I've reasonably clicked. Mostly it's around 80 - 100 and up to 120ms. For a component like a tab that might need about that much to render (80ish ms) or so the difference feels lightning fast.


Internal Libc using independent memory allocation

Ref #667
The internal libc and application libc can't contend for the use of the stack with the brk() or sbrk() calls.

Refer to PR 860 for details; https://github.com/criblio/appscope/pull/860


feat: add mailpit command (alias of launch -m), fixes #5627

The Issue

https://github.com/ddev/ddev/issues/5627

How This PR Solves The Issue
Adds a new ddev mailpit host command.
A lot of the code is copied directly from launch, which is the same way adminer and phpmyadmin work.
Manual Testing Instructions
Run ddev mailpit - it should perform the same as ddev launch -m
Automated Testing Overview

Added a new test right next to the TestLaunchCommand test, with a lot of the same code since it's effectively testing the same thing.
Related Issue Link(s)
https://github.com/ddev/ddev/issues/5627
Release/Deployment Notes

No deployment ramifications that I'm aware of.
Other notes
Once https://github.com/ddev/ddev/pull/5525 is merged, this command (and the adminer/phpmyadmin commands) can be vastly simplified.

Now with updated docs

I guess ddev mailpit can just call ddev launch -m to avoid duplication, in which case we don't need new tests.

I had thought of doing that, but having ddev call itself as a new process just felt like a real smell to me. That said, since you've requested the change I'll make the change later tonight.

I've just realised that ddev launch -m is listed in ddev describe - would you like that replaced with ddev mailpit?

I had thought of doing that, but having ddev call itself as a new process just felt like a real smell to me.

I think it's not so bad, a duplicate process doesn't eat up a lot of RAM and closes immediately anyway.

I've just realised that ddev launch -m is listed in ddev describe - would you like that replaced with ddev mailpit?

That's a good idea, let's add it.

Go great to see all your productivity on everything @GuySartorelli ! Thanks for the contributions.

Added the new command to the describe output

Manually tested and it seems to be doing fine as expected.
See related @tyler36

https://github.com/ddev/ddev/pull/5525

though.

See related #5525 though.

Yeah I've mentioned this in the PR description and it looks like a good piece of work. Seems like movement on that PR isn't happening super fast though, might make sense to add this new command as-is for now and then refactor either once #5525 has been merged (or as part of that PR - could be a good first test case for it).


Support exporting GitLab CI pipelines

Ref #226,

Add support for exporting GitLab CI pipelines.
Convert DIR and FUNCTIONS_DIR into relative paths in the exported pipeline.
Remove FUNCTIONS_DIR existence checks to make it more flexible.

@Liujingfang1 @monopole @frankfarzan


Animate the change in issue sort order

Look into React Magic Move: https://github.com/ryanflorence/react-magic-move

No longer actively being worked on.


bug: After clicking the course content the sidebar's button to collapse gets disappeared

https://github.com/user-attachments/assets/33263fc7-407c-47f5-bc06-7aab69520f24

I tried doing the same thing but it seems to be working fine for me.
https://github.com/user-attachments/assets/9f2d96b2-da70-4293-810c-62d76677b3a2
If still facing issue, could you provide some more details for the same.

@Hkumar2401 at 0:16 you have too encountered that, watch it again !
on clicking any of the course module the collapse button of the sidebar shouldn't get vanished !
I'm looking for the solution in codebase and will try to fix it ASAP and raise a PR

@Hkumar2401 at 0:16 you have too encountered that, watch it again ! on clicking any of the course module the collapse button of the sidebar shouldn't get vanished !

@Taqi20 Yeah, saw it! Sorry about that.


[neuralynx] Adjust test to match #949

Follow up of #957 to catch up with changes introduced in #949

rebasing after merge of #913

OK
Can I merge ?

yes

@samuelgarcia  Now test in master are passing again. Thanks for merging!


Add creators to work history timeline

I implemented this the same way as we do files, rather than trying to insert them into the metadata changes (which would be very difficult). See a screenshot below.
If this looks good to you, approve it, but I'd like to consider possibly refactoring all the -WorkHistoryChange components to inherit from a base class or module. We're now at the "Rule of Three" and there's a decent amount of duplicated code among  them. (I'm curious to see if Code Climate will catch this) [Update: yes, Code Climate did catch this]
Closes #195

@awead we are ready to rock post-refactor.
CodeClimate is still complaining however, because these two methods are similar:
      def changes_to_work_versions_files(work_version)
      def changes_to_creator_aliases(work_version)

This should be marked as invalid or won't-fix. Yes these methods are similar, no refactoring them will not make the code cleaner or more understandable. What they do and where they're called is high on the WTF scale, so having the repetition IMHO is not a bad thing whatsoever.


Dark Theme for Classeur

Would be really nice if there was a dark-theme for the editor. In the present state - writing in full-screen zen-mode is a real eye-killer with the entire screen being white.

+1
One of the reasons why I'm still using StackEdit.io

Also a battery killer

YUP

Yes please 😄

Thanks for all your feedback!
@benweet can we get this still into the next design revision?
~Robert

That's a considerable feature. I'm not sure the material design library we
rely on does support that.
On 25 May 2016 6:46 a.m., "Robert Orzanna"<EMAIL_ADDRESS>wrote:

Thanks for all your feedback!
@benweet https://github.com/benweet can we get this still into the next
design revision?
~Robert
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/classeur/classeur/issues/11#issuecomment-221478889

I can look that up. What's the name of our design library?

That's angular material.
https://material.angularjs.org/

There doesn't seem to be an existing dark theme, however, the following resources might help:

angular material, how to use dark() function when define theme colors? - Stack Overflow
angularjs - What is the correct way to make a "dark" theme in Angular Material? - Stack Overflow
javascript - Configuring a dark theme for Angular Material - Stack Overflow

@benweet I think it would be great if the user could pick amongst the palettes already available in AngularMaterial; according to the theming documentation, this doesn't look to difficult:
angular.module('myApp', ['ngMaterial'])
.config(function($mdThemingProvider) {
  $mdThemingProvider.theme('default')
    .primaryPalette( <palette> )
    .accentPalette( <palette> )
    .warnPalette( <palette> )
    .backgroundPalette( <palette> );
});

where <palette> is one of:

red, pink, purple, deep-purple, indigo, blue, light-blue, cyan, teal, green, light-green, lime, yellow, amber, orange, deep-orange, brown, grey, blue-grey

Would it please be possible to let the user choose each of these four palettes independently with a dropdown list, the same way that we can currently choose the Pandoc theme? Once such a mechanism is in place, I think it will be easy to add or remove palettes as you or a UI designer pleases. I am happy to help anyway I can, but I have no experience with AngularMaterial and wouldn't know where to look in the sources.

As a workaround I found that Deluminate Chrome Extension works great https://chrome.google.com/webstore/detail/deluminate/iebboopaeangfpceklajfohhbpkkfiaa?hl=en-US


[docs][base] Add Tailwind CSS + plain CSS demo on the TextArea page

[X] I have followed (at least) the PR section of the contributing guide.

I have followed (at least) the PR section of the contributing guide.
Part of https://github.com/mui/material-ui/issues/37222

We are missing a box shadow on the Tailwind demo.

I checked, and we're also missing it on input demos and all the ones based on it. Not technically missing, but using slate palette when system is using blue and plain CSS is using cyan. Since it's not only on textArea, I think we could add it to the https://github.com/mui/material-ui/pull/38820 PR


Failure of fetching ISO/PRF 20674-1 (urgent)

ISO 20674-1 has just entered PRF stage as "ISO/PRF 20674-1", and now Relaton is crashing on this.
Full trace:
fetching ISO 20674-1...
Attempting NP stage retrieval
Attempting WD stage retrieval
Attempting CD stage retrieval
Attempting DIS stage retrieval
Attempting FDIS stage retrieval
Attempting PRF stage retrieval
bundler: failed to load command: metanorma (/Users/me/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/bin/metanorma)
NoMethodError: undefined method `year' for nil:NilClass
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/relaton-bib-0.3.4/lib/relaton_bib/copyright_association.rb:32:in `block in to_xml'
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/builder.rb:394:in `insert'
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/nokogiri-1.10.4/lib/nokogiri/xml/builder.rb:377:in `method_missing'

@ronaldtse this issue is the same as #60. It was solved. Did you try the last commit?

@andrew2net confirmed, it's fixed in the git version. Please help release. Thanks!

@ronaldtse I'm finishing Reverse bib to hash mapping task. Then release all relaton gems. Could you wait one day?

OK. Thanks.


Changing Views/Tabs or resizing window doesn't use Custom-UI

When viewing a tab, Custom UI is working. Moving to a new tab, the custom ui does not work unless you manually refresh the page.
Resizing a browser window also removes custom ui.

What do you mean doesn't work? What happens when you resize the window?

I don't have the resizing issue. But, I do have the issue with the manual refresh. For example, my light has the correct name for when in group 1, but when I go to another view with group 2, it has the original friendly_name and only switches over to the correct name for when in group 2 after a manual page reload.

There were no HA related fixed, so it could be stale files?

Still an issue on 0.45.0.... Tried clearing cache but no luck.
Will wait for .46 and see if it corrects.

@kylerw Do you mean a new browser tab? Or a new view tab in HA?

@andrey-git View Tab in HA, sorry for the confusion.

I just fixed a bug that might have caused this. Could you refetch the files and try again?


Question about statusline in screenshot

This is a great theme, thanks for sharing! I was wondering about the accompanying power/air/light line theme in the screenshots: is that published somewhere? The round edges are an interesting touch, especially now that many GTK apps come with rounded window corners at the bottom. Can you tell me which status line plugin this is? Thanks!

@inukshuk this is bubbles lualine 🥂

Thanks!


"AssertionError: Unhandled type conversion" on sim.reset

When initializing the simulation with sim.reset(initialWorker=initialWorker) where initialWorker is a list of lists (e.g., initialWorker = [[1,1,0], [0,1,0], [1,0,1], [1,0,0], [1,0,1], [0,0,1]]), I receive an AssertionError: Unhandled type conversion. This setup worked seamlessly in version 0.2.0, suggesting a regression or change in how list of lists are handled.
The simulation expects an int[][] type for the corresponding variable, which matches Python's list[int[]] structure. This mismatch seems to trigger the error.
Could you provide any guidance on how to address this issue? Are there any workarounds or adjustments I can make in my code to accommodate the changes in version 1.0.0? Additionally, if there's any more information or specific error logs that would help diagnose this issue, I'm happy to provide them.
Thank you for your assistance and for the continued development of Alpyne.
Originally posted by @HerbertRolf in https://github.com/t-wolfeadam/Alpyne/discussions/48#discussioncomment-8827782

I recreated the issue in model with the configuration having a field called "initialWorker" set to type int[][] and exporting it. Then using the following code:
from alpyne.env import AnyLogicSim
sim = AnyLogicSim("Model353.zip")
sim.reset(initialWorker=[[1,2,3],[4,5,6],[7,8,9]])

Which causes the following error:
Traceback (most recent call last):
  File "<pyshell#5>", line 1, in <module>
    sim.reset(initialWorkers=[[1,2,3],[4,5,6],[7,8,9]])
  File "C:\Users\twolf\AppData\Roaming\Python\Python310\site-packages\alpyne\sim.py", line 349, in reset
    _config = SimConfiguration()
  File "C:\Users\twolf\AppData\Roaming\Python\Python310\site-packages\alpyne\data.py", line 32, in __init__
    self[key] = self.__missing__(key)
  File "C:\Users\twolf\AppData\Roaming\Python\Python310\site-packages\alpyne\data.py", line 51, in __missing__
    return subschema[key].py_value
  File "C:\Users\twolf\AppData\Roaming\Python\Python310\site-packages\alpyne\data.py", line 235, in py_value
    assert isinstance(self.value, self.py_type), "Unhandled type conversion"
AssertionError: Unhandled type conversion

Printing out the configuration schema shows the name is correct, so that's not the issue:
>>> print(sim.schema.configuration)
{'initialWorker': FieldData(name='initialWorker', type='int[][]', value=None, units=None)}

Based on the traceback, it's building an empty SimConfiguration object, filling in with the default value (None) which is causing a conflict with the intended py_type (list).
This is a bug, as the check should either ignore for None value or bypass the assertion when creating the default object (as the user filled value will cause it to be correct) - I haven't decided yet what to do.
Anyway, the workaround for now is to always ensure you supply some default value of the correct type in the constructor, like so:
sim = AnyLogicSim("Model353.zip", config_defaults=dict(initialWorker=[]))

This works because it overrides the "default" value initially assigned from AnyLogic (None) to an empty list. Note that the assertion only checks for outer type (i.e., it just cares that it's a list; it doesn't look "inside" to make sure the int type is also correct)

Thank you! Now it works perfectly.

Fixed in the latest version

I deferred the error to the sim-side which will throw a non-halting error, failing when a value is null and it shouldn't be, which will be reported to Python.
You will still need to set defaults in the AnyLogicSim constructor or handle for null in the RL Experiment's Configuration


Update client_domain on Vibrant Assist from api.vibrantapp.com to vib…

What
Update client_domain on Vibrant Assist from api.vibrantapp.com to vibrantapp.com.
Why
It was incorrect.
Checklist
PR Structure

[x] This PR has a reasonably narrow scope (if not, break it down into smaller PRs).
[x] This PR title and description are clear enough for anyone to review it.
[x] This PR does not mix refactoring changes with feature changes (split into two PRs otherwise).

Thoroughness

[x] This PR adds tests for the new functionality or fixes.
[x] This PR contains the link to the Jira ticket it addresses.

Configs and Secrets

[x] No new CONFIG variables are required -OR- the new required ones were added to the helmchart's values.yaml file.
[x] No new CONFIG variables are required -OR- the new required ones were added to the deployments (pr-preview, dev, demo, prd).
[x] No new SECRETS variables are required -OR- the new required ones were mentioned in the helmchart's values.yaml file.
[x] No new SECRETS variables are required -OR- the new required ones were added to the deployments (pr-preview secrets, dev secrets, demo secrets, prd secrets).

Release

[x] This is not a breaking change.
[x] This is ready for production.. If your PR is not ready for production, please consider opening additional complementary PRs using this one as the base. Only merge this into develop or main after it's ready for production!

Deployment

[x] Does the deployment work after merging?

stellar-disbursement-platform-backend-preview is available here:SDP:      https://sdp-backend-pr126.previews.kube001.services.stellar-ops.com/healthAP:       https://sdp-ap-pr126.previews.kube001.services.stellar-ops.com/healthFrontend: https://sdp-backend-dashboard-pr126.previews.kube001.services.stellar-ops.com

stellar-disbursement-platform-backend-preview is available here:SDP:      https://sdp-backend-pr126.previews.kube001.services.stellar-ops.com/healthAP:       https://sdp-ap-pr126.previews.kube001.services.stellar-ops.com/healthFrontend: https://sdp-backend-dashboard-pr126.previews.kube001.services.stellar-ops.com

stellar-disbursement-platform-backend-preview is available here:SDP:      https://sdp-backend-pr126.previews.kube001.services.stellar-ops.com/healthAP:       https://sdp-ap-pr126.previews.kube001.services.stellar-ops.com/healthFrontend: https://sdp-backend-dashboard-pr126.previews.kube001.services.stellar-ops.com


fossdroid.com only use 1 repo?

F-droid has a main repo and archive repo.
fossdroid.com search only gives the main repo result.

Hi garywill, this repo is for Fossdroid Core (not for fossdroid.com).
I will take your advice, thanks.


How can I limit the max events per time slot? for example, I am using this calendar for Gym booking, I want max 20 appointments for any given hour.

Do you want to request a feature or report a bug?
What's the current behavior?

What's the expected behavior?

This is not controlled by the Calendar. You would have to handle this in your own code.

This is not controlled by the Calendar. You would have to handle this in your own code.

How to do it , give some ideas...


Subresource Integrity for HTMLScriptElement and HTMLLinkElement

Subresource Integrity (SRI) is currently a W3 Proposed Recommendation. It ships with current versions of Firefox and Chrome.
Setting the integrity property should not hurt other browsers, it is a progressive enhancement.
TypeScript Version:
nightly (1.9.0-dev.20160603)
Code
// A self-contained demonstration of the problem follows...
let script = document.createElement('script');
script.integrity = "sha-256-some-hash"

Expected behavior:
integrity property is defined
Actual behavior:
integrity property is not defined

PRs welcomed. You can find more information about contributing lib.d.ts fixes at https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes.

I've edited the TSJS-lib-generator to support this property. Reference: https://github.com/Microsoft/TSJS-lib-generator/pull/113


[1.10.2 sponge] Unable to use commands

Every time I try to use any command I just get what version of lucky perms im using. I have updated to the latest version of sponge, luckyperms and forge for 1.10.2. I have looked at my console and don't see any errors when running the commands.
Is there something I am missing or some issues with sponge and luckyperms? Need help.
Sponge: 1.10.2-2221-5.1.0-BETA-2136
LP:Sponge-2.17.61
Forge:1.10.2-<IP_ADDRESS>1

You need to use the console to give yourself access.


load table maps lazily

fixes #1901
When adding table classes to a Propel database object, currently those classes are immediately instantiated, event though many of those classes will not be used in one cycle, leading to unnecessary overhead, particularly on databases with lots of tables.
A simple fix is to add tables as class strings, and only instantiate them when they are actually used.
The way it is implemented here, the $tables and $tablesByPhpName properties of DatabaseMap now can contain both TableMap objects or class strings, which is not ideal, but it seems to be the most seamless integration of this change. Let me know if there is a better way.

Codecov Report

Merging #1902 (a0df3bb) into master (4e59c81) will decrease coverage by 1.62%.
The diff coverage is 96.00%.

@@             Coverage Diff              @@
##             master    #1902      +/-   ##
============================================
- Coverage     87.61%   85.98%   -1.63%
- Complexity     7818     7826       +8
============================================
  Files           227      227
  Lines         21161    21180      +19
============================================
- Hits          18540    18212     -328
- Misses         2621     2968     +347

Flag
Coverage Δ

5-max
85.98% <96.00%> (-1.63%)
:arrow_down:

7.4
85.98% <96.00%> (-1.63%)
:arrow_down:

agnostic
67.03% <96.00%> (+0.04%)
:arrow_up:

mysql
68.86% <52.00%> (-0.01%)
:arrow_down:

pgsql
?

sqlite
66.70% <52.00%> (+<0.01%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

src/Propel/Runtime/Map/DatabaseMap.php
89.70% <95.45%> (+11.27%)
:arrow_up:

...rc/Propel/Generator/Builder/Om/TableMapBuilder.php
95.08% <100.00%> (-0.20%)
:arrow_down:

...time/ServiceContainer/StandardServiceContainer.php
86.98% <100.00%> (ø)

src/Propel/Generator/Reverse/PgsqlSchemaParser.php
0.00% <0.00%> (-86.62%)
:arrow_down:

src/Propel/Runtime/Adapter/Pdo/PgsqlAdapter.php
2.94% <0.00%> (-50.00%)
:arrow_down:

.../ActiveQuery/QueryExecutor/InsertQueryExecutor.php
59.37% <0.00%> (-21.88%)
:arrow_down:

src/Propel/Generator/Platform/PgsqlPlatform.php
81.42% <0.00%> (-13.63%)
:arrow_down:

src/Propel/Runtime/Adapter/Pdo/PdoAdapter.php
83.13% <0.00%> (-7.84%)
:arrow_down:

src/Propel/Generator/Command/InitCommand.php
64.53% <0.00%> (-4.66%)
:arrow_down:

src/Propel/Generator/Model/Database.php
71.38% <0.00%> (-2.70%)
:arrow_down:

... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Local testing with 350 tables:
initDatabaseMaps is executed almost twice faster with this fix. Execution time of the rest of code didn't change


feat: Remove Queries from proto-codecs

What is the purpose of the change
Improve bundle size by ~0.4 mb by removing unused queries within proto-codecs
ClickUp Task
ClickUp Task URL

@pyramation FYI


MPI memleak fixes and optimization for FB_NONE

Good catch, will look into this.

Still WIP, but feel free to review. Have to test again thoroughly next week. Maybe I also find a better (or you maybe?) to de-/serialize the tile error info from/into the message.

Ok, should be fine now.

Ping. You have any comments for things I should address? I would like to have this integrated for the next release to make our life much easier wrt deployment.

Sorry, a bit swamped right now :-/
I'll have a look tomorrow.

No worries. Just wanted to check in to not miss this for your release :)

Thanks! :-)

Awesome! Thx for merging!


add test that passes, even though ndarray.size does not use 'self'

Strangely, this test passes. It seems the argument name in a cdef getter is not important, since the name in ndarray.size is ndarray, not self.

Tests passed without changing the paramter name in ed3b972. In 51f015d I changed it anyway. I don't know if the fact ed3b972 passes should be considered a bug or not.

don't know if the fact ed3b972 passes should be considered a bug or not.

Definitely a bug. It means that the code doesn't do what it's written for. Not even sure if it's used at all then…

Not even sure if it's used at all then…

It's at least using the correct bit of code. It looks like @property on a cdef function is a slightly odd case that's probably quite limited in what it supports so maybe misses some checks. The generated code comes from AttributeNode https://github.com/cython/cython/blob/caa0f7f445728c386c50d9b88ce5f043ab224c3b/Cython/Compiler/ExprNodes.py#L7146-L7148 where it just copies the cname with no reference to the argument name.
Probing entry.pos on that confirms that it comes from @mattip's init.pxd file.
The Entry is initialized from a CVarDefNode which is presumably generated from property, but that's where I get lost.
I'm almost certain I've seen this bug before but I can find it right now. But we can at least be confident that the code comes from the right place.

Hmm, I had completely missed what this does:
https://github.com/cython/cython/blob/66e47e8daeb38877b7d3a137fd574f3326e067b9/Cython/Compiler/ParseTreeTransforms.py#L2274-L2275
It expects the property function's body to consist of exactly one simple function call, and then extracts the name of that function and calls it with one argument. 8-O
That's the wrong thing to do. Instead, it should generate the actual property "method" and call that.

it should generate the actual property "method" and call that.

Since this is a getter decorator, is it wrong to think the c function to call will be a getter function with the same signature?

Since this is a getter decorator, is it wrong to think the c function to call will be a getter function with the same signature?

I don't see any reason why we should impose this assumption on user code.
IMHO, we should treat extern property methods like inline functions in .pxd files. Their interface is well defined, and then they can do whatever they want.

it should generate the actual property "method" and call that.

Is there an example for regenerating a node and entry like this for a c-level decorator? I am afraid my cython-foo is not up to this task.

I think we need to remove this:
https://github.com/cython/cython/blob/76d8bf7990fd9622520b7c41408478bb03d19be7/Cython/Compiler/Nodes.py#L1733-L1735
and then simply call the function that it generates afterwards.

In 5ec5160 I removed the offending assignment and adopted the suggestion to remove skipping generate_function_definition. It took me a while to understand why that was the correct thing to do. I also added a test for an arbitrary getter function, which before would have failed. There is now a new warning about unused function declarations.
I started adding a test about the misnamed argument but could not get it to properly fail. If this passes CI I will add the non-failing test, maybe someone has an idea.

Looks like only the numpy_parallel test broke from this. Probably a GIL issue:
Fatal Python error: PyThreadState_Get: no current thread
The NumPy ndarray properties are currently declared as requiring the GIL, as are the macros. Is that correct? If so, then Cython might be generating refnanny code in them. If the prange code tries to call them without holding the GIL (which it shouldn't, if they require the GIL, but I'm making a pure guess here), then this can lead to the crash.
What's the right fix here? Require the GIL and fix the parallel code if it is incorrect? Or declare the properties as nogil? (We also might have to integrate the properties into the GIL validation, BTW.)

@mattip is it correct that the macros require the GIL? Their current implementation in NumPy doesn't, but I can't find anything in the NumPy API docs that would suggest or even guarantee that.

I don't think they should require the GIL. The change in the code is in this snippet:
for i in prange(x.shape[0], nogil=True):
    x[i] = i - 5

where in the current implementation (before this PR) x.shape[0] became PyArray_DIMS(__pyx_v_self)[0], but now (after this PR) is
static npy_intp *__pyx_f_5numpy_7ndarray_shape(PyArrayObject *__pyx_v_self) {
  npy_intp *__pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("shape", 0);
  __pyx_r = PyArray_DIMS(__pyx_v_self);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

In pre-3.0 (for comparison) x.shape[0] became __pyx_v_x->dimensions[0]
Is there a way to tell cython not to add RefNanny for c_getter code?

@scoder You can find them used internally in Numpy in places where the GIL has been released. As an example:
https://github.com/numpy/numpy/blob/dfd4c9de8d849363e3d4cda7a0792ed0670165cf/numpy/core/src/multiarray/calculation.c#L128-L135
PyArray_SIZE and PyArray_DATA are both used inside the no-gil block.
@mattip I think but I'm not 100% sure that cdef npy_intp size(self) nogil: should make the refnanny code disappear.

@da-woods thanks for the hint. Any ideas why this node has no acquire_gil attribute in the first place? That was the reason I added the clause on line 1814.

I've taken the liberty to rewrite the cgetter implementation in #3571.

Thanks @mattip for helping me understand how the things should work here, even if I ended up removing a large part of your original implementation. It was very helpful to have a good set of tests and seeing where I needed to put my fingers.

Should I refactor this PR to contain only the additional test?

Should I refactor/rebase this PR to contain only the additional test?

Ah, yes, the numpy_attributes test would be nice to have. I already stole your other one.
Travis seems to be happy with my implementation so far, so I'll merge it as soon as the CI build is done, and then you can add your test in this PR (or another, as you wish).

PyArray_SIZE and PyArray_DATA are both used inside the no-gil block.

Speaking of PyArray_DATA, we don't have a property for that currently. @mattip that because the type of the data field is char* but the function version returns a void*?
I mean, Cython 3.0 could be the right moment to change the type here…

Speaking of PyArray_DATA, we don't have a property for that currently

There is code in the wild that expects a char *. We could use PyArray_BYTES. I think I didn't do it since

there was some talk of trying to make that a read-only attribute, which did not go anywhere
as far as I can tell there is no test

So in short: we should probably convert it to a @property, and remove the *base field as well since it is not public.

I didn't entirely mean to close this just yet.
Let's keep `base in there, but I added a comment at least. I would guess that it's not used much, but I don't think Cython should decide when to break such code. :)

Can't base be converted to a property too https://docs.scipy.org/doc/numpy/reference/c-api.array.html#c.PyArray_BASE? Probably staying as a PyObject* return type since it returns a borrowed reference.
It might break code that tries to set the base though - there is a setter function but presumably cdef properties don't support setters.

It might break code that tries to set the base though

As I said, I don't think it's up to the Cython project to decide when to break such code. As a bit of background, the main reason why this feature was built was that we found the NumPy project to be a much better place to maintain the numpy/*.pxd API declarations. But to do that, they needed a way to abstract from the internal fields of the ndarray object struct. Thus, C properties.
BTW, there's also #2663 regarding the "to GIL or not to GIL" question.
@mattip do you think it's a good time now to officially hand over the maintainership, even if we keep shipping a copy for the time being? I created #3573 to discuss the further details.

There is a setter function but presumably cdef properties don't support setters.

That's a current limitation, yes. Not a technical one, this could be implemented, but I considered getters a much stronger use case than setters for now.

I considered getters a much stronger use case than setters for now.

OTOH – if NumPy takes over the maintenance, then it would be bad if a specific Cython version rejected their syntax… Let's discuss that in #3573.


Revert "AST: Early exit from subst() if the type is concrete"

This reverts commit e653e000bd6788c96db9fd057ad6b3065e4dd450.
This commit caused SIL verification errors with the
"buildbot,tools=RA,stdlib=RD" preset.
The root cause is that we're still not consistently setting the
recursive properties of the NameAliasType, so the early exit
in Type::subst() was falsely taken even when the underlying
type of the NameAliasType contained archetypes.
The lazy 'mapTypeOutOfContext()' applied to the underlying type
complicates matters since we can't know the recursive properties
until the alias type has been desugared for the first time.
A correct fix is to store the underlying type of a type alias as
an interface type, and set the recursive properties right away
when the type alias is deserialized; until that's done, reverting
this is an adequate workaround.
Fixes rdar://problem/29642870.

preset=buildbot,tools=RA,stdlib=RD
@swift-ci Please test with preset

@swift-ci Please smoke test

Build failed
Jenkins build - Swift Test macOS with preset
Git Commit - c075bec63d24d16c4582fb6b47088faee5a1e257
Test requested by - @slavapestov


Add support for bridge networking

Add support for bridge networking using
https://www.isc.org/kea/
as DHCP server listening on bridge uplink port

I think it is possible, i'll check in a few weeks.

Any update regarding this issue?

Still no, I am working on it, but very very slowly :/

Is there branch with developement of it? Can we help?

I need some time to finish the domain model, then it will be possible to add new features like bridge networking. I am afraid I cannot give you any estimate, but it will be done soon, yesterday I have almost finished with it.

Hello, again. Here is scripted network support, if you have time, you can test it and add scripts for  specific DHCP servers and configurations:
https://github.com/subuk/vmango/tree/feature/bridgednet
https://github.com/subuk/vmango/commit/6f07c47ba808e08515aa5f05ebd14cfb79c8f521
It has no documentation yet, but in short, three functions have to be implemented. I hope idea is clear from example (fixtures/stub_network_script.py) and source.

Thanks, on testing.

Script for mikrotik routers https://github.com/subuk/vmango/blob/feature/bridgednet/network_scripts/network_mikrotik.py

Can you explain a bit how vmango know which network setup do we want? It is not clear from the code (not implemented?).
For example i've successfully manually (without vmango) added networking via dhcp daemon and i want to make a script to get ip from /etc/dhcp/dhcpd.conf to show in vmango web interface (because otherwise vmango web interface machine page can not be opened due to undefined ip variable). How can i instruct vmango web interface that i am using dhcp for networking?

Vmango uses libvirt network component. It adds static leases to dhcp server before machine start via libvirt's api. And I think this is the simplest way to configure network for machines:
https://vmango.org/docs/configuration/hypervisor/#network
https://wiki.libvirt.org/page/Networking
https://github.com/subuk/vmango/blob/master/src/vmango/dal/machinerep_libvirt.go#L98
But if you want complex manual network configuration or want to bridge machines into existing network with dhcp server not managed by libvirt, you should write a script to configure this dhcp server. Script should implement three actions: lookup-ip (called every time to fetch machine ip), assign-ip (called on machine create), release-ip (on machine delete).

I think that it makes sense to use a local database to store machines information. As there are simply no real way for networking to be fully configured on dhcp unless you use openvswitch or some other complex stuff for networking

I think local database will add unnecessary exploitation complexity (at least it is extra point to backup) and problems with synchronization of local state in db with remotes, so I am trying to avoid it. And also, I don't understand how database can help you with dhcp configuration. If you have local dhcp server installed, you already have a database with ip addresses, you just need to write a script which will query this database and return response to vmango.

But if you want complex manual network configuration or want to bridge machines into existing network with dhcp server not managed by libvirt, you should write a script to configure this dhcp server.

But how can i instruct vmango that i want to use own script to lookup-ip, assign-ip, release-ip, and how can i point it to particular script?

Compile this branch and set hypervisor.network to bridge name and hypervisor.network_script to path to script:
https://github.com/subuk/vmango/tree/feature/bridgednet
Like this:
hypervisor "DESKTOP" {
   url = "qemu+ssh://virt@<IP_ADDRESS>/system?socket=/var/run/libvirt/libvirt-sock"
   image_storage_pool = "vmango-images"
   root_storage_pool = "default"
   network = "br0"
   network_script = "./network_scripts/network_mikrotik.py"
   vm_template = "vm.xml.in"
   volume_template = "volume.xml.in"
   ignore_vms = []
}

I will update documentation and packages soon.

And also update vm.xml.in:
       <readonly/>
     </disk>
-    <interface type='network'>
-      <source network='{{ .Network }}'/>
+    <interface type='bridge'>
+      <source bridge='{{ .Network }}'/>
       <model type='virtio'/>
     </interface>

How is it going? Does it work?