text:
Revert "Fix opencensus agent to be java6 compatible. (#619)"

This reverts commit d2263490e5353b005657bed1fbd60585559a85f2.
I'm reverting this because it seems unrelated to the issue in https://github.com/census-instrumentation/opencensus-java/issues/616#issue-256872886, which is actually about a different code location (line 52).
These "Undefined reference" warnings come from Animal Sniffer. In theory, Animal Sniffer may have seen the class files before they were processed by Retrolambda. However, the gradle task dependency tree (from dorongold/gradle-task-tree) doesn't support this theory.
In any case, we have test coverage for running on Java 6 since https://github.com/census-instrumentation/opencensus-java/pull/638.

Coverage decreased (-0.006%) to 78.042% when pulling 4a592ed0f92a16aa9533ee46e7fd265fb09f6749 on ubschmidt2:java6 into d118ce4c6bcc5d7f94f94b4e5f1b684b4d037b04 on census-instrumentation:master.

Codecov Report

Merging #743 into master will decrease coverage by 0.06%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##             master    #743      +/-   ##
===========================================
- Coverage     76.16%   76.1%   -0.07%
  Complexity      783     783
===========================================
  Files           144     144
  Lines          3617    3616       -1
  Branches        343     344       +1
===========================================
- Hits           2755    2752       -3
  Misses          794     794
- Partials         68      70       +2

Impacted Files
Coverage Δ
Complexity Δ

...in/java/io/opencensus/contrib/agent/Resources.java
50% <100%> (-7.15%)
3 <0> (ø)

...census/implcore/trace/export/SpanExporterImpl.java
90% <0%> (-1.67%)
6% <0%> (ø)

Continue to review full report at Codecov.

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

Sounds reasonable

Try with resources does not work on java6, am I missing something?

Retrolambda rewrites bytecode of try/resources to normal try finally
On 31 Oct 2017 08:18, "Bogdan Drutu" notifications@github.com wrote:

Try with resources does not work on java6, am I missing something?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/census-instrumentation/opencensus-java/pull/743#issuecomment-340622885,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAD61zcynmF0NDt14dFGmk9xectZGbI1ks5sxmdqgaJpZM4QLads
.

Yes, though source/target is 1.7, retrolambda rewrites the classes to 1.6. Try-with-resources works fine (https://github.com/orfjackal/retrolambda#backported-language-features).

PTAL.

I think we should keep the code as 1.6 (without fancy retrolambda). My 2 cents.

Bogdan that's actually a good point. I'd assumed to get more benefit from not restricting the code to 1.6, but only using try-with-resource in this class is not convincing. Thus, happy to just stick with 1.6. Will send a separate PR for that.

Obsoleted by https://github.com/census-instrumentation/opencensus-java/pull/799.

authors: adriancole bogdandrutu codecov-io coveralls ubschmidt2


text:
🛑 Halifax Ocean Terminals: Pier 31 is down

In ab62bcc, Halifax Ocean Terminals: Pier 31 (https://www.smartatlantic.ca/erddap/tabledap/SMA_halifax_anemometer1.json?time&time>=now-20minutes&distinct()) was down:

HTTP code: 404
Response time: 2073 ms

Resolved: Halifax Ocean Terminals: Pier 31 is back up in e2090f6.

source: gharchive/issue

license: MIT

license_type: permissive

license_source: github-api


text:
Bug: comparing a collection to itself

When viewing/editing a collection that has been marked for release, the latest (previously) released version is retrieved for comparison. If the collection being viewed/edited is the first and only version of the collection, it will be compared against itself, incorrectly listing new or changed objects as "unchanged".

Any updates on this?
Any changes do indeed appear as unchanged instead of being reported as a change or minor change. Furthermore, it appears as though any changes would propagate throughout all versions and releases, and not just within a collection, but even across all collections!
It might in fact be showing the wrong version of the collection in the end as you suggest. Either way, it would appear as though the collection versions and releases are not working properly in v2.2.0 of the workbench.


text:
How to disabled pagination in ag-grid ?

HI,
I have checked that no of rows display in the grid  are not same as we have in the database  it menace so some rows are move to the another page. so want to  disabled pagination  or remove scrollbar so that all records will display on the same page.. i try to use

Print:true

but format of the grid not proper as we need. so can you tell me the name of property which we can use to fix the issue.
Thanks in advance

then don't use pagination??? the default operation of the grid is to not us paging.

repo: ceolter/ag-grid

license: mit

license_source: bigquery


text:
Add CO544 Projects

Request:
Dear Nuwan,

Would it be possible to allocate a separate page for adding the CO544: Data Mining and Machine Learning projects of students (E/19 batch) under 'Course-Specific Projects' in the [department projects](https://projects.ce.pdn.ac.lk/) page? We need to maintain GitHub repositories for these projects as well.

Thank you.
Regards,
Ravisha Rupasinghe
(IIC - CO544)

I have created the file.
Need a cover and thumbnail image for CO544.
Template Design file can be found in https://github.com/cepdnaclk/projects.ce.pdn.ac.lk/tree/main/_graphics


text:
fail for step "ceph-mon | collect admin and bootstrap keys"

I'm trying to deploy ceph mon+osd on 3 virtual machines and rds+mds on the 4th.
The task:
TASK: [ceph-mon | collect admin and bootstrap keys]

hngs for over 30 mins, which seems strange.
The output is:
TASK: [ceph-mon | collect admin and bootstrap keys] ***************************
<192.168.56.105> ESTABLISH CONNECTION FOR USER: piontec
<192.168.56.104> ESTABLISH CONNECTION FOR USER: piontec
<192.168.56.105> REMOTE_MODULE command ceph-create-keys --id ubuntu
<192.168.56.104> REMOTE_MODULE command ceph-create-keys --id ubuntu
<192.168.56.105> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/piontec/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 192.168.56.105 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1452855479.04-267304856634747 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1452855479.04-267304856634747 && echo $HOME/.ansible/tmp/ansible-tmp-1452855479.04-267304856634747'
<192.168.56.104> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/piontec/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 192.168.56.104 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1452855479.04-177729546072309 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1452855479.04-177729546072309 && echo $HOME/.ansible/tmp/ansible-tmp-1452855479.04-177729546072309'
<192.168.56.106> ESTABLISH CONNECTION FOR USER: piontec
<192.168.56.106> REMOTE_MODULE command ceph-create-keys --id ubuntu
<192.168.56.106> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/piontec/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 192.168.56.106 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1452855479.04-191432958721437 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1452855479.04-191432958721437 && echo $HOME/.ansible/tmp/ansible-tmp-1452855479.04-191432958721437'
<192.168.56.105> PUT /tmp/tmpwod6wg TO /home/piontec/.ansible/tmp/ansible-tmp-1452855479.04-267304856634747/command
<192.168.56.104> PUT /tmp/tmpYtdZL9 TO /home/piontec/.ansible/tmp/ansible-tmp-1452855479.04-177729546072309/command
<192.168.56.106> PUT /tmp/tmp9QMQFj TO /home/piontec/.ansible/tmp/ansible-tmp-1452855479.04-191432958721437/command
<192.168.56.105> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/piontec/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 192.168.56.105 /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=jgicatgsdzevqmrnlqktcxtaxevvvule] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-jgicatgsdzevqmrnlqktcxtaxevvvule; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/piontec/.ansible/tmp/ansible-tmp-1452855479.04-267304856634747/command; rm -rf /home/piontec/.ansible/tmp/ansible-tmp-1452855479.04-267304856634747/ >/dev/null 2>&1'"'"''
<192.168.56.104> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/piontec/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 192.168.56.104 /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=wshaagrlambdjiiyqjimtqhhiifusjhd] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-wshaagrlambdjiiyqjimtqhhiifusjhd; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/piontec/.ansible/tmp/ansible-tmp-1452855479.04-177729546072309/command; rm -rf /home/piontec/.ansible/tmp/ansible-tmp-1452855479.04-177729546072309/ >/dev/null 2>&1'"'"''
<192.168.56.106> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/piontec/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 192.168.56.106 /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=tfibhanhsejjurvtgdvzswdzthylcrix] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-tfibhanhsejjurvtgdvzswdzthylcrix; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/piontec/.ansible/tmp/ansible-tmp-1452855479.04-191432958721437/command; rm -rf /home/piontec/.ansible/tmp/ansible-tmp-1452855479.04-191432958721437/ >/dev/null 2>&1'"'"''
ok: [ceph-osd-3] => {"changed": false, "cmd": ["ceph-create-keys", "--id", "ubuntu"], "delta": "0:00:00.061150", "end": "2016-01-15 11:57:59.169459", "failed": false, "failed_when_result": false, "rc": 0, "start": "2016-01-15 11:57:59.108309", "stderr": "INFO:ceph-create-keys:Key exists already: /etc/ceph/ceph.client.admin.keyring\nINFO:ceph-create-keys:Key exists already: /var/lib/ceph/bootstrap-osd/ceph.keyring\nINFO:ceph-create-keys:Key exists already: /var/lib/ceph/bootstrap-rgw/ceph.keyring\nINFO:ceph-create-keys:Key exists already: /var/lib/ceph/bootstrap-mds/ceph.keyring", "stdout": "", "warnings": []}

Can the reason be that all the virtual machines have the same hostname "ubuntu"?

OK, I checked what happens locally on the system (ubuntu 14.04.3):
root@ubuntu:~# ceph-create-keys --id ubuntu
admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
INFO:ceph-create-keys:ceph-mon admin socket not ready yet.
admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
INFO:ceph-create-keys:ceph-mon admin socket not ready yet.
...

(and it goes forever, which explains why ansible is stuck).
But no error for mon installation was reported earlier.

That means that somehow the monitor never started.
Can you check with a single monitor only?

Well, it still fails with infernalis, but with another task:
TASK: [ceph-common | create rbd client directory (for infernalis or after)] ***
failed: [ceph-osd-1] => {"failed": true, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/var/run/ceph/rbd-clients", "size": 40, "state": "directory", "uid": 0}
msg: chown failed: failed to look up user ceph

FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/home/piontec/site.retry

ceph-osd-1                 : ok=38   changed=0    unreachable=0    failed=1

Are you sure that you're running infernalis?

Packages were installed from:
http://ceph.com/debian-infernalis/ trusty/main ceph amd64 9.2.0-1trusty

so it seems so. But I need to cleanup a little bit and then retest.

OK, I tested with hammer and 1 mon, then updat eto 3 mons - works.
Check with infernalis and the same flow - works also. So it seems you need to start with 1 mon.

So then you have your answer, having the machine hostname might be the issue.
Can you try with different hostnames?

It was with different hostnames, still need to test with the same; good thing is that it works. Now I need to integrate it with OpenStack HA.

Closing this, feel free to reopen :)

"stderr": "INFO:ceph-create-keys:Talking to monitor...\nCluster connection interrupted or timed out\nCluster connection interrupted or timed out\nINFO:ceph-create-keys:Cannot get or create admin key, permission denied",
Same issue, even after restarting the monitor service.

@shez1461 please open a new issue instead of replying on a closed one (since few years)

authors: dsavineau leseb piontec shez1461

repo: ceph/ceph-ansible


text:
util: implement CreateObject() and RemoveObject with go-ceph

Describe what this PR does
Implement CreateObject() and RemoveObject with go-ceph to remove further command executions in the journalling path.

@phlogistonjohn more go-ceph stuff :wink:

source: gharchive/pull-request

repo: ceph/ceph-csi


text:
Fix regression when no image features are provided

Describe what this PR does
There is an issue that if the storage class was originally created with no image features (which worked fine), it would fail when upgrading the Ceph CSI.
The regression was introduced by this commit:
https://github.com/ceph/ceph-csi/commit/d8f7b38d3dac9718695ff6c33328f5f6cfce2c2f
Several users have filed issues about this, see listed in related issues below.
Is there anything that requires special attention
This is a regression which really hurts when upgrading (and only noticed when remounting volumes).  It's incredibly hard to fix in production because PVs are read-only.  Users could potentially lose their data if they try and force a replace as the PV is recreated.
Related issues
Fixes: #1937
Fixes: #2049
Future concerns
None for now.

I've added a failing test, I'm investigating the fix now, but it's 100% a problem with that test, seeing locally:
$ go test ./internal/rbd
--- FAIL: TestValidateImageFeatures (0.00s)
    rbd_util_test.go:134:
                Error Trace:    rbd_util_test.go:134
                Error:          Expected nil, but got: &errors.errorString{s:"invalid feature "}
                Test:           TestValidateImageFeatures
FAIL
FAIL    github.com/ceph/ceph-csi/internal/rbd   0.048s
FAIL

OK, so it seems like an empty string being split will result in at least one item:
package main

import (
	"fmt"
	"strings"
)

func main() {
	arr := strings.Split("", ",")
	for x, _ := range arr {
		fmt.Print(x)
	}
}

This is ready and good to go, I believe it should be a quite high priority fix as it's a regression.

Thanks for the PR! Please note that we expect commit messages to have a prefix of the affected component. In this case, you can add rbd:  as a prefix. Please update the commit messages and force-push the updated commits to your fork+branch again.
More details about this can be found in the development guide.

Thanks for the reviews.  I've made the required modifications..

/retest ci/centos/mini-e2e-helm/k8s-1.19

/retest ci/centos/mini-e2e-helm/k8s-1.19

/retest ci/centos/mini-e2e-helm/k8s-1.19

/retest ci/centos/k8s-e2e-external-storage/1.20

/retest all

@mergifyio rebase

@mnaser , did u have any reason for adding trimspace function strings.TrimSpace(imageFeatures)?
Just spaces like imageFeatures: "    " config should also be treated as invalid.
While upgrading, it should not exist and map[string]string should just return empty strings.
This would present an edge case wherein a user can pass just  imageFeatures: "    "  and will not trigger error with #2139 .
If there is no reason for having TrimSpace, I'll remove it.
Thanks
cc @nixpanic @humblec @Madhu-1

Hello,
when will be this fix released? We did an upgrade of rook today and we weren't unable to use csi 3.3.1 because of this bug. We had to rollback to 3.2.2 to have data available again.

Hello,
when will be this fix released? We did an upgrade of rook today and we weren't unable to use csi 3.3.1 because of this bug. We had to rollback to 3.2.2 to have data available again.

This fix is not available in v3.3.1 but is available in v3.4.0
https://github.com/ceph/ceph-csi/compare/v3.3.1...release-v3.3
Should we do a v3.3.2 release ?@Madhu-1 @nixpanic @humblec PTAL

As fix is available in 3.4.0 You can use 3.4.0 in any version of Rook. and 3.4.0 is the default in 1.7.1 of Rook.

authors: Madhu-1 Rakshith-R humblec mnaser nixpanic remixtj


text:
rbd: add aws-sts-metdata encryption type

With Amazon STS and kubernetes cluster is configured with
OIDC identity provider, credentials to access Amazon KMS
can be fetched using oidc-token(serviceaccount token).
Each tenant/namespace needs to create a secret with aws region,
role and CMK ARN.
Ceph-CSI will assume the given role with oidc token and access
aws KMS, with given CMK to encrypt/decrypt DEK which will stored
in the image metdata.
Refer: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html
Resolves: #2879
Signed-off-by: Rakshith R rar@redhat.com

@Rakshith-R just need a rebase, rest looks good to me

@Rakshith-R just need a rebase, rest looks good to me

I'll rebase aftter https://github.com/ceph/ceph-csi/pull/2936 is merged, since that pr may also cause conflicts.

authors: Rakshith-R humblec


text:
trim linebreaks, when concat mount options with id,key

we have problems with mounting cephfs with mountoptions id,secret that the drive retrieve from k8ssecret. This secrets have linebreaks and this result in invalid mountoptions.
cephfs: EXEC mount [-t ceph 10.123.253.198:6790,10.123.253.199:6790,10.123.253.200:6790:/ /var/lib/kubelet/plugins/cephfs.csi.ceph.com/controller/volumes/root-
csi-cephfs-pvc-3bc3c19d-67e6-11e9-93ba-525400da0775 -o name=admin
,secret=***stripped***]

This PR removes linebreaks.

my misstake :/
i have encoded id with echo "admin" | base64 -w0 and not with echo -n "admin" | base64 -w0 sorry for inconvenience

my misstake :/
i have encoded id with echo "admin" | base64 -w0 and not with echo -n "admin" | base64 -w0 sorry for inconvenience

Thanks, request you to close the PR as well.


text:
valgrind: add suppression for tcmalloc in libboost_thread-mt.so.1.53.0

http://tracker.ceph.com/issues/14799 Fixes: #14799
Signed-off-by: Loic Dachary loic@dachary.org

@dmick note that I hand crafted the suppression, including the name mangling, which seems like the hard way of doing it. Do you know how to create a suppression from the XML report ?

filter='fs/verify/{clusters/fixed-3-cephfs.yaml debug/mds_client.yaml fs/btrfs.yaml overrides/whitelist_wrongly_marked_down.yaml tasks/cfuse_workunit_suites_dbench.yaml validater/valgrind.yaml}'
teuthology-suite --priority 101 --suite fs --filter="$filter" --suite-branch hammer --email loic@dachary.org --ceph hammer-backports --machine-type smithi

running http://pulpito.ceph.com/loic-2016-03-10_19:56:52-fs-hammer-backports---basic-smithi/

I don't know anything in particular about suppressions, no, but I do note in the docs the --gen-suppressions flag?...

Did you run this through the test triggering issues and see if it suppresses properly? ;)
I think you don't need to do the mangling, though...our more recent functions are all just pulling out of valgrind xml log, which in the instance referenced here doesn't seem to be mangled — if you're worried about it you can also just include the important parts of the function name and use * for all the mangling bits.

Did you run this through the test triggering issues and see if it suppresses properly? ;)

Yes (see above) and it does pass. If you're also doing things the hard way (i.e. manual crafting instead of --gen-suppressions (which is not in the valgrind run unfortunately), then I'm happy to follow your lead.

authors: dachary dmick gregsfortytwo

repo: ceph/teuthology


text:
page with nonzero offset fails to include relationships if it contains exactly one resource

This issue is a (choose one):

[x] Problem/bug report.
[ ] Feature request.
[ ] Request for support. Note: Please try to avoid submitting issues for support requests. Use Gitter instead.

Checklist before submitting:

[x] I've searched for an existing issue.
[x] I've asked my question on Gitter and have not received a satisfactory answer.
[x] I've included a complete bug report template. This step helps us and allows us to see the bug without trying to reproduce the problem from your description. It helps you because you will frequently detect if it's a problem specific to your project.
[x] The feature I'm asking for is compliant with the JSON:API spec.

Description
If a page with nonzero offset contains exactly one resource then the included relationships are nil (for has_one) or [] (for has_many).
# frozen_string_literal: true

begin
  require 'bundler/inline'
  require 'bundler'
rescue LoadError => e
  warn 'Bundler version 1.10 or later is required. Please update your Bundler'
  raise e
end

gemfile(true, ui: ENV['SILENT'] ? Bundler::UI::Silent.new : Bundler::UI::Shell.new) do
  source 'https://rubygems.org'

  gem 'rails', require: false
  gem 'sqlite3', platform: :mri

  if ENV['JSONAPI_RESOURCES_PATH']
    gem 'jsonapi-resources', path: ENV['JSONAPI_RESOURCES_PATH'], require: false
  else
    gem 'jsonapi-resources', git: 'https://github.com/cerebris/jsonapi-resources', require: false
  end
end

# prepare active_record database
require 'active_record'

class NullLogger < Logger
  def initialize(*_args); end

  def add(*_args, &_block); end
end

ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
ActiveRecord::Base.logger = ENV['SILENT'] ? NullLogger.new : Logger.new(STDOUT)
ActiveRecord::Migration.verbose = !ENV['SILENT']

ActiveRecord::Schema.define do
  # Add your schema here
  create_table :users, force: true do |t|
    t.string :name, null: false
  end

  create_table :comments, force: true do |t|
    t.references :user, null: false, foreign_key: true, index: true
    t.string :title, null: false
  end
end

# create models
class User < ActiveRecord::Base
  has_many :comments
end

class Comment < ActiveRecord::Base
  belongs_to :user
end

# prepare rails app
require 'action_controller/railtie'
# require 'action_view/railtie'
require 'jsonapi-resources'

class ApplicationController < ActionController::Base
end

# prepare jsonapi resources and controllers
class UsersController < ApplicationController
  include JSONAPI::ActsAsResourceController
end

class CommentsController < ApplicationController
  include JSONAPI::ActsAsResourceController
end

class UserResource < JSONAPI::Resource
  attribute :name
  has_many :comments
end

class CommentResource < JSONAPI::Resource
  attribute :title
  has_one :user
end

class TestApp < Rails::Application
  config.root = File.dirname(__FILE__)
  config.logger = ENV['SILENT'] ? NullLogger.new : Logger.new(STDOUT)
  Rails.logger = config.logger

  secrets.secret_token = 'secret_token'
  secrets.secret_key_base = 'secret_key_base'

  config.eager_load = false
  config.hosts << 'example.org'
end

# initialize app
Rails.application.initialize!

JSONAPI.configure do |config|
  config.json_key_format = :underscored_key
  config.route_format = :underscored_key

  config.default_paginator = :paged
  config.default_page_size = 20
  config.maximum_page_size = 1000
end

# draw routes
Rails.application.routes.draw do
  jsonapi_resources :comments
end

# prepare tests
require 'minitest/autorun'
require 'rack/test'

# TODO: fixtures: how to correctly seed the test database once?
user = User.create! name: 'John Doe'
user.comments.create!(title: '1st comment')
user.comments.create!(title: '2nd comment')
user.comments.create!(title: '3rd comment')
user.comments.create!(title: '4th comment')
user.comments.create!(title: '5th comment')

# Replace this with the code necessary to make your test fail.
class BugTest < Minitest::Test
  include Rack::Test::Methods

  def json_api_headers
    { 'Accept' => JSONAPI::MEDIA_TYPE, 'CONTENT_TYPE' => JSONAPI::MEDIA_TYPE }
  end

  # test passes; demonstration only
  def test_user_included_on_first_page
    get '/comments?include=user&page[size]=2&page[number]=1', nil, json_api_headers
    json_response = JSON.parse(last_response.body)
    assert_equal 2, json_response['data'].length
    refute_nil json_response['data'].first['relationships']['user']['data']
  end

  # test passes; demonstration only
  def test_user_included_on_second_page
    get '/comments?include=user&page[size]=2&page[number]=2', nil, json_api_headers
    json_response = JSON.parse(last_response.body)
    assert_equal 2, json_response['data'].length
    refute_nil json_response['data'].first['relationships']['user']['data']
  end

  # this test fails because:
  #   * this page contains exactly one resource, and
  #   * the offset of this page is nonzero.
  # see https://github.com/cerebris/jsonapi-resources/blob/978f590f85fe9e65d5806f206b661fb35332c1bd/lib/jsonapi/active_relation_resource.rb#L398
  def test_user_included_on_last_page
    get '/comments?include=user&page[size]=2&page[number]=3', nil, json_api_headers
    json_response = JSON.parse(last_response.body)
    assert_equal 1, json_response['data'].length
    refute_nil json_response['data'].first['relationships']['user']['data']
  end

  private

  def app
    Rails.application
  end
end

Test case: https://github.com/Julius-Rapp/jsonapi-resources/commit/7772d2ce58623794adf215a8919dac28e82f6411

I had the suspicion that https://github.com/cerebris/jsonapi-resources/blob/978f590f85fe9e65d5806f206b661fb35332c1bd/lib/jsonapi/active_relation_resource.rb#L398 is superfluous. However, removing that line causes lots of test failures.
I am not able to provide a fix.

repo: cerebris/jsonapi-resources


text:
[terra-section-header] Migrate Docs to terra-core-docs

Summary

Migrate Docs to terra-core-docs

Closes #
Deployment Link

https://terra-core-deployed-pr-#.herokuapp.com/
Testing

Additional Details

Thank you for contributing to Terra.
@cerner/terra

can we remove these dependency https://github.com/cerner/terra-core/blob/section-header-docs/packages/terra-section-header/package.json#L32 ?

can we remove these dependency https://github.com/cerner/terra-core/blob/section-header-docs/packages/terra-section-header/package.json#L32 ?

No terra-arrange is used here: https://github.com/cerner/terra-core/blob/1f6eecf589defdb00f694ae94aefc97fd2f91a4a/packages/terra-section-header/src/SectionHeader.jsx#L7

repo: cerner/terra-core


text:
Release notes for 1.12

TBD:

[x] Change all @name to [@name](https://github.com/name)
[x] Change all #1234 to [#1234](https://github.com/cert-manager/cert-manager/pulls/1234)
[x] Fill in the section "Support for JSON logging"
[x] Fill in the section "Lower memory footprint" (tbd @irbekrm)
[x] Add a section "Decrease of the attack surface" or something like that to talk about each binary being its own Go module with much less dependencies for each binary (ask @SgtCoDFish)

@irbekrm Just in case, I wanted to let you know that I have finished editing the release notes of every PR.
Many of the release-note blocks were worded as commit messages instead of user-facing release notes.
For example, this release note isn't helpful:

Adds missing comparisons for certain fields which were incorrectly skipped if a LiteralSubject was set

A user-oriented release note would be

When using the literalSubject field on a Certificate resource, the IPs, URIs, DNS names, and email addresses segments are now properly compared.

At some point we need to address this, but I have no idea how 😅

I have added the links to the documentation, design, and PRs in the "major themes". The Go modules one was totally missing and people would have been confused not to see the link to the design document 😅

repo: cert-manager/website


text:
Bug: Validators for DecimalField

Describe the bug
Validators inside DecimalField for our Loan and Payment models is causing bugs, cause they try to call "return a.lower is None or a.lower < b", but acuse "AttributeError" due to decimal.Decimal' object has no attribute 'lower' .
To Reproduce
Go to admin page and try to post a new Loan.
Expected behavior
Get an error page:
AttributeError at /admin/calculator/payment/add/
'decimal.Decimal' object has no attribute 'lower'
The two last lines point the exception.

I think the only validation we can add is to check if the value is positive. I'm writing a custom validation as declared here:
https://docs.djangoproject.com/en/1.10/ref/validators/

And thinking about it, validators should be left to the integrated part for forms, no?

Como faço para pegar essa issue para mim?

Consegui fazer com
from django.forms import DecimalField
from django.core.validators import MaxValueValidator, MinValueValidator
client = models.ForeignKey(Client, on_delete=models.DO_NOTHING)
amount = models.DecimalField('Amount', max_digits=15,
                             decimal_places=2,
                             validators=[MinValueValidator(0.01)
                             ])
term = models.IntegerField('Term',
                            validators=[MinValueValidator(1)
                            ])
rate = models.DecimalField('Rate', max_digits=15,
                             decimal_places=2,
                              validators=[MinValueValidator(1)
                              ])
date_initial = models.DateTimeField('Date creation', auto_now=False, auto_now_add=False)

How Can I Get this issue?

You should click on the button "assign yourself"

I´t Woks with this.
from django.forms import DecimalField
from django.core.validators import MaxValueValidator, MinValueValidator
client = models.ForeignKey(Client, on_delete=models.DO_NOTHING)
amount = models.DecimalField('Amount', max_digits=15,
                             decimal_places=2,
                             validators=[MinValueValidator(0.01)
                             ])
term = models.IntegerField('Term',
                            validators=[MinValueValidator(1)
                            ])
rate = models.DecimalField('Rate', max_digits=15,
                             decimal_places=2,
                              validators=[MinValueValidator(1)
                              ])
date_initial = models.DateTimeField('Date creation', auto_now=False, auto_now_add=False)

Create a branch, change the code, run the tests and request a PR to branch development, please.

I't doesn't appear to me. I'm trying to append the print screen.

repo: cesarbruschetta/api-fintech


text:
🛑 echo-server.madacluster.tech is down

In d7dfc73, echo-server.madacluster.tech (https://echo-server.madacluster.tech) was down:

HTTP code: 0
Response time: 0 ms

Resolved: echo-server.madacluster.tech is back up in 1b3f7cc after 4 minutes.

repo: cesarempathy/upptime


text:
🛑 echo-server.madacluster.tech is down

In efd3643, echo-server.madacluster.tech (https://echo-server.madacluster.tech) was down:

HTTP code: 530
Response time: 71 ms

Resolved: echo-server.madacluster.tech is back up in 56a9227 after 5 minutes.


text:
API pro uložení/načtení/aktualizaci odpovědí na kalkulačku

Po vyplnění kalkulačky se odpovědi odešlou na API, které vygeneruje secure token, který vrátí spolu s UUID v odpovědi.
UUID bude poté možné použít pro načtení výsledků kalkulačky.
Pro aktualizaci odpovědí musím být přihlášený a dané UUID mít přiřazené k profilu.

Hotovo v #315.


text:
make Editor methods for abstract nodes non-default

I can't see any reason for overriding transform methods for "wide" nodes. It seems that this would either be a mistake or at least be a case of very fragile code. Unless there is some reason to allow refinements, making them non-default will help clarify the api and reduce bugs.
The same could almost be said for ImmediateNarrowingTransformer too, except for that interface, it's useful to refine return types, as Editor does.

Makes sense. I guess I’ll tag this as “performance”, since non-virtual methods can be slightly faster?

It seems that this would either be a mistake or at least be a case of very fragile code.

Well, there’s this in the samples.
// shortcuts to do less copying
transformStatement(Statement that) => that;
transformDeclaration(Declaration that) => that;

Looks like a hand-written variation of #111, doesn’t it? However, a quick test reveals: replacing => that with => nothing has no effect, the test still passes. So I guess this reinforces the point that whatever you thought you were doing by overriding wide transform methods, you didn’t do it right :D

Precisely :smile:

I forgot to update source-gen.
This should be done for aliases as well, right?

This should be done for aliases as well, right?

WDYM? Not things like ClassAliasDefinition, right?

No, the precedence aliases like AssigningExpression, DisjoiningExpression etc.

Oh, yeah, that makes sense.

Oh, and this also breaks the automatic sorting of source-gen, since methods with and without default are mixed :/

Alright, done now.

authors: jvasileff lucaswerkmeister


text:
Please improve description for direction_of_sea_water_velocity standard name

The description for the direction_of_sea_water_velocity standard name doesn't clearly state that it's a "to" direction. I assume it follows oceanographic convention, but think it needs to be stated explicitly.  Wind and wave direction variables have _from and _to options, with clear descriptions of what this means.  I think we can do better for direction_of_sea_water_velocity.
Thanks!

I don't see direction_of_sea_water_velocity in the current SN table, only sea_water_to_direction and sea_water_from_direction. Did this issue get reopened by accident?

I am closing this issue because it refers to an alias of the current name sea_water_velocity_to_direction. The issue is resolved by the name change.

authors: emontgomery-usgs japamment ngalbraith

repo: cf-convention/cf-conventions


text:
Asyncronous data fetching

What would be the best way to do asynchronous fetching of data from say, a back-end server?
On the home/index page, I plan to show a loading indicator (such as data placeholders), make a GET request to the API, and replace the data on the front-end when the request succeeds (or fails). I've got an existing store and a prop set as an empty array, and I just need to add the data from the back-end to that array.
Thanks!

Hello @ThatTonybo! Couldn't you just use a promise to fetch your data then once returned render your reef app? I can show you an example if you are interested.

Hello @ThatTonybo! Couldn't you just use a promise to fetch your data then once returned render your reef app? I can show you an example if you are interested.

That'd be great if you could show me an example, sure. Didn't really think of just doing it like that.

I really outta put up a demo of this on the ReefJS website... let's keep this open until I do.
But until then, here's a demo for you: https://codepen.io/cferdinandi/pen/yLJrMaV

And in case that Pen ever disappears...

Articles

Loading...

// Create an app
var app = new Reef('#app', {
	data: {
		articles: []
	},
	template: function (props) {
		return `

				${props.articles.map(function (article) {
					return `

						${article.title}.
						${article.body}

`;
				}).join('')}

`;
	}
});

// Fetch API data
fetch('https://jsonplaceholder.typicode.com/posts').then(function (response) {
	return response.json();
}).then(function (data) {
	app.data.articles = data;
});

Sweet, honestly that's exactly what I'm after personally, and it'd be a great thing on the website for sure. Under the Advanced section possibly?

That's a good place for it, yea. I should probably also add it to the demos page

Random question by the way (asking here instead of opening another issue), I'm unable to get my Reef app to work on Google Chrome. Been testing in Firefox and it's fine, but when I open in Chrome I get a blank page and this error:
site.js:24 Uncaught TypeError: Cannot read property 'id' of undefined
    at s.template (site.js:24)
    at s.render (reef.min.js:2)
    at reef.min.js:2

Line 24 is me using the following code in the template function:
if (route.id === 'index') {

I logged route (the template function uses function (props, route) { as used in examples) and it seems to be fully undefined. What's up there? Chrome specific bug?

If you have a demo I'd be happy to take a look, but I would recommend opening a new issue for that.

Alright, I'll get some code sorted on a pen and open a new issue later for you on it.

added to the site

authors: ThatTonybo brudolph cferdinandi

repo: cferdinandi/reef


text:
Smooth-Scroll is not working for me.....

Hi cferdinandi,
Sorry to bother you but I am new in this topic and trying this Scroll
Effect
I added it to my simple website and this effect is not working for me.....
Could you help me to fix it?
Thanks for your time
Alejandro

Test case: https://codepen.io/cferdinandi/pen/RqGLpz

Please open a new issue with a reduced test case. Also, check if you have Reduced Motion enabled in your browser/OS, as Smooth Scroll will not run in that case.

Hi again
Sorry for my ignaorance but Could you advice me abouy how to open a new issue with a reduced test case in Github?
Thanks

No worries. Details here: https://github.com/cferdinandi/smooth-scroll/blob/master/.github/contributing.md

repo: cferdinandi/smooth-scroll


text:
Rename info-unit-group-2.html to info-unit-group.html | Rename info-unit-2.html to info-unit.html

I couldn't find any references to this file https://github.com/search?q=repo%3Acfpb%2Fconsumerfinance.gov+info-unit-group.html&type=code
This was added in https://github.com/cfpb/consumerfinance.gov/commit/19bc91ae79d30da80b783eefb1b948dfa68ff90b and used in cfgov/jinja2/v1/_includes/organisms/half-width-link-blob-group.html, which was removed in https://github.com/cfpb/consumerfinance.gov/commit/906240b68b0c17c4902ae84f7e71df92b6156125 … it seems info-unit-group.html then hung around since them, without use.
Removals

Remove old info-unit-group.html

Changes

Rename info-unit-group-2.html to info-unit-group.html

Can anyone tell if info-unit.html is actually used?
InfoUnits are defined in molecules.py and references the info-unit.html template https://github.com/cfpb/consumerfinance.gov/blob/01e024e65ad2fd5f73300edd0732099e2576e05e/cfgov/v1/atomic_elements/molecules.py#L26
InfoUnitGroups used in wagtail have a info_units value set here https://github.com/cfpb/consumerfinance.gov/blob/01e024e65ad2fd5f73300edd0732099e2576e05e/cfgov/v1/atomic_elements/organisms.py#L97
InfoUnitGroups use the info-unit-group-2.html template (renamed to info-unit-group.html in this PR).
The info-unit-group-2.html template imports the info-unit-2.html template. It then takes the info_unit value from Wagtail and feeds it into info-unit-2.html here https://github.com/cfpb/consumerfinance.gov/blob/01e024e65ad2fd5f73300edd0732099e2576e05e/cfgov/v1/jinja2/v1/includes/organisms/info-unit-group-2.html#L67
The arguments are (unit, value.format, value.link_image_and_heading, value.border_radius_image), where unit gets fed into value in the info-unit-2.html template here https://github.com/cfpb/consumerfinance.gov/blob/01e024e65ad2fd5f73300edd0732099e2576e05e/cfgov/v1/jinja2/v1/includes/molecules/info-unit-2.html#L51
value is then never referenced directly in the info-unit-2.html macro, only the additional arguments (properties of value) are used.
So, it appears to me that the InfoUnit uses the info-unit.html template, but in actuality it just hands over values to info-unit-2.html, which does the actual rendering. Am I missing something here?

Can anyone tell if info-unit.html is actually used?

I think the answer is "no." InfoUnits aren't used anywhere outside of InfoUnitGroups, which you've correctly identified as controlling the rendering of its child InfoUnits via the info-group-2 template.
You can test this by just deleting the template field from InfoUnits Meta class and note no changes to a page with a rendered InfoUnitGroup, eg http://localhost:8000/owning-a-home/prepare/
So, could you rename info-unit-2.html like you've done in this PR? Probably. I'd also recommend removing the template field from the Meta class in general so it's clear it isn't rendering itself (alternatively, InfoUnit could keep its template and you could change how info units are rendered in info-unit-groups).

Removed info-unit.html and renamed info-unit-2.html to info-unit.html in https://github.com/cfpb/consumerfinance.gov/pull/8453/commits/1739450a9894638e140e05abc09a493205a4bd2c

Just want to drop in and offer my apologies for creating this situation :)

authors: Scotchester anselmbradford wpears


text:
🛑 Argo is down

In a79bdbd, Argo ($ARGO) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Argo is back up in 2677801 after 7 minutes.

repo: cfsausgit/upptime


text:
Error Installing via CommandBox

Get the following when running

box install cfsimplicity/lucee-spreadsheet

× | Installing package [github:cfsimplicity/lucee-spreadsheet]

> Error cloning github repository

Cloning Git URL [https://github.com/cfsimplicity/lucee-spreadsheet.git]

remote: Enumerating objects

remote: Counting objects (339)

remote: Compressing objects (225)

Receiving objects (3013)

Resolving deltas (2135)

Checking out files (108)

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

ERROR (5.2.1+00295)
Error cloning github repository
org.eclipse.jgit.api.errors.RefNotFoundException: Ref master cannot be resolved

I'm getting the same error. It seems that CommandBox is looking for something in the "master" branch of the repo, but I recently renamed that branch to "main". The current release and box.json does reflect that change though. I'm not a CommandBox expert though so I've probably missed something.
I've found that it does work via Forgebox, so try this simpler command instead:
box install lucee-spreadsheet

I'm getting the same error. It seems that CommandBox is looking for something in the "master" branch of the repo, but I recently renamed that branch to "main". The current release and box.json does reflect that change though. I'm not a CommandBox expert though so I've probably missed something.
I've found that it does work via Forgebox, so try this simpler command instead:
box install lucee-spreadsheet

That works. Thank you!

That works. Thank you!

repo: cfsimplicity/lucee-spreadsheet


text:
support forcing transport type

Request Statement
in native android we can forcing http connection over cellular data / wifi using okhttp3
this example snippet code
.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR)
my question, is it dio have configuration to force connection over cellular/wifi?
Solution Brainstorm
No response
### Tasks

You can do that with the https://pub.dev/packages/native_dio_adapter for iOS but I am not sure about the Android side which uses https://pub.dev/packages/cronet_http

As said in the comment above, dio itself can't and won't support this usecase. It is possible with the native adapter, or you can manually check what connection is currently active and make requests accordingly.

Hi @kuhnroyal , thanks for your information.
do you have example/reference for native dio adapter for ios, that forces cellular data?
I can't find any configuration that supports my issue above.
cronet_http doesn't have configuration-related force cellular data with cronet engine.
I don't think, native dio adapter also has this configuration for forcing cellular data.
At this time, I think the only solution on native side, using platform-specific channel
here is my reference on Android developer web.
https://developer.android.com/reference/android/net/NetworkRequest.Builder

Yea, you can actually only disallow cellular access with cupertino_http but you can not force it, my bad.

authors: arlakay kuhnroyal ueman

repo: cfug/dio


text:
🛑 Personal is down

In 0f69e1b, Personal (https://chadburrus.com) was down:

HTTP code: 521
Response time: 226 ms

Resolved: Personal is back up in dc903a9.

repo: chadburrus/upptime


text:
🛑 Personal is down

In 3d728b0, Personal (https://chadburrus.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Personal is back up in 6ff9629 after 10 minutes.


text:
Pip Package Support for Python 3.10

Noticed that a recent issue added some support for Python 3.10, but I believe this hasn't been extended to the pip package. Running !pip install chai_lab gives me the following traceback on Colab:
ERROR: Ignored the following versions that require a different python version: 0.0.1 Requires-Python >=3.11
ERROR: Could not find a version that satisfies the requirement chai_lab (from versions: none)
ERROR: No matching distribution found for chai_lab

It seems more like a python version issue and like for 1st error pip may have find that chai_lab is only compatible with python version - Python 3.11 or the above, you can may well update your version.

you can install a new version:
pip install git+https://github.com/chaidiscovery/chai-lab.git

Hi Navvye, please use command posted by @Garhorne0813 for now, we'll publish a version with support of python3.10 on pypi soon.

new version on pypi should support python 3.10:
pip install chai_lab==0.1.0

repo: chaidiscovery/chai-lab


text:
Make functions taking int32 variables also accept int64 variables

Some functions (e.g. embed_id, softmax_cross_entropy, accuracy) accept int32 variables as one of the inputs, while they do not allow that argument to be int64 variables. It may make a subtle bug occurring on Linux/macOS but not on Windows.
Consider that a Python list of Python int is converted to ndarray by numpy.array or cupy.array. The resulting array is of int64 on Linux/macOS while int32 on Windows. If the array is directly passed to these functions, it will pass the type check on Windows while not on Linux/macOS. I think this is problematic because it's very difficult for Windows users to find this "bug". Even if once the user finds that the code does not run on Linux/macOS, it is very hard to find the cause by non-expert of NumPy because it requires the knowledge about how the Python int value is mapped to numpy dtype.
I think this problem should be fixed by modifying the built-in FunctionNodes to accept int64 inputs as well.

Let's list up functions that need to be fixed.
Maybe some can be refactored to use FunctionNode constructor arguments instead of forward inputs.

repo: chainer/chainer


text:
[backport] Remove get_device from examples

Backport of #3122

LGTM

authors: niboshi unnonouno


text:
Check positive dilation in F.deconvolution_2d

Rel. #7304.
This PR make F.deconvolution_2d check if the supplied dilation is positive integer.

CIs, test this please.

Jenkins CI test (for commit 6d64061777f983e09401935800c95b43d8f755f4, target branch master) failed with status FAILURE.

authors: chainer-ci takagi toslunar


text:
test: use testify consistently

tests are using go-cmp, testify and t.Error.
This standardize the assertions to use testify and forbids the other two

Hi @puerco :wave:, Thank you for the feedback, I've reverted the last change!

repo: chainguard-dev/apko


text:
Integrating SBOM and Attestations with Backstage through a Chainloop Extension

Proposal: Integrating SBOM and Attestations with Backstage through a Chainloop Extension
Context:
I recently developed a version matrix plugin for Backstage that presents package listings for different package managers. Initially, the implementation was focused on Composer, where I manually sourced package data and displayed it in Backstage. During the process, I discovered that Chainloop, along with Syft, could serve as an excellent resource for gathering Software Bill of Materials (SBOM) and other attestation data, which would be far more scalable and reliable than building a package listing system from scratch. This led me to explore the potential of integrating Chainloop with Backstage to offer SBOM version tracking.
Proposal:
I propose building a Chainloop extension that integrates SBOM and attestation data with Backstage, initially focusing on SBOM version listings. The architecture for this integration involves decoupling the systems through a message queue to facilitate robust communication between Chainloop's FanOut mechanism and Backstage's backend.
Architecture Overview:
graph TD
    %% Chainloop FanOut process
    subgraph Chainloop
        A1[Chainloop receives SBOM Data] --> A2[Chainloop FanOut Extension]
        A2 --> A3[FanOut Task triggered]
        A3 --> A4[Prepare Message for Queue]
        A4 --> MQ1[Message Queue]
    end

    %% Message Queue decoupling the system
    MQ1[(Message Queue - NATS/Kafka/SQS)]

    %% Backstage Backend Plugin with detailed tasks
    subgraph Backstage Backend Plugin
        MQ1 --> B1[Scheduled Task]
        B1 --> B2[Pull Message from Queue]
        B2 --> B3[Parse SBOM Data from Message]
        B3 --> B4[Match SBOM to Backstage Entity]
        B4 --> B5[Process SBOM Packages]
        B5 --> B6[Store Processed Data in PostgreSQL DB]
    end

    %% PostgreSQL Database storing the processed data
    B6 --> DB1[(PostgreSQL Database)]

    %% Backstage User interaction with processed data
    subgraph Backstage User Interaction
        U1[Backstage User] --> UI1[Backstage Frontend - View Entity Page]
        UI1 --> UI2[Request SBOM Package Data]
        UI2 --> DB1
        DB1 --> UI3[Render SBOM Package Details on UI]
    end

Detailed Flow:

Chainloop FanOut: Chainloop receives SBOM data, which is processed through a custom FanOut extension. The extension prepares the SBOM data and pushes it to a message queue (e.g., NATS, Kafka, SQS, etc.).

Message Queue: A message queue decouples Chainloop and Backstage, ensuring reliability and flexibility in communication.

Backstage Backend Plugin:

A scheduled task in Backstage pulls messages from the queue.
The plugin parses the SBOM data from the message and matches it to the relevant entity in Backstage.
The SBOM package data is then processed and stored in a PostgreSQL database.

Backstage User Interaction:

Users interact with the processed SBOM data via Backstage’s frontend, where they can view version listings and package details related to the specific Backstage entity.

Open Questions for Discussion:
1. Message Queue Integration: I opted for a message queue between Chainloop and Backstage to decouple the systems and allow flexibility in the underlying infrastructure (e.g., supporting NATS, Kafka, SQS, etc.). However, I'm open to feedback—do you see this as the best approach, or would a more direct integration (e.g., HTTP-based or WebSocket) be preferable in this case? I’m particularly interested in understanding any trade-offs in terms of performance, complexity, or maintainability.
2. FanOut Process: Should the FanOut process be the preferred extension mechanism for handling this data in Chainloop, or is there another Chainloop component that could provide a more efficient or streamlined method for pushing SBOM data?
3. Backstage Backend Module Structure: Given that I plan to use multiple message queue systems (NATS, Kafka, etc.) based on user needs, should this be handled in a modular fashion within the Backstage plugin, or would a more uniform approach with configurable options be easier to maintain?
Reason for Proposal:
As I mentioned earlier, I initially built a version matrix plugin for Backstage that provides listings of package versions for Composer. Realizing that tools like Syft and Chainloop can automate and centralize SBOM generation and attestation, I want to leverage Chainloop’s existing capabilities instead of manually building a version tracking system from scratch. This integration would provide a scalable solution for organizations using Chainloop and Backstage, starting with SBOM listings and potentially expanding to other types of attestations in the future.
I believe this proposal could greatly enhance both Chainloop's extensibility and Backstage's capability to display SBOM and attestation data, providing developers with more transparency and traceability in their software supply chains.
Looking forward to your feedback and suggestions on this integration approach!

hi @ImperiumTakp
First of all, thank you so much for taking the time to craft such a detailed feature request.
From the functional point of view, your request makes sense overall. We have questions, though, that might impact the implementation.

Backstage Backend Module

Do you envision this plugin to be proprietary or general-purpose and open source?
We are open to both, but knowing which one might have an impact on how we should communicate with it. For example, if the plugin was OSS, we could start with a backstage fanout + backstage plugin using HTTP as the first step. But if it's proprietary, a general-purpose NATS integration might make sense.

Message Queue: A message queue decouples Chainloop and Backstage, ensuring reliability and flexibility in communication.

We have discussed in the past how a fanout integration for an event bus could be useful (https://github.com/chainloop-dev/chainloop/issues/419), but we always think about the fanout plugin pushing to a topic in an event bus running somewhere else.
It's not clear to me if you are proposing Chainloop should run a NATS stream instance as well or instead, it should be running next to backstage.

initially focusing on SBOM version listings.

I'd love to understand more about what you mean by version listing. That way, we can decide what kind of data must be sent over the stream, i.e., attestation info, SBOM, or both.
These are some of the questions that got raised during an internal chat with the team, we got very excited of your proposal so we'd like to discuss it further.
Would you be able to join our Slack community and maybe we can chat there?
Thanks again!

hi @ImperiumTakp
First of all, thank you so much for taking the time to craft such a detailed feature request.
From the functional point of view, your request makes sense overall. We have questions, though, that might impact the implementation.

Backstage Backend Module

Do you envision this plugin to be proprietary or general-purpose and open source?
We are open to both, but knowing which one might have an impact on how we should communicate with it. For example, if the plugin was OSS, we could start with a backstage fanout + backstage plugin using HTTP as the first step. But if it's proprietary, a general-purpose NATS integration might make sense.

Message Queue: A message queue decouples Chainloop and Backstage, ensuring reliability and flexibility in communication.

We have discussed in the past how a fanout integration for an event bus could be useful (#419), but we always think about the fanout plugin pushing to a topic in an event bus running somewhere else.
It's not clear to me if you are proposing Chainloop should run a NATS stream instance as well or instead, it should be running next to backstage.

initially focusing on SBOM version listings.

I'd love to understand more about what you mean by version listing. That way, we can decide what kind of data must be sent over the stream, i.e., attestation info, SBOM, or both.
These are some of the questions that got raised during an internal chat with the team, we got very excited of your proposal so we'd like to discuss it further.
Would you be able to join our Slack community and maybe we can chat there?
Thanks again!

Hi @migmartri
A bit of background
As you can see in the screenshot, this plugin provides an overview of PHP dependencies across different systems (it’s for Composer, specifically). The idea is to track package versions per system, and since SBOM data relates to this, I thought it made sense to use SBOMs generated during the CI process as the "source of truth" for this info. How we get that data into Backstage is really just a technical detail, but it feels like a natural fit with Chainloop.
Clarifying a few things:
1. Backstage Backend Module: Open Source
Yes, I envision the plugin being open-source and general-purpose. Backstage has a solid plugin ecosystem (check Backstage Plugins), and I think this would be a great addition for anyone using Chainloop and Backstage together. It would be super useful for anyone already running Backstage, and they could integrate Chainloop seamlessly if they decided to.
2. Message Queue or Another Way?
I suggested a message queue because Backstage typically pulls data while Chainloop pushes it, so a queue seemed like a good bridge. That said, I’m totally open to simpler options like using HTTP for the MVP. The main goal is to make sure Backstage can process and own the SBOM data, keeping things smooth and self-contained.
3. SBOM Version Listings
When I talk about “SBOM version listings,” I mean using Chainloop to track which package versions are included in the SBOM for each system. In the current version matrix plugin (screenshot above), we track dependency versions per system. Ideally, Chainloop would push the SBOM info, and then Backstage would pull that data to display the package versions in a similar matrix. The initial focus is on showing versions, but there’s definitely room to expand to attestation data or other SBOM details down the line.

I'll definitely join the Slack! My plan for the next step is to create a public Backstage setup with the work-in-progress Chainloop plugin. Looking forward to collaborating more!

Hi @ImperiumTakp, thanks again for taking the time to elaborate on those points, please see inline.

The idea is to track package versions per system, and since SBOM data relates to this, I thought it made sense to use SBOMs generated during the CI process as the "source of truth" for this info. How we get that data into Backstage is really just a technical detail, but it feels like a natural fit with Chainloop.

I agree; it looks like a great fit. Let's do it :)

Backstage Backend Module: Open Source

Perfect!
The reason I am asking is that, in fact, down in our backlog of things, creating an Open Source integration for backstage was in our pipeline, so we will be happy to collaborate with you. Potentially on the frontend and backend side :)
Originally, though, we were thinking of adding it as part of the https://github.com/chainloop-dev GitHub organization. That way

People who use Chainloop can discover this plugin easily
We can set the same development guidance/automation we set at the Chainloop Project itself. i.e Proper OSS compliance requirements, branch protection, static analysis, release process, signed commits, ...)

Would you be open to hosting this plugin code under https://github.com/chainloop-dev org? Of course, we will add a permissive Apache License, you will core contributor of the repo, etc.

Message Queue or Another Way?

I agree that an event bus is a scalable and extensible way of connecting both projects, but I am worried that it will add an additional dependency that somebody will need to deploy. From experience, we've got some feedback that Chainloop is already a complex setup, so adding an event bus just for this does not seem like an option in the short term.
Using an event bus opens other challenges, such as authentication, reachability, and so on. So, for the initial implementation, I'd suggest that we stick to POST API calls, similar to what we do for DependencyTrack unless you think there will be a big bottleneck. Note that eventually, on the Chainloop side, we are going to add more resiliency and control on the fanout interface so that we can be more gentle with the backstage endpoint :) https://github.com/chainloop-dev/chainloop/issues/39

SBOM Version Listings

Perfect, thanks for the info. I think that sending SBOM data + Attestation info would do the trick. Attestation info contains more metadata that could be useful down the line.
I can also see that you are already in Slack, welcome! Let me know if you want to have a quick chat with our team so we can put a face to a name and flesh out a plan, what do you think? :)
Thanks again,
Miguel

I've created a repo https://github.com/chainloop-dev/backstage-plugin

I'll definitely join the Slack! My plan for the next step is to create a public Backstage setup with the work-in-progress Chainloop plugin. Looking forward to collaborating more!

https://chainloop-community.slack.com/archives/C076SP4SCTD/p1726681561106329
I'd love to have a chat about this feature request @ImperiumTakp

authors: ImperiumTakp anoncam migmartri

repo: chainloop-dev/chainloop


text:
请问对于合作标注，可以进行多人合作，分配标注任务。这个能讲详细点吗

If you open a GitHub issue, here is our policy:

It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).
The form below must be filled out.

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
Python version:

Describe the problem
Describe the problem clearly here. Be sure to convey here why it's a bug or a feature request.
Source code / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.

Sorry, we cannot understand chinese. Please in English.

First of all, thank you for your reply, your product is really great! I would like to consult: I would like to cooperate with the multi-person cooperation and assign the labeling task. Can you tell me more about this? Is everyone going to register an account, or just one person to register an account, and multi-person collaboration mark under the same account?
------------------ 原始邮件 ------------------
发件人: "Hiroki Nakayama"notifications@github.com;
发送时间: 2019年8月19日(星期一) 下午2:59
收件人: "chakki-works/doccano"doccano@noreply.github.com;
抄送: "奋斗的小蜗牛"1344294218@qq.com;"Author"author@noreply.github.com;
主题: Re: [chakki-works/doccano] 请问对于合作标注，可以进行多人合作，分配标注任务。这个能讲详细点吗 (#336)
Sorry, we cannot understand chinese. Please in English.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

authors: Hironsan WenNicholas

repo: chakki-works/doccano


text:
Docsite

Adds a docsite for cell-census, using Sphinx.
Notes:

Right now, the Sphinx conf and sources are in the doc folder and the artifacts are in docs. For GitHub Pages, there needs to be an index.html in docs so that folder is best reserved for it. Maybe renaming doc to docs-sphinx could be a good idea.
I will add a script that can be used to regenerate the docs. This should be automatic, but I wouldn't put too much effort until we finalize the hosting.

Do we need to commit all of the generated files?

Right now we're publishing the docs using GitHub pages on a branch, which requires the files to be in the repo. GitHub also offers another alternate workflow that, I believe, does not require the files to be checked in, but since this is just a temporary solution, I went for the simplest one. If we decide to keep GitHub Pages as the hosting solution, I think it's worth exploring.

repo: chanzuckerberg/cell-census


text:
[Bug] Hosted cellxgene unit tests currently running against cellxgene package

Need
The cellxgene unit tests should run in conditions as similar as possible to how they run in production. Currently the hosted unit tests spin up the cellxgene package server instead of the server used in elastic beanstalk
Approach
update the unit tests to use the wsgi server/create a test server and necessary infrastructure
DOD

unit tests pass when testing in an environment similar to the prod env

In staging now!

authors: MDunitz tihuan

repo: chanzuckerberg/corpora-data-portal


text:
all runs associated with dataset (list view)

User story: (3.5) I want to see all runs associated with this dataset + filter/sort within the dataset so that I can easily navigate large amounts within dataset
Tasks

[ ] show list of runs

Link to design: https://www.figma.com/file/WEmbsjtlBUtRy7pzmuCCjj/CryoET-Data-Portal---Phase-2-Designs?type=design&node-id=757%3A86414&mode=dev

@codemonkey800 - backend story where you'll find the key photos https://github.com/chanzuckerberg/cryoet-data-portal/issues/56

Following defects found:
"Run" title in single dataset page should be in blue and clickable for sorting #166
Clickable area taking the user to Run page is not responding #167
Tooltips overlap when open one after another #168
Clickable area next to "Run"/"Dataset" title is too long #169

Passing this item to Completed as bugs opened are taking care of already, no need to track this one here, thank you!

authors: junxini lauramarcos

repo: chanzuckerberg/cryoet-data-portal


text:
Add right hand side padding on select sample page

Right now if the page isn't large enough the processing time gets cut off. Let's make sure the table has some breathing room - should be easier after we reduce the sidebar width.

Would this still be a relevant issue, sidebar has been reduced hmm 🤔

@cyrielo @sadelokiki yep!

authors: cyrielo eggerdesigns

repo: chanzuckerberg/idseq-web


text:
feat: Update “download datasets” copy URL (#5589)

Reason for Change

#5589
https://github.com/chanzuckerberg/single-cell-data-portal/issues/5586

Changes

Modified download datasets copy URL.
Modified download datasets copy caption text as per mocks to include a link to the schema and Discover API.
Schema URL is updated to https://github.com/chanzuckerberg/single-cell-curation/blob/main/schema/3.1.0/schema.md as per slack thread.

My cursory assessment is that the FE is still calling this endpoint which (still) generates a presigned url.

My cursory assessment is that the FE is still calling this endpoint which (still) generates a presigned url.
Copying from #5589:

Currently, a request is sent to create and retrieve a pre-signed URL. The generated pre-signed URL is no longer required; the URL is to be assembled by the frontend from the dataset version ID.

Hi @danieljhegeman, we changed the approach on how the permanent URL should be generated but it looks like I didn't update the "need" section of the corresponding ticket. I have just made that update.
The update to call the new endpoint is here.
The existing POST endpoint will be cleaned up in this ticket.

The update to call the new endpoint is here.

This is not a new endpoint, as you allude to in a subsequent comment. It is the same endpoint, just a different method, right?

Hi @danieljhegeman, we changed the approach on how the permanent URL should be generated but it looks like I didn't update the "need" section of the corresponding ticket. I have just made that update.

Can you say a bit more about this?

The update to call the new endpoint is here.

This is not a new endpoint, as you allude to in a subsequent comment. It is the same endpoint, just a different method, right?

Ah, I see! Yes, we added a GET method to /datasets/datasetId/asset/assetId in this PR, specifically here.
The existing POST method (e.g. here) will be removed with Remove Data Portal pre-signed asset URL capability once this PR lands.

Can you say a bit more about this?

Originally the approach was to generate the link to the permanent URL on the FE and deprecate the existing POST method. During our weekly call on September 13, (@frano-m and) I raised the issue that we need to display a file size in the download modal which is currently provided to the FE via the soon-to-be-deprecated POST endpoint. @ebezzi suggested we create a new GET method to return both the permanent URL (as we could then re-use the logic used by the curator API) and the file size.
@danieljhegeman, let me know if this isn't clear or if you have any more q's!

The update to call the new endpoint is here.

This is not a new endpoint, as you allude to in a subsequent comment. It is the same endpoint, just a different method, right?

Ah, I see! Yes, we added a GET method to /datasets/datasetId/asset/assetId in this PR, specifically here.
The existing POST method (e.g. here) will be removed with Remove Data Portal pre-signed asset URL capability once this PR lands.

Can you say a bit more about this?

Originally the approach was to generate the link to the permanent URL on the FE and deprecate the existing POST method. During our weekly call on September 13, (@frano-m and) I raised the issue that we need to display a file size in the download modal which is currently provided to the FE via the soon-to-be-deprecated POST endpoint. @ebezzi suggested we create a new GET method to return both the permanent URL (as we could then re-use the logic used by the curator API) and the file size.
@danieljhegeman, let me know if this isn't clear or if you have any more q's!

Thanks @MillenniumFalconMechanic . I think this work just came in / is coming in more piecemeal than I might've expected, but all the same in terms of the end goal. Thanks for confirming!

repo: chanzuckerberg/single-cell-data-portal


text:
Update family-friendly.md

fixes #185
Signed-off-by: Georg J.P. Link linkgeorg@gmail.com

Looks good

authors: GeorgLink germonprez

repo: chaoss/wg-diversity-inclusion


text:
🛑 Silky.Network - us-ca is down

In 2fa7775, Silky.Network - us-ca (https://us-ca-mirror.chaotic.cx/no-failover/chaotic-aur/lastupdate) was down:

HTTP code: 503
Response time: 67 ms

Resolved: Silky.Network - us-ca is back up in 7e97196.

repo: chaotic-aur/chaotic-uptimes


text:
🛑 in (Naman) is down

In ca95272, in (Naman) (https://in-mirror.chaotic.cx/no-failover/chaotic-aur/lastupdate) was down:

HTTP code: 503
Response time: 131 ms

Resolved: in (Naman) is back up in 3bc63ba.


text:
🛑 us-tx (xstefen) is down

In 1d98ec5, us-tx (xstefen) (https://us-tx-mirror.chaotic.cx/no-failover/chaotic-aur/lastupdate) was down:

HTTP code: 503
Response time: 67 ms

Resolved: us-tx (xstefen) is back up in 682f80d.


text:
flake: add git sources to flake.nix and rename packages to -git

Move git sources to flake inputs as suggested. Moving the KDE applets doesn't make much sense IMO, as there won't be any new commits.

Nah, let's keep them like they are right now.

Agreed, I liked it better this way, too :P

repo: chaotic-cx/nyx


text:
Add support for compiling without Vulkan SDK

It would be nice to have a mode of compiling SPIRV-Reflect without the need for the Vulkan SDK to be installed (especially if unavailable, like on OS X). It looks like the Vulkan SDK is mainly used for the API that returns descriptor types, etc.. Perhaps in a compilation mode without the Vulkan SDK, the tool would be useful to do general reflection without returning VK specific types.
Currently I get the following cmake error on OS X
-- The C compiler identification is AppleClang 9.0.0.9000039 -- The CXX compiler identification is AppleClang 9.0.0.9000039 -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at CMakeLists.txt:15 (message):   VULKAN_DIR not set, use -DVULKAN_DIR=<path> or set VULKAN_SDK environment   variable
This is not a huge issue, but definitely impeding some of my workflows.
Thank you,
Graham

Works great! Thank you very much

repo: chaoticbob/SPIRV-Reflect


text:
The documentation for the GraphQL starter should be updated to reflect the latest changes to the Drupal module dependencies.

Package
I’m not sure
Describe the feature request
A clear and concise description of what the request is. If your feature request is related to a problem, please describe it.
If applicable, add screenshots to help explain your issue.
Describe the solution you'd like
Describe alternatives you've considered
Additional context
Add any other context about the problem here.

I'm not sure if the hook to include the GitHub issue worked, so linking here: https://github.com/chapter-three/next-drupal/pull/597

repo: chapter-three/next-drupal


text:
iPhone >=7 && iOS >=11

I'm using Ionic 3.x with the native plugin which installs v0.7.3. nfc.enabled(onSuccess, onFailure); when deploying on a physical iPhone 7 via USB/Xcode always returns "null" in success callback. Any ideas? NFC permissions are enabled, and build succeeds without any NFC errors/warnings.
Also, when reading an NFC tag, should beginSession be called before or after nfc.addNdefListener(callback, [onSuccess], [onFailure]);
TIA

To help others who run into this:

if enabled returns null, as long as in success callback, treat as valid.
beginSession should be used solely (without addNdefListener)

repo: chariotsolutions/phonegap-nfc


text:
[BUG] Daily Set not 100% complete (Turbocharge quiz)

Before submitting a bug report...

[X] This bug wasn't already reported.
(I have checked every bug report on GitHub)

Describe the bug
I noticed that the farmer doesn't complete all of the daily set quizzes, namely the "Turbocharge" quiz. Even though it says there are no more quizzes to complete in the daily set:

I ran it multiple times and it gave the same result, but still leaves out the turbocharge quiz:

Copy and paste your error
No error, it just says its successfully completed all the quizzes.
Screenshot of the bug

Value of dashboard variable

Could you please screenshots what's happening during the execution (run it with -v argument to show the browser)

Currently can't do anything, if this happens again please take screenshots in the browser so we can see what's happening

authors: Gigafrost charlesbel

repo: charlesbel/Microsoft-Rewards-Farmer


text:
Orientation and WritingDirection

Thanks for all you do.  I have successfully created a batch OCR application using your wrapper.  However, I occasionally run into an image where the text does not read from left-to-right.  I have tried scouring the web to find the best method for determining page/text orientation.  These methods are not demonstrated in the sample applications.
Here is my current page level code...
                using (TesseractEngine engine = new TesseractEngine(System.Environment.GetEnvironmentVariable("TESSERACT_PREFIX"), "eng", EngineMode.Default))
                {
                    Pix img = Pix.LoadFromFile(MyImgFilePath);
                    Page page = engine.Process(img);
                    img.Deskew();
                    //GetPageOrientation here
                    string text = page.GetText();
                    page.Dispose();
                    img.Dispose();
                    text = text.Replace("\n", "\r\n");
                    return text;
                }

How would I "AutoRotate" to get the correct text?
I have attached an image for testing.

Hi,
I am new to tesseract. I wanted to know how do you rotate the image after getting a deskew angle?

Use Pix.Rotate, see the comments for doco.
On Fri, 19 May 2017, 20:24 TitikshaDaga, notifications@github.com wrote:

Hi,
I am new to tesseract. I wanted to know how do you rotate the image after
getting a deskew angle?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/charlesw/tesseract/issues/59#issuecomment-302667379,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPzyA-hWJaO8N7RUsCn8pWU1OVIrqZaks5r7W3vgaJpZM4BWUfC
.

@charlesw no the deskew angle is still the same. Below is my code. Can u tell me where I m going wrong?
`StringBuilder OCRedText = new StringBuilder();
int i = 0;
using (TesseractEngine engine = new TesseractEngine(@"./tessdata", "eng", EngineMode.TesseractAndCube))
{
//Console.WriteLine(engine.Version);
using (PixArray pages = PixArray.LoadMultiPageTiffFromFile(@"C:\Users\titiksha.5.daga\Documents\My Scans\scan0003.tif"))
{
//preprocessing here if needed
foreach (Pix p in pages)
{
OCRedText.Clear();
engine.DefaultPageSegMode = PageSegMode.AutoOsd;
using (Page page = engine.Process(p))
{
//get page orientation
Console.WriteLine(page.AnalyseLayout().GetProperties().Orientation);
Console.WriteLine(page.AnalyseLayout().GetProperties().DeskewAngle);
using (PageIterator iter = page.GetIterator())
{
iter.Begin();
var properties = iter.GetProperties();
p.Rotate(properties.DeskewAngle);
}
//Rect region = new Rect(0, 0, page.Image.Width, page.Image.Height / 4);
//page.RegionOfInterest = region;
Console.WriteLine(page.AnalyseLayout().GetProperties().DeskewAngle);
string text = page.GetText();
OCRedText.Append(text);
Console.WriteLine(OCRedText.ToString());
Console.WriteLine(page.GetMeanConfidence());
                    }
                }
            }
        }`

@charlesw that didn't work for me. Below is my code. Can u tell me where am I going wrong?
`StringBuilder OCRedText = new StringBuilder();
int i = 0;
using (TesseractEngine engine = new TesseractEngine(@"./tessdata", "eng", EngineMode.TesseractAndCube))
{
//Console.WriteLine(engine.Version);
using (PixArray pages = PixArray.LoadMultiPageTiffFromFile(@"C:\Users\titiksha.5.daga\Documents\My Scans\scan0003.tif"))
{
//preprocessing here if needed
foreach (Pix p in pages)
{
OCRedText.Clear();
engine.DefaultPageSegMode = PageSegMode.AutoOsd;
using (Page page = engine.Process(p))
{
//get page orientation
Console.WriteLine(page.AnalyseLayout().GetProperties().Orientation);
Console.WriteLine(page.AnalyseLayout().GetProperties().DeskewAngle);
using (PageIterator iter = page.GetIterator())
{
iter.Begin();
var properties = iter.GetProperties();
p.Rotate(properties.DeskewAngle);
}
//Rect region = new Rect(0, 0, page.Image.Width, page.Image.Height / 4);
//page.RegionOfInterest = region;
Console.WriteLine(page.AnalyseLayout().GetProperties().DeskewAngle);
string text = page.GetText();
OCRedText.Append(text);
Console.WriteLine(OCRedText.ToString());
Console.WriteLine(page.GetMeanConfidence());
                    }
                }
            }
        }`

Mostly looks OK to me though you should output the deskew angle you actual intend to use :)
For instance something like this:
using (Page page = engine.Process(p)) {
    iter.Begin();
    var properties = iter.GetProperties();
     // TODO: first rotate the image so it's upright based on the Orientation property.
    Console.WriteLine("Deskew angle: {0}", properties.DeskewAngle);
    using (Pix deskewedPix = p.Rotate(properties.DeskewAngle)) { // deskew already in radians so no need to convert
          // Return or use the deskewed pix as appropriate
    }
}

I want to OCR the page after making the page upright. So how do I do that. If I want to use deskewedpix then I will have to make a new page. So how do I dispose the the Page page.

In that case just return the rotated pix as mentioned and then process said
pix as desired.
That being said do check that there is any difference in the OCR output
between the process the rotated pix and the original since you'd obviously
be processing the image twice which mightn't be necessary.
On Mon, 22 May 2017, 19:31 TitikshaDaga, notifications@github.com wrote:

I want to OCR the page after making the page upright. So how do I do that.
If I want to use deskewedpix then I will have to make a new page. So how do
I dispose the the Page page.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/charlesw/tesseract/issues/59#issuecomment-303048870,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPzyFSwn-K3NLDXVsFl56MrD9HOYDD2ks5r8VXogaJpZM4BWUfC
.

I tried returning the deskewed image and then applying ocr on it but now I m getting an exception that says recognition of image failed. Below is my code.
`public Form1()
{
InitializeComponent();
using (engine = new TesseractEngine(@"./tessdata", "eng", EngineMode.TesseractAndCube))
{
using (PixArray pages = PixArray.LoadMultiPageTiffFromFile(@"C:\Users\titiksha.5.daga\Documents\My Scans\scan0003.tif"))
{
foreach(Pix p in pages)
{
Pix dpix = GetImage(p);
Console.WriteLine(GetText(dpix));
}
}
}
}
    public string GetText(Pix p)
    {
        using (Page page = engine.Process(p))
        {
            ocredText = page.GetText();
            Console.WriteLine(page.AnalyseLayout().GetProperties().DeskewAngle);
        }
        return ocredText;
    }

    public Pix GetImage(Pix p)
    {
                    using (Page page = engine.Process(p, PageSegMode.AutoOsd))
                    {
                        using (PageIterator iter = page.GetIterator())
                        {
                            iter.Begin();
                            var properties = iter.GetProperties();
                            using (Pix dpix = p.Rotate(properties.DeskewAngle))
                            {
                                return dpix;
                            }
                        }
                    }

    }

}

}`

It's failing as your returning disposed image from GetImage, just return
the resulting pix and use it like so:
using(Pix deskewedPix = GetImage(...)) {
//Whatever
}
Also note that you'll also need to take into account the orientation as the
dekew angle is relative to that.
On Mon, 22 May 2017, 20:04 TitikshaDaga, notifications@github.com wrote:

I tried returning the deskewed image and then applying ocr on it but now I
m getting an exception that says recognition of image failed. Below is my
code.
`public Form1()
{
InitializeComponent();
using (engine = new TesseractEngine(@"./tessdata", "eng",
EngineMode.TesseractAndCube))
{
using (PixArray pages =
PixArray.LoadMultiPageTiffFromFile(@"C:\Users\titiksha.5.daga\Documents\My
Scans\scan0003.tif"))
{
foreach(Pix p in pages)
{
Pix dpix = GetImage(p);
Console.WriteLine(GetText(dpix));
}
}
}
}
public string GetText(Pix p)
{
    using (Page page = engine.Process(p))
    {
        ocredText = page.GetText();
        Console.WriteLine(page.AnalyseLayout().GetProperties().DeskewAngle);
    }
    return ocredText;
}

public Pix GetImage(Pix p)
{
                using (Page page = engine.Process(p, PageSegMode.AutoOsd))
                {
                    using (PageIterator iter = page.GetIterator())
                    {
                        iter.Begin();
                        var properties = iter.GetProperties();
                        using (Pix dpix = p.Rotate(properties.DeskewAngle))
                        {
                            return dpix;
                        }
                    }
                }

}

}
}`
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/charlesw/tesseract/issues/59#issuecomment-303056679,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPzyIe3t-NtJeq4HLIWzUX_BH66E6uIks5r8V2fgaJpZM4BWUfC
.

if I write
using(Pix deskewedPix = GetImage(p))
{
Console.WriteLine(GetText(deskewedPix))
}
it gives me the same exception.
and if I write
using (Pix dpix = p.Rotate(properties.DeskewAngle))
{
using (Page page1= engine.Process(p))
{
ocredText = page1.GetText();
Console.WriteLine(page.AnalyseLayout().GetProperties().DeskewAngle);
}
}
it gives me the exception : Only one image can be processed at once. Please make sure you dispose of the page once your finished with it.

As I said your current GetImage implementation is returning a disposed of
image, don't :)
On Mon, 22 May 2017, 20:28 TitikshaDaga, notifications@github.com wrote:

if I write
using(Pix deskewedPix = GetImage(p))
{
Console.WriteLine(GetText(deskewedPix))
}
it gives me the same exception.
and if I write
using (Pix dpix = p.Rotate(properties.DeskewAngle))
{
using (Page page1= engine.Process(p))
{
ocredText = page1.GetText();
Console.WriteLine(page.AnalyseLayout().GetProperties().DeskewAngle);
}
}
it gives me the exception : Only one image can be processed at once.
Please make sure you dispose of the page once your finished with it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/charlesw/tesseract/issues/59#issuecomment-303061755,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPzyHrxr66snLw5c1hhBMy9VxS_yMt5ks5r8WM4gaJpZM4BWUfC
.

I am sorry but I still don't understand what should I do differently.

And also I wanted to know how do I set the orientation of the page to always be upright.

Something like this:
public Pix GetImage(Pix p) {
using (Page page = engine.Process(p, PageSegMode.AutoOsd)) {
using (PageIterator iter = page.GetIterator()) {
iter.Begin();
var properties = iter.GetProperties();
return  p.Rotate(properties.DeskewAngle));
}
}
}
Sorry on my phone which makes it a notch to type in code.
On Mon, 22 May 2017, 20:40 TitikshaDaga, notifications@github.com wrote:

I am sorry but I still don't understand what should I do differently.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/charlesw/tesseract/issues/59#issuecomment-303064211,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPzyBZsSKoKQlFfgvmjGRqzOUPaERGDks5r8WYFgaJpZM4BWUfC
.

As for orientation i'd just handle each case of the enum seperatly, i.e.
If(orientation == Orientation.PageRight) {
// Rotate page 90 counter clockwise (-Math.Pi/2)
}
// Etc
On Mon, 22 May 2017, 20:43 Charles Weld, charles.weld@gmail.com wrote:

Something like this:
public Pix GetImage(Pix p) {
using (Page page = engine.Process(p, PageSegMode.AutoOsd)) {
using (PageIterator iter = page.GetIterator()) {
iter.Begin();
var properties = iter.GetProperties();
return  p.Rotate(properties.DeskewAngle));
}
}
}
Sorry on my phone which makes it a notch to type in code.
On Mon, 22 May 2017, 20:40 TitikshaDaga, notifications@github.com wrote:

I am sorry but I still don't understand what should I do differently.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/charlesw/tesseract/issues/59#issuecomment-303064211,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPzyBZsSKoKQlFfgvmjGRqzOUPaERGDks5r8WYFgaJpZM4BWUfC
.

Thanks a lot for the help. The code works now. :)

@charlesw
Hi,
I posted this on the forum and I didn't get any reply so I am asking this question over here. Is there any way through which I can assign probabilities to characters.
For eg:
I know that the first character can only be a 'U' ,'P' or a 'D' and nothing else. So how can I set the probability of 'U','P' or 'D' to be 0.33 and for other symbols to be 0?

You can use the choice iterator to get the potential different matches and
the corresponding probabilities. I'm not sure about going the other way
(i.e. effectively telling Tesseract that I is more probable than P).
P.S. please file a new issue for different questions in the future.
On Tue, 23 May 2017, 18:49 TitikshaDaga, notifications@github.com wrote:

@charlesw https://github.com/charlesw
Hi,
I posted this on the forum and I didn't get any reply so I am asking this
question over here. Is there any way through which I can assign
probabilities to characters.
For eg:
I know that the first character can only be a 'U' ,'P' or a 'D' and
nothing else. So how can I set the probability of 'U','P' or 'D' to be 0.33
and for other symbols to be 0?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/charlesw/tesseract/issues/59#issuecomment-303333409,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPzyDiqe51hGFO2hhQ-erTYOQoTPEggks5r8p2wgaJpZM4BWUfC
.

I did file a new issue but that wasn't answered. So I posted it here. Thanks I will try your solution.

Is there any documentation as to how to use a choice iterator?

Not specifically, if you want an example check out
EngineTests.WriteResultsToString in the test project.
On Tue, 23 May 2017, 19:49 TitikshaDaga, notifications@github.com wrote:

Is there any documentation as to how to use a choice iterator?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/charlesw/tesseract/issues/59#issuecomment-303348629,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPzyPgBmsGdfap_3AnpClGmNWgeUxJKks5r8qu5gaJpZM4BWUfC
.

Hi Charles,
I am using Tesseract 3.0.2 . Autorotate functionality is working fine except for few images
Could you please check and let me know the issue
if (!(options is AutoOrientOptions))
{
throw new ArgumentException("AutoOrientOptions expected");
}
        image.Seek(0, SeekOrigin.Begin);

        var angle = 0;

        using (var engine = new TesseractEngine(@"tessdata", "eng", EngineMode.Default))
        {
            // Enable orientation detection
            engine.DefaultPageSegMode = PageSegMode.AutoOsd;

            using (var file = Pix.LoadTiffFromMemory(ImageTools.GetBytes(image)))
            {
                using (var page = engine.Process(file))
                {
                    using (var layout = page.AnalyseLayout())
                    {
                        //var text = page.GetText();

                        switch (layout.GetProperties().Orientation)
                        {
                            case Tesseract.Orientation.PageDown:
                                angle = -180;
                                break;
                            case Tesseract.Orientation.PageLeft:
                                angle = 90;
                                break;
                            case Tesseract.Orientation.PageRight:
                                angle = -90;
                                break;
                        }
                    }
                }
            }

For the attached image the orientation is always PageUP

This is a known issue with Tesseract 3.02. Maybe use Page.DetectOrientation instead. Usage example here: https://github.com/charlesw/tesseract/blob/master/src/Tesseract.Tests/AnalyseResultTests.cs
Might also be worth trying the latest prerelease, it's using tesseract 3.05.1 underneath so should be pretty stable.

authors: KaNaPaPi TitikshaDaga brijeshsubhagan charlesw

repo: charlesw/tesseract


text:
V1

More work towards a v1 release.
Work done:

[x] Split out the single datepicker component into multiple smaller components
[x] Split out translations into separate importable files
[x] Refactor build tools to rollup saving almost 50% filesize - 46kb down to 27kb 👍
[x] Build umd, cjs and esm modules
[ ] Update readme with new changes

Coverage decreased (-10.2%) to 86.226% when pulling b442f3a7b03769f40c67f7272601756b58a23ea9 on v1 into 03c18c50dfe7ca636c5665485fad80eb83d60d9e on master.

authors: charliekassel coveralls

repo: charliekassel/vuejs-datepicker


text:
PT009: --fix ignores custom assertion messages

before
import unittest

class TestFoo(unittest.TestCase):
    def test_foo(self):
        self.assertTrue(unittest, "The module exists")

lint & fix
$ ruff --version
ruff 0.0.247

$ ruff --select PT009 PT009.py
PT009.py:6:9: PT009 [*] Use a regular `assert` instead of unittest-style `assertTrue`
Found 1 error.
[*] 1 potentially fixable with the --fix option.

$ ruff --select PT009 --fix PT009.py
Found 1 error (1 fixed, 0 remaining).

after
import unittest

class TestFoo(unittest.TestCase):
    def test_foo(self):
        assert unittest

expected
import unittest

class TestFoo(unittest.TestCase):
    def test_foo(self):
        assert unittest, "The module exists"

Related to PT009, PT027 (self.assertRaises) is missing in ruff from the rules defined by upstream flake8-pytest-style:
https://github.com/m-burst/flake8-pytest-style/blob/master/docs/rules/PT027.md

It does the right thing if you use self.assertTrue(unittest, msg="The module exists"), but we should fix it to respect the positional.

authors: bastimeyer charliermarsh

repo: charliermarsh/ruff


text:
Implement doc line length enforcement

This PR implements W505 (DocLineTooLong), which is similar to E501 (LineTooLong) but confined to doc lines.
I based the "doc line" definition on pycodestyle, which defines a doc line as a standalone comment or string statement. Our definition is a bit more liberal, since we consider any string statement a doc line (even if it's part of a multi-line statement) -- but that seems fine to me.
Note that, unusually, this rule requires custom extraction from both the token stream (to find standalone comments) and the AST (to find string statements).
Closes #1784.

Thank you! Much appreciated ❤

@stinodego - Of course! Let me know if you notice any discrepancies. I'm detecting "doc lines" using a different strategy, but it should have identical behavior apart from a few weird edge cases (like multi-line statements that contain string expressions, e.g., x = 1; "standalone string"; y = 2).

I just tried to break it a few different ways, and it seems to work just fine for all the use cases I could come up with!

authors: charliermarsh stinodego


text:
ci: Use rust toolchain actions

Use the actions-rs/toolchain action to install Rust, actions-rs/cargo to run cargo commands, and action-rs/clippy-check to run clippy.

Using actinos-rs/toolchain ensures that our workflows work with act, allowing to test locally
Using actions-rs/cargo: It gives nice warnings and errors in the GitHub UI
Using actions/clippy-check: Posts lint annotations

Test Plan
Sample output after I added clippy errors
https://github.com/charliermarsh/ruff/actions/runs/4404224020/jobs/7713601234

Seems reasonable to me. We intentionally moved away from actions-rs/toolchain at Boshen's recommendation based on profiling work from Rome. I'm curious if your benchmarking shows that it's much slower (or not).

The benefit is that you don't have to sync your CI Rust versions with rust-toolchain.toml.

:wave: @Boshen Thanks for chiming in.

The benefit is that you don't have to sync your CI Rust versions with rust-toolchain.toml.

This is no longer an issue because the action now supports the toolchain file

This Action supports toolchain files, so it is not necessary to use toolchain input anymore. ....

@Boshen heard me even without the tag

For what it's worth, we moved away from actions-rs/toolchain as it is unmaintained. We moved to dtolnay/rust-toolchain, which seems to work fine.

For what it's worth, we moved away from actions-rs/toolchain as it is unmaintained. We moved to dtolnay/rust-toolchain, which seems to work fine.

Hmm, that's a good point. I believe dtolnay/rust-toolchain doesn't respect the version specified in the toolchain.toml. But we could give setup-rust-toolchain a try.

authors: Boshen MichaReiser charliermarsh stinodego


text:
Add dlvhdr/gh-prs to the list of tools built with bubbletea

Hi :) I created a CLI tool with bubbletea and would like it to be added to the list of tools in the README:
dlvhdr/gh-prs

"Fix" coming up in #189. Well deserved, we love gh-prs! Keep up the great work! :heart:

Merged!

Thank you @muesli!

authors: dlvhdr muesli

repo: charmbracelet/bubbletea


text:
Initialize microk8s: Error from server (Forbidden): selfsubjectaccessreviews.authorization.k8s.io is forbidden: User "me" cannot create resource "selfsubjectaccessreviews" in API group "authorization.k8s.io" at the cluster scope

Hi,
We have noticed the following error in our repos, e.g. mysql-k8s:
Run charmed-kubernetes/actions-operator@main
...
Initialize microk8s
...
  /usr/bin/sg microk8s -c microk8s kubectl auth can-i create pods --as=me
  Error from server (Forbidden): selfsubjectaccessreviews.authorization.k8s.io is forbidden: User "me" cannot create resource "selfsubjectaccessreviews" in API group "authorization.k8s.io" at the cluster scope

the same error reported for the current repository tests.

Should it be cleaned / fixed?
Why GH action continued and didn't report an error?

P.S. I am not able to reproduce the same issue locally using the same microk8s version:
> /usr/bin/sg microk8s -c "microk8s kubectl auth can-i create pods --as=me"
no

> microk8s version
MicroK8s v1.26.1 revision 4595

Tnx!

The answer on 2 above: https://github.com/charmed-kubernetes/actions-operator/blob/3d3eb35d73c0f326d07880d83a99876d321f823c/src/bootstrap/index.ts#L109
We just check the exit code... and not "yes/no" value in reply.
The interesting part: it is sometimes "no" and sometimes "Error" in our tests...

@addyess could you clarify the purpose of that line?
In our use cases that assertion seems to always be wrong (meaning microk8s kubectl auth can-i create pods --as=me always succeeds).
What's the expected behavior and why? If it's just a bug, could we remove the line altogether since it doesn't really stop the action anyway?

@lucabello and @taurus-forever looking at this a year after having put it there, i don't recall the context for it being this way.  @stonepreston you reviewed this PR with me but i don't recall a reason.  It likely has something to do with waiting for microk8s to be ready to create pods for the test -- but i can't say i remember why it's there.
You're both right in that it's simply left adding setup time to the tests and providing no other value other than filler.  Hopefully that filler time isn't necessary to someone

Hey @addyess, that filler time is starting to impact us more and more :) It looks like an extremely simple change to make, can we make it happen?

Good news, @lucabello !  I still don't know why it's there.  What if we add an input to the actions operator to allow your jobs to skip it?  Is that something you can contribute?
I don't want to remove it b/c then we'll have new issues show up asking why it's gone.

related: #59

authors: DanielArndt addyess lucabello taurus-forever

repo: charmed-kubernetes/actions-operator