Heroku CI: Webdrivers::VersionError: Failed to find Chrome binary or its version.

Summary
We're struggling to get our system tests running on Heroku CI, having migrated from chromedriver-helper.
Although the Chrome binary seems to be installed correctly, running the system tests on Heroku CI produces the error: Webdrivers::VersionError: Failed to find Chrome binary or its version.
Executing the test suite locally, of course everything works great. But on Heroku CI, it's unable to find the Chrome binary. Here's an excerpt from the test log:
-----> Running test command `rake`...
The HashDiff constant used by this gem conflicts with another gem of a similar name.  As of version 1.0 the HashDiff constant will be completely removed and replaced by Hashdiff.  For more information see https://github.com/liufengyun/hashdiff/issues/45.
Run options: --seed 40983
# Running:
...........sh: 1: [/usr/local/sbin,: not found
sh: 1: [/usr/local/sbin,: not found
sh: 1: [/usr/local/sbin,: not found
sh: 1: [/usr/local/sbin,: not found
sh: 1: [/usr/local/sbin,: not found
sh: 1: [/usr/local/sbin,: not found
E
Error:
My::ProfileTest#test_0002_edit profile:
Webdrivers::VersionError: Failed to find Chrome binary or its version.
    test/system/my/profile_test.rb:19:in `block in <class:ProfileTest>'
Error:
My::ProfileTest#test_0002_edit profile:
Webdrivers::VersionError: Failed to find Chrome binary or its version.
    test/support/application_system_test_case.rb:9:in `block in <class:ApplicationSystemTestCase>'
Error:
My::ProfileTest#test_0002_edit profile:
Webdrivers::VersionError: Failed to find Chrome binary or its version.

bin/rails test test/system/my/profile_test.rb:18
sh: 1: [/usr/local/sbin,: not found
sh: 1: [/usr/local/sbin,: not found
sh: 1: [/usr/local/sbin,: not found
sh: 1: [/usr/local/sbin,: not found
sh: 1: [/usr/local/sbin,: not found
sh: 1: [/usr/local/sbin,: not found
E

Test setup
We are using the chrome buildpacks. In our app.json file we have:
{ "url": "https://github.com/heroku/heroku-buildpack-chromedriver" },
{ "url": "https://github.com/heroku/heroku-buildpack-google-chrome" }

Here's how we're initializing Selenium:
# frozen_string_literal: true

require 'webdrivers'
require 'capybara/rails'
require 'capybara/minitest'

chrome_bin = ENV.fetch('GOOGLE_CHROME_SHIM', nil)

chrome_opts = chrome_bin ? { 'chromeOptions' => { 'binary' => chrome_bin } } : {}

Capybara.register_driver :chrome do |app|
  Capybara::Selenium::Driver.new(
    app,
    browser: :chrome,
    desired_capabilities: Selenium::WebDriver::Remote::Capabilities.chrome(chrome_opts)
  )
end

Capybara.javascript_driver = :chrome

class ActionDispatch::SystemTestCase
  # Make the Capybara DSL available in all integration tests
  include Capybara::DSL
  # Make `assert_*` methods behave like Minitest assertions
  include Capybara::Minitest::Assertions

  driven_by :selenium, using: :headless_chrome, screen_size: [1400, 1400] unless ENV['CI']

  teardown do
    Capybara.reset_sessions!
  end
end

Chrome Binary
The Chrome binary seems to be installed correctly by the buildpack. Here's the result of executing the binary (in the Heroku CI debug console):
~ $ echo $GOOGLE_CHROME_SHIM
/app/.apt/usr/bin/google-chrome-stable
~ $ echo $GOOGLE_CHROME_BIN
/app/.apt/opt/google/chrome/chrome
~ $ `$GOOGLE_CHROME_SHIM`

Executing that binary produces:
DevTools listening on ws://<IP_ADDRESS>:9222/devtools/browser/5c76de39-1a69-4193-966c-5670573eab59
^C

I was also curious what the chromedriver:version rake task would return
Here's the result (using Heroku debug console):
~ $ bundle exec rake webdrivers:chromedriver:version
The HashDiff constant used by this gem conflicts with another gem of a similar name.  As of version 1.0 the HashDiff constant will be completely removed and replaced by Hashdiff.  For more information see https://github.com/liufengyun/hashdiff/issues/45.
2019-06-12 23:59:12 WARN Webdrivers No existing chromedriver found.

... and here's what I see locally:
bundle exec rake webdrivers:chromedriver:version
2019-06-12 19:10:24 INFO Webdrivers chromedriver 74.0.3729.6

Interestingly, executing Webdrivers::ChromeFinder.version in the Heroku CI debug console also raises the same exception:
~ $ rails c
irb(main):024:0> Webdrivers::ChromeFinder.version
sh: 1: [/usr/local/sbin,: not found
Traceback (most recent call last):
        1: from (irb):24
Webdrivers::VersionError (Failed to find Chrome binary or its version.)

the Chrome.path is empty:
irb(main):001:0> Selenium::WebDriver::Chrome.path
=> nil

https://github.com/titusfortner/webdrivers/blob/a287cad1fad20a2160156e53ce83f91e201096ee/lib/webdrivers/chrome_finder.rb#L6-L14

The problem here is the shim installed by the chrome buildpack.  Unfortunately when it's called with --version as an option to determine what version the installed Chrome is, it sticks a bunch of other options on the command line which means rather than returning the version of Chrome it actually starts it.  The way around this is to tell Webdrivers where the actual Chrome binary is
Selenium::WebDriver::Chrome.path = ENV['GOOGLE_CHROME_BIN']

Note -- It would be great if the heroku/circleci shims were updated to allow them to actually return the version when queried for it.

Thanks - that's a step in the right direction. These are some wild hoops to jump through for Heroku.
The test is now finding the right binary, but now it's hanging with no output. I suspect this is a problem with the buildpack.

@twalpole @crispinheneise I submitted https://github.com/heroku/heroku-buildpack-google-chrome/pull/73 last night to make $GOOGLE_CHROME_SHIM return the version. Let's see if it gets merged.

The latest version of the google-chrome buildpack no longer needs the workaround described here. We've updated the SHIM to support webdrivers. See https://github.com/heroku/heroku-buildpack-google-chrome/pull/73/ for more information.


Add feature to find text similarity score

In addition to the ability of extracting entities from correlating them to relate two text contents, a feature to find text similarity based on well known algorithms like cosine will help understand the extent to which two text contents are similar.

Added the feature.


Selected row index remains when moving

Describe the bug
The selected row index remains, not the selected row.
https://github.com/sadmann7/sortable/assets/437480/8fad962b-cdc0-4392-a44f-64d9988b8849
Basically the row you selected doesn’t remain selected.
How to reproduce
Select a row. Then sort the rows.
Link to reproduction
https://sortable.sadmn.com/data-table
Additional information
No response

You need to assign a unique key (like uuid) for each row. Add this to your useReactTable options:
const table = useReactTable({
  // ...
  // Redefine the row ID so that the row can still be correctly located after CRUD operations
  getRowId: (row) => row.uuid,
  // ...
});

by using unique id, it will also stop jumping around after dropping to a new position


Upgrade aws-msk-iam-auth

Just upgrading the IAM auth provider. This makes AWS SSO setup work out-of-the-box.
Should solve #4355

[ ] Breaking change? Nope 🙂

What changes did you make? (Give an overview)
Upgrade dependency: aws-msk-iam-auth: 1.1.7 to 2.1.0
This JAR is heavily shaded, so no issues should occur 🤞
Is there anything you'd like reviewers to focus on?
N/A
How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

[ ] No need to
[x] Manually (please, describe, if necessary)
[ ] Unit checks
[ ] Integration checks
[ ] Covered by existing automation

Built locally.
I had to skip the Java tests (ran with -DskipTests because I run on Apple Silicon and there are issues.
I connected to an MSK cluster with IAM auth and it worked. I have SSO setup.
Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
[x] My changes generate no new warnings (e.g. Sonar is happy)
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged

Check out Contributing and Code of Conduct
A picture of a cute animal (not mandatory but encouraged)
Context: Wikipedia

I see that this change was already proposed here, and that this project is on pause.
I've moved for now to use kafbat/kafka-ui fork (bleeding edge) which already has this.

Me and @Haarolean no longer support this repo.
Don't you mind to propose your request to our repo https://github.com/kafbat/kafka-ui

Me and @Haarolean no longer support this repo. Don't you mind to propose your request to our repo https://github.com/kafbat/kafka-ui

There's no need, they already have a new enough version of aws-msk-iam-auth.


ExceptionDetails doesn't handle Objects when doing error reporting

This issue has to do with the handling of ExceptionDetails that uses objects instead of strings.
Example code that would generate an object instead of a string in an exception:
await page.evaluate(() => {
    return Promise.reject({foo:"bar"})
  })

how does Puppeteer handles this currently?
     Error: Evaluation failed: Error: [object Object]

What do I expect to happen?
     Error: Evaluation failed: Error: {"foo":"bar"}

I've tracked this back to one spot:
https://github.com/GoogleChrome/puppeteer/blob/master/lib/helper.js#L50
Just wrap those returned values in JSON.stringify and everything should work as expected.

Any update on this?

Any update on this?


[fud2] add planner using egg

This PR implements an new planner using egg to efficiently explore the search space of possible programs. It is NOT complete (but of course that is really hard).
The assumption the planner makes which breaks completeness is it assume each state can only be used by one op.
This PR additionally lightly refactors the plan module to move different planners into their own files as well as updates the cli to allow use of the new planner.
The interesting code here is in egg_planner.rs.
This PR includes simple manual testing of the new planners. In particular cases the simple case of ops with more than one or less than one output as well as various cases of simple (non-hyper) graphs.
Planners still require some sort of thorough testing for larger more random graphs for better verification and to understand their complexity, but that seems the job of a different PR.
TODO:

[x] refactor plan
[x] implement egg planner
[x] test <- This might actually be better to do in a different PR. Just merging this probably won't hurt anyone.

This PR has been manually tested but still requires proper testing (really all of the planners do). That should be done in the coming week. Either way, this should be ready to review.
The two options moving forwards are to merge this into main and create a new PR for testing, or branch testing of the planners off of this branch. I'm of mind to do the first.

A comment from your very-helpful lab notebook update (https://github.com/orgs/calyxir/discussions/2113#discussioncomment-10192086) got me thinking:

A set of states which was created by a set of ops can be represented a pair of lists lists of "x"s and "c"s. The ith element of the first list is "c" iff state i exists in the set of states, else it is "x".

If I'm following correctly, I think another way of saying this would be that we are representing sets of states/ops as their characteristic functions, represented as a vector. That is, if there are N possible values, then a set is an N-bit vector where each value indicates whether the value is in the set.
IIUC the current implementation doesn't use bits, however; coordinate i in this set vector is the integer i if the value is present. One thing I'd like to understand is whether this is really necessary: could we just use bits (c and x symbols), as in this description? This could certainly simplify a few things.
(Just theorizing here, but I'm guessing that you may have built it the way you did to be more general: assuming that the StateRefs and OpRefs could be arbitrary integers. But in fact they are guaranteed to be the numbers 0..n. So perhaps it suffices to use an n-bit vector to represent a subset. As a fun fact, that's exactly what EntitySet does!)

Your comment and theory is correct (but not sure that link is, did you mean this). Though, I don't think there is any loss using just a bit vector for this implementation. The code never needs to turn a StateLanguage expression back into a pair of subsets.
I decided to just remove the information about the actual state because no point in keeping it around.

Can I assume this is ready to be merged?


A3C status/example?

Is A3C actually implemented as of now? I can't seem to find a way to actually use it (and global optimizer seems to be commented out in https://github.com/reinforceio/tensorforce/blob/9ff94e69a2d19eeb6975fde613b31173f4601f25/tensorforce/core/optimizers/init.py
I have several copies of the environment that I want to train against, but not necessarily in a multi-threaded way.  Is there a way I can do this currently?  The main issue right now is decoupling the implied sequencing in the agent/model structure - I want to be able to call agent.act(state) and then agent.observe(reward), and use A3C to combine model updates to the global model.  Do I have to construct multiple models under the same agent?  Is this something I need to implement myself?  Ideally I would just pass in a list of environments to an agent which would handle all the semantics.

Hi @wangell,
The examples/openai_gym_async.py should work, which you can use as guidance if you want to setup your own customized runner script. The reason why GlobalOptimizer is commented out is that it shouldn't be available as optimizer key to 'just set' (at least not yet), but it is used when setting corresponding config arguments. Distributed/concurrent/async execution is on the roadmap for the next big update, which is however still many weeks away -- we haven't started yet. The above script allows you to run multiple independent models on separate environments, which update a global model and sync their own parameters with it. That's the only mode currently supported, unfortunately.

So: Yes, A3C works, if you start the above script using the VPGAgent (-a vpg_agent) with a baseline.

Hi @AlexKuhnle, would you be so kind of explaining a bit more how to implement A3C as you say:

if you start the above script using the VPGAgent (-a vpg_agent) with a baseline

This would be of great help, many thanks!!

Sorry for the very late answer, but if you haven't made any progress yet, I hope this helps.


[Bug]: scss fluid headings not working as expected.

Package
@carbon/type
Browser
Chrome
Package version
11.23.0
React version
No response
Description
The fluid headings change size with the window size and not between breakpoints. Carbon Docs explicitly say that:

These headings are responsive and the type styles change size at different breakpoints.

Reproduction/example
https://carbon-elements.netlify.app/type/examples/preview/
Steps to reproduce

Install carbon/type.
Use this SCSS line in any heading. `@include type.type-style('fluid-heading-03', $fluid: true);
Change window size

Suggested Severity
Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.
Application/PAL
IBM Quantum Learning
Code of Conduct

[X] I agree to follow this project's Code of Conduct
[X] I checked the current issues for duplicate problems

Thank you

o

Any update here? Is there any issue in the carbon-website to follow up on?

The text needs to be updated to say something like

These headings are responsive and the type styles change based on the viewport width

Any update here? Thanks in advance!

I just create an small PR about it: https://github.com/carbon-design-system/carbon-website/pull/4043


added read functionality

Pull this in after Main page has been implemented. Make sure to pass the following params:
navigation.navigate("Read", { username: username, artist: artist, song : song, rating: rating })

@ananafrida I have also fixed the merge conflict for this one.


npm ERR! peer<EMAIL_ADDRESS>- 16.x" from<EMAIL_ADDRESS>with NPM 7 or above install

Please update & test to latest react version, although it can be ignored by -- force with NPM or downgrade to NPM 6*, but a bit annoying to see it print out in my console.
peer<EMAIL_ADDRESS>- 16.x" from<EMAIL_ADDRESS>The complete error below:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving<EMAIL_ADDRESS> // this my project name, ignore it.
npm ERR! Found<EMAIL_ADDRESS>npm ERR! node_modules/react
npm ERR<EMAIL_ADDRESS>from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer<EMAIL_ADDRESS>- 16.x" from<EMAIL_ADDRESS>  // does not work with NPM 7, unless --force
npm ERR! node_modules/react-vis
npm ERR<EMAIL_ADDRESS>from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Steven.bi\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR!      C:\Users\Steven.bi\AppData\Local\npm-cache_logs\2021-10-28T02_42_43_485Z-debug.log

Same thing still occurring in 2022.

+1

+1

+1

+1
Is this something that plans on getting fixed?

@McleanWorkshield I noticed after posting my comment that the last update was a Deprecated notice, as the library is without maintainers. I decided to go with a graph library called  Victory for react myself.

@digichain Thanks! After posting I saw the date last published and started to assume the worst. Looks like a new refactor project coming my way.
I'll check out Victory!

You can overwrite react version for react-vis adding this in package.json
 "overrides": {
    "react-vis": {
      "react": "^17.0.2"
    }
  }

Example:
{
  "dependencies": {
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-vis": "^1.11.7"
  },
  "overrides": {
    "react-vis": {
      "react": "^17.0.2"
    }
  }
}

@babay123  -- Much appreciated!!

I also needed to override react-dom:
  "overrides": {
    "react-vis": {
      "react": "^17.0.2",
      "react": "^17.0.2"
    }
  }
}


Textfield not working when Drawer(with overlay) is open

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

i have added a search bar with autocomplete feature. but its not working when drawer is tablet/mobile (smaller) devices

Expected Behavior 🤔

The textfield/autocomplete should be working when sidebar is also open in tablet/mobile mode
Steps to Reproduce 🕹

https://codesandbox.io/s/hopeful-swirles-ipc1p?file=/src/App.js
Steps:

Open the drawer
interact with the search bar

Context 🔦

blocking the ability use search when drawer is also open.
Your Environment 🌎

Tech
Version

Material-UI
v4.11.0

React

Browser

TypeScript

etc.

This is expected, you force the app bar to display over the Modal. You can either display the app bar below the Modal or disable the Modal or disable the trap focus.


[WIP] Admin settings screen refactor

EDIT: Breaking this up into smaller components for review
Large refactor for wp-admin settings screen to improve the code, add missing translations, rewrite settings descriptions, and other minor improvements. Complete list:

Generic functions to output settings field HTML in WP_Auth0_Admin_Generic
Generic functions to output dashboard and docs site links
Rewrote all settings descriptions and fixed documentation links
Persistent tab on settings screen (return to where you were when saving/refreshing)
Removed duplicate wp-admin notices for missing information
Rewrote delete JWKS cache JS functionality and moved to existing external JS file
Generic JS functionality to hide settings fields based on switch on/off
Removed unnecessary Audience settings field
Fixed Gravatar integration switch

Parsed into several smaller PRs


Web wallet user interface

How labor intensive would it be to make a backend user tablespace that could store private keys and a list of public addresses they watch? We can bring over most of the front end from the classic wallet as far as visuals go. I keep hearing the "Oh the is no web wallet" argument a ton lately. Lack of security on it is a little spooky though.

Pretty trivial. Hold on, taking this to slack.

Like this idea, great feature idea @realcodywburns.

Might as well add classicetherewallet's client-side wallet while we're at it. That's also nodejs/angular.

That's the sprit! Ha ha. I'm internet less today but tomorrow I will start reskinning every thing

ooh, if we're gonna have accounts and logins, that means that there should be some reliable server to host the database, because logins will only work on one server.
Right now, @coryvmcs1 is hosting a copy of the explorer on etherhub.io. If @coryvmcs1 is okay with it, maybe etherhub.io can be the production version of the explorer?

For the test server: When a user is signing up, couldn't we just generate a wallet private key that is based off of the same password, like in the classic wallet?

Newly generated wallets are created from a random seed, so a user should not be able to generate the same wallet twice.

Yeah, not regeneration, generate when the account is created then store the the priv key and public key in the db. Instead of the user keeping their private key it is hashed and stored on the db for them

2 questions:

are we going to have a sufficiently reliable server that can host the DB?
Not totally sure about this one. I'm okay with having user accounts associated with watch lists and API keys, but I am against storing private keys on the DB, even if hashed, given that the software is open source.

First question: no, not at this point. We would need redundant systems and raid storage.
Question 2: yes I agree, super high risk with open source . if there is a hole it will be found.

I have got the chrome extension working from the old wallet project. It stores keys on a users computer and keeps everything client side. watch only or stored keys. Need to migrate the rpc api at some point https://github.com/realcodywburns/ETC-CX-Wallet

awesome @realcodywburns . this should be merged with the classicetherwallet though, not explorer, right?

Right, if we are continuing them as separate projects

Wallet could be a submodule of explorer, that would be easiest. Are you
working on the webwallet, or is that just Julian? Do you know if there are
plans to change the design? I think it would be nice if all the ETC web
interfaces had a similar design.
On Sat, Aug 20, 2016 at 6:55 PM, Cody Burns<EMAIL_ADDRESS>wrote:

Right, if we are continuing them as separate projects
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/ethereumproject/explorer/issues/15#issuecomment-241234264,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACPZr912tZgy0USZ2Ooh_zSFHEzEyZOuks5qh7AJgaJpZM4JebAu
.


Error 'budget limit must be larger than 0' even when specified

I'm seeing the following error when trying to create the construct (1.0.4) from within an SST application:
Unable to create/update budget - budget limit must be larger than 0

This is the code that I'm using:
createCostMonitoring(stack: Stack) {
    const costMonitoring = new ApplicationCostMonitoring(stack, {
      subscribers<EMAIL_ADDRESS>      monthlyLimitInDollars: 10,
      applicationName: 'some-name',
      defaultTopic: 'cost-monitoring',
    });
    costMonitoring.monitor();
  }

Is there anything obvious I'm doing wrong?

Looking at the generated output it seems the value isn't being passed through to Cloudformation:
"applicationsomenamedevdaily080applicationsomenamedaily080budgetB41D3327": {
   "Type": "AWS::Budgets::Budget",
   "Properties": {
    "Budget": {
     "BudgetLimit": {
      "Amount": 0,
      "Unit": "USD"
     },
     "BudgetName": "application_somename_daily_0_%80_budget",
     "BudgetType": "COST",
     "CostFilters": {
      "TagKeyValue": [
       "user:cm:application$somename"
      ]
     },
     "TimeUnit": "DAILY"
    },
    "NotificationsWithSubscribers": [
     {
      "Notification": {
       "ComparisonOperator": "GREATER_THAN",
       "NotificationType": "ACTUAL",
       "Threshold": 80,
       "ThresholdType": "PERCENTAGE"
      },
      "Subscribers": [
       {
        "Address": {
         "Ref": "costmonitoringtopic1C6948DE"
        },
        "SubscriptionType": "SNS"
       }
      ]
     }
    ]
   }
  },

@rcoundon, thanks for reporting the issue. This happens because ApplicationCostMonitoring creates an alert budget by dividing the monthly budget by 30. As you provide the value of 10 for your monthly budget and the budget value must be an integer value, the daily budget will be estimated as zero.
The class should throw an error if you provide a budget of less than $30, but it does not do that right now.

I see - thanks for getting back to me so quickly. I'm just experimenting at the moment, I'll try a higher budget in the meantime.

@rcoundon you are welcome. You can open new issues if have any other problem.
ps: The pull request for fixing this issue is available here.


Remove the Donate Here button

Replace with "Jagathi Foundation is registered organization under societies act. All contributions towards JF are exempt from Income Tax under section 80(G)."


Remove ParameterRewriter usage from AggregationAnalyzer

Paramters need to be constants (but might be non-deterministic).
Previously queries like
PREPARE query FROM SELECT 1 + rand(5) FROM ... GROUP BY ?
EXECUTE query USING 1 + rand(5)
would pass aggregation analysis. However, such class of queries
is not practical and using ParameterRewriter in analysis
prevents further planning optimizations.

I don't even know how to put this in release notes in friendly language. It's probably not that relevant anyway.


Fix formatting in docstring

Thanks! This change has been made through another avenue, so closing this PR.


OCaml-5 support

This PR makes the support to ocaml-5 available by using the right pgx version.

The 2.2 version removes the ocaml < 5 constrainte and add the right machinery to make it works with ocaml.5.0.0. This way, we are able to work with ocaml.5.0.0 with omigrate :smile:

Indeed it's useless. I haven't seen that the constraint was into pgx... Closing this. Sorry for the noise :sweat_smile:


calvin's replication

ran both replications on Ubuntu in Windows. No problem occurred.

Please add your commit point to the log?

Will do. Sorry about that.


Translated README to Simplified Chinese

Simplified Chinese is used in China, Singapore, and other Chinese communities around the world.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: jiebo sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


Refactor click

Change the way that we get addon/operator args.
We get it as dict which is easier to work on.

/verified

/lgtm

/verified


Congratulations for this incredible library!
Can I get precise coordinates of eyes, mouth and nose?
Let me explain what I want to do ... I'm not a blander/threeJs professional and I want to use CSS3 capabilities to position objects on camera using coordinates delivery from jellizFaceFilter library. This is possible?

Hello,
Thank you for your interest about JeelizFaceFilter API :)
Unfortunately the detection of the face is a global detection. We do not detect specific keypoints like BRFv4 for example (https://github.com/Tastenkunst/brfv4_javascript_examples).
We are going to release an upgrade where the mouth opening coefficient is detected.
But the current head detection frame is centered on the middle of the eyes so you can retrieve the position of the eyes quite accurately. Idem for the nose. But for the mouth I think there will be more variability because there are people with a lot of space between the mouth and the nose, and other whose mouth is almost stitched to the nose.
I will put the dev of a demonstration using canvas2D or CSS3 on my pipeline and keep you informed.

Great! I already tested the brfv4 library before but I prefer your solution, including I can't use the brfv4 in a commercial app and the licence is expensive (in brazilian currency).
I'm following the "luffys hat" tutorial that is a perfect start point for my project.
I will share my project in github when I finish him.
Thank you very much.

Hi,
We have add the CSS3D support for easier integration.
The link to the boilerplate and another CSS3D example are included from the README.
I tested it on Ipad, on android and desktop.

Great! Thank you very much!
This solution definitely solved my problem, now I'm trying to take a picture and bring the comedy-glasses togheter, I'm seriously considering use fabricJS for that, once I need to manipulate the image inside canvas, I don't know if this is the correct way ...

Is it possible to only color certain parts of the face, like the eyes or the lips and then the colored portion moves as the person smiles etc

this is not possible bc the detection is global


Data type of HMM best hit scores

In the kmer_extract function, selection of best HMM hits happens via parsing the filtered HMM file and selecting the highest score for each protein.
The problem is that the string.split() function returns a list of strings, not a best-matching type of each chunk. The HMM scores are being compared as strings, so "80" > "300" for the protein scores.
score = line[8]
in that function must be replaced by
score = float(line[8])

Corrected. Thanks Kenji!


fixing macos 2022.4 plugin

this should allow add the missing lib and to correct its @rpath in the plugin library

this should fix #143 for 2022.4
cc @veeshy
once it is build you should be able to find a new version of the plugin in the build artifacts.
For your specific version here:
https://github.com/svalinn/Cubit-plugin/actions/runs/3712499162/jobs/6294102442

@veeshy the new build seems to be working for me
could you confirm ?
(Non-Commercial License) Cubit>help export dagmc

Help for words: export & dagmc.

export dagmc <filename> [faceting_tolerance <faceting tolerance>] [length_tolerance <length tolerance>]
     [normal_tolerance <normal tolerance>] [make_watertight] [verbose]
     [fatal_on_curves]

Help for words: export & dagmc.

export dagmc <filename> [faceting_tolerance <faceting tolerance>] [length_tolerance <length tolerance>]
     [normal_tolerance <normal tolerance>] [make_watertight] [verbose]
     [fatal_on_curves]

@gonuke, sorry it took me so long.
next time, if there is just a small suggestion like that, feel free to commit it, and merge it, so this doesn't have to wait for me and my limited availability....

ping @gonuke  ?

Thanks @bam241 - LGTM!


backport: bitcoin#18225, #18270, #21438, #22220, #18134, #18449, #19750, #20452 (locale independence)

Doesn't build

Yeah, doing a git rebase with edit in the command line and then doing changes through Sublime Merge is known to cause odd squashing behavior, can you tell me which commits they are so I can sort them out?


refactor delete to remove in libp2p bitswap and extend api of libp2p ipc for bitswap

This PR renames a number of methods with names deleteXX to removeXX.
It also adds a functions create_download_resource_push_message and create_remove_resource_push_message that will later be used for organization of IPC between Ocaml's bit-catchup algrotihm code and Libp2p's functions exposing Biytswap functionality.

!ci-build-me

!ci-build-me

!ci-build-me

!ci-nightly-me

!ci-build-me

!ci-build-me


feat(Order/SuccPred): BddAbove.exists_isGreatest_of_nonempty

when IsSuccArchimedean

LGTM but I'm not sure if it can be generalized to some other *Order class we have, so delegating to @YaelDillies .
bors d=@YaelDillies

I am not super happy with the generality of this PR, but since @Command-Master's PRs that would unlock the greater generality are currently stalled, let's press on.
bors merge


error

tensorflow.python.framework.errors_impl.UnknownError: 2 root error(s) found.
(0) Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
[[node fusion/fusion_model/layer1/Conv2D (defined at E:/PMGI/test_one_image.py:45) ]]
[[fusion/fusion_model/layer5/Tanh/_5]]
(1) Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
[[node fusion/fusion_model/layer1/Conv2D (defined at E:/PMGI/test_one_image.py:45) ]]
0 successful operations.
0 derived errors ignored.
Errors may have originated from an input operation.
Input Source operations connected to node fusion/fusion_model/layer1/Conv2D:
fusion_model/layer1/w1/read (defined at E:/PMGI/test_one_image.py:43)
input/concat (defined at E:/PMGI/test_one_image.py:182)
Input Source operations connected to node fusion/fusion_model/layer1/Conv2D:
fusion_model/layer1/w1/read (defined at E:/PMGI/test_one_image.py:43)
input/concat (defined at E:/PMGI/test_one_image.py:182)
Original stack trace for 'fusion/fusion_model/layer1/Conv2D':
File "E:/PMGI/test_one_image.py", line 186, in
fusion_image=fusion_model(input_image_ir,input_image_vi)
File "E:/PMGI/test_one_image.py", line 45, in fusion_model
conv1_ir= tf.contrib.layers.batch_norm(tf.nn.conv2d(img_ir, weights, strides=[1,1,1,1], padding='SAME') + bias, decay=0.9, updates_collections=None, epsilon=1e-5, scale=True)
File "F:\StudyTools\Anaconda\envs\U2F\lib\site-packages\tensorflow\python\ops\nn_ops.py", line 1953, in conv2d
name=name)
File "F:\StudyTools\Anaconda\envs\U2F\lib\site-packages\tensorflow\python\ops\gen_nn_ops.py", line 1161, in conv2d
data_format=data_format, dilations=dilations, name=name)
File "F:\StudyTools\Anaconda\envs\U2F\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 788, in _apply_op_helper
op_def=op_def)
File "F:\StudyTools\Anaconda\envs\U2F\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "F:\StudyTools\Anaconda\envs\U2F\lib\site-packages\tensorflow\python\framework\ops.py", line 3616, in create_op
op_def=op_def)
File "F:\StudyTools\Anaconda\envs\U2F\lib\site-packages\tensorflow\python\framework\ops.py", line 2005, in init
self._traceback = tf_stack.extract_stack()

UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 1378-1379: invalid continuation byte
how to solve this error?thankyou


Implementation for download and upload limits

Hi,
Will be nice if gdrive has the bandwidth limits. The google app already have this feature, see https://support.google.com/drive/answer/2375083?hl=en&ref_topic=6069785 and https://productforums.google.com/forum/#!topic/drive/SUJe8y0oryA
Best regards,
Cleverton

For those that want a workaround to this. On the Linux I'm using throttle and the stdin upload and it works like a charm.
Throttle man : https://linux.die.net/man/1/throttle
and the source : ftp://ftp.fi.freebsd.org/pub/FreeBSD/ports/distfiles/throttle-1.2.tar.gz

This would be great. Unfortunately, @chentz78 suggestion doesn't work for me because I need to download stuff...


Add 'discuss on hacker news' button to the end of each blog post

Release Playbook

[ ] Rebase against master
[ ] Code review
[ ] Merge into master
[ ] Verify changes at http://site-staging.convox.com
[ ] Promote release on site-production in the convox/production Rack

 Add "discuss on HackerNews" button to blog posts

Hm it doesn't look great in staging. Will check this later tonight or tomorrow.

It looks ok now shrug


THEEDGE-2923 - Table pagination doesn't work on system update page

Description
This PR is fixing pagination for the Update in page view. Additionally, it is removing file /UpdateVersionTable.js and merging it into UpdateSystem.js
Fixes # (issue)
THEEDGE-2923
Affected files:
modified:   src/Routes/Devices/UpdateSystem.js
deleted:    src/Routes/Devices/UpdateVersionTable.js
modified:   src/api/devices/index.js

Type of change
What is it?

[X] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[X] Documentation update
[X] Tests update

Checklist:

[X] I have commented my code, particularly in hard-to-understand areas
[X] I have made corresponding changes to the documentation
[X] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes
[X] I run npm run lint:js:fix to check that my code is properly formatted

@tpapaioa i made a mess lol can you take a look again?


app/assets/images/c-a-b.svg is incorrect

During today's EKS training I noticed that app/assets/images/c-a-b.svg is actually showing the same as app/assets/images/c-b-a.svg
but should be more similar to app/assets/images/a-a-b.svg and app/assets/images/b-a-b.svg with c as front-end.

Oops, this was meant to be for https://github.com/brentley/ecsdemo-frontend/


R Function for pulling all data from h5

Hello,
Thanks again for your great work! A feature that I was looking for when using riboviz was an R function to load all of the reads in an h5 file into a dataframe. In particular, I wanted to trim reads from the beginning and end of the ORF because there was a buildup of ribosomes at the start codon that I thought were not actively translating. I also wanted to look at read length distribution at particular codons etc. I wrote my own function for doing this, but it took me a while (mostly learning how to interact with the h5 file), and it seems like something that might be broadly useful to other users.
Best,
Jared

We have added a number of functions to get specific data items out of the h5 file, in the rscripts/read_count_functions.R file:

GetGeneDatamatrix
GetGeneReadLength
GetGeneDatamatrix5start
GetGeneDatamatrix3end
TidyDatamatrix - turn those data matrices into tidy data frames.

These functions still need tests and documentation.
@jabard89 , do these functions address your needs, or do we need to add something?
Related to #61, as the script bam_to_h5.R gets data in to the h5 file, so that could be attacked simultaneously with functions to get data out of it.

Closing as resolved; writing documentation for these functions is part of #153.
Thank you @jabard89 for your help!


Distinguish POI and StopPoint

As a PO OJP, I want to be able to distinguish the responses in the LIR by an icon, either the response is a POI or a StopPOint

The LIR works as designed for POI:

LIR checks whether input matches a stop.
As long as the input matches a stop, the stop is (exclusively) displayed.
Only if the input no longer finds a stop, the POI are also searched.

So the POI "Schweizerisches Landesmuseum" is found in the LIR as soon as we send the resquest with "Schweizerisches Lan".


Add Hindi translation

Add Hindi translation to Localizable.strings, Main.strings. and InternetAccessPolicy.strings

Great, you're welcome


Bulk Data Service - java.lang.OutOfMemoryError: Java heap space

Description:
Running ballerina locally I am consuming another local endpoint that returns 63MB of data and this throws the follow error instantly:
java.lang.OutOfMemoryError: Java heap space

Ballerina code:
// A system package containing protocol access constructs
// Package objects referenced with 'http:' in code
import ballerina/http;
import ballerina/jdbc;
import ballerina/sql;
import ballerina/io;
import ballerina/log;
import ballerina/config;
import ballerinax/kubernetes;
import ballerinax/docker;
import ballerina/swagger;

// Move the mssql jdbc driver to BALLERINA_HOME/bre/lib
endpoint jdbc:Client simsDB {
    url: config:getAsString("conn.host"),
    username: config:getAsString("conn.user"),
    password: config:getAsString("conn.pass"),
    poolOptions: {
        maximumPoolSize: config:getAsInt("conn.maximumPoolSize")
     }
};

// Elasticsearch endpoint
endpoint http:Client elastic {
    url: config:getAsString("es.endpoint"),
    timeoutMillis: 180000
};

documentation {
    SIMS `Building` object consists of:
    F{{recordID}}
    F{{building_Number}}
    F{{formal_Name}}
    F{{name}}
    F{{building_Abbr}}
    F{{scheduling_Abbr}}
    F{{address}}
    F{{city}}
    F{{state}}
    F{{zip}}
    F{{county}}
    F{{gross_Area}}
    F{{floors_Above_Ground}}
    F{{floor_Below_Ground}}
    F{{investment_Cost}}
    F{{replacement_Cost}}
    F{{owner_Name}}
    F{{region}}
    F{{zone}}
    F{{district}}
    F{{Construction_Year}}
    F{{renovation_Year}}
    F{{acquisition_Year}}
    F{{frame}}
    F{{facade}}
    F{{physical_Code}}
    F{{functional_Code}}
    F{{maintenance_Provide}}
    F{{institutional_Type}}
    F{{framework_District}}
    F{{pOM_Custodial}}
    F{{pOM_Maintenance}}
    F{{pOM_Utility}}
    F{{campus}}
    F{{type_}}
    F{{status}}
    F{{propertyID}}
    F{{drawing_Type}}
    F{{longitude}}
    F{{latitude}}

}
type Building record {
    string recordID;
    string building_Number;
    string formal_Name;
    string name;
    string building_Abbr;
    string scheduling_Abbr;
    string address;
    string city;
    string state;
    string zip;
    string county;
    string gross_Area;
    string floors_Above_Ground;
    string floor_Below_Ground;
    string investment_Cost;
    string replacement_Cost;
    string owner_Name;
    string region;
    string zone;
    string district;
    string Construction_Year;
    string renovation_Year;
    string acquisition_Year;
    string frame;
    string facade;
    string physical_Code;
    string functional_Code;
    string maintenance_Provide;
    string institutional_Type;
    string framework_District;
    string pOM_Custodial;
    string pOM_Maintenance;
    string pOM_Utility;
    string campus;
    string type_;
    string status;
    string propertyID;
    string drawing_Type;
    string longitude;
    string latitude;
    string altitude;
};

type Floor record {
    string recordID;
    string name;
    string sort_order;
    string comment;
    string gross_area;
    string _type;
    string campus;
    string building;
};

type Room record {
    string recordID;
    string building;
    string floor;
    string room_number;
    string campus;
    string department;
    string organization;
    string _function;
    string room_Type;
    string sub_room_type;
    string comment;
    string capacity;
    string area;
    string space_ID;
    string _type;
    string POM_custodial;
    string POM_maintenance;
    string POM_utility;
    string assignment_number;
    string effective_date;
    string earning_operation;
};

type Asset record {
    string capacity;
    string headcount;
    string area;
    string vacant;
    string wet_lab;
    string ADA;
    string primary_use;
    string alternate_use;
    string function_category;
    string function_not_used;
    string discipline;
    string space;
    string asset;
    string vendor;
    string manufacturer;
    string model_number;
    string serial_number;
    string location;
    string license;
    string warranty_expiration;
    string warranty_date;
    string install_date;
    string install_cost;
    string reserve_for_replacement;
    string replacement_date;
    string replacement_cost;
    string disposal_date;
    string life_cycle;
    string entity_handle;
    string occupant;
    string asset_ID;
    string asset_class;
    string asset_category;
    string asset_sub_class;
    string asset_name;
    string comment;
    string fixed_asset;
    string phone;
    string picture;
    string campus;
    string building;
    string floor;
    string schedulable;
    string tag;
    string preview;
    string active;
    string drawing;
    string display44;
    string fld_parentID;
    string propertyID;
    string recordDialogID;
    string recordID;
    string spaceID;
};

documentation {
   A service endpoint represents a listener.
}

@kubernetes:Ingress {
    hostname:"someingress.here",
    name:"bal-sims-svc",
    path:"/sims"
}

@kubernetes:Service {
    name:"bal-sims-svc"
}

@kubernetes:Deployment {

    image: "somerepo:5000/jimk/simsbal/sims:v1.0",
    name:"bal-sims-svc",
    replicas: 2,
    // Need to build new ballerinax/kubernetes or switch to nightly
    // imagePullSecrets: ["regsecret"],
    enableLiveness: true,
    copyFiles:[
        {
            target:"/ballerina/runtime/bre/lib",
            source:"./conf/mssql-jdbc-6.4.0.jre8.jar"
        }
    ]
}
@swagger:ClientEndpoint
endpoint http:Listener listener {
    port:9090
};

documentation {
   A service is a network-accessible API
   Advertised on '/sims', port comes from listener endpoint
}

@kubernetes:ConfigMap {
    ballerinaConf:"./conf/sims.toml"
}
// @kubernetes:Secret{
//     secrets: [
//         {
//             name: "bal-sims-db-pass",
//             mountPath: ""
//         }
//     ]
// }
@swagger:ClientConfig {
    generate: true
}
service<http:Service> sims bind listener {
    @swagger:ResourceInfo {
        tags: ["sims", "buildings", "all", "bulk"],
        summary: "Get all SIMS buildings",
        description: "The buildings resource is a bulk call that retireves all buildings in the SIMS system. This should be used sparingly."
    }
    @http:ResourceConfig {
        methods: ["GET"],
        path: "/buildings/",
        produces: ["application/json"]
    }
    documentation {
        ### Get all buildings
        A resource is an invokable API method
        Accessible at '/sims/buildings'
    }
    getAllBuildings (endpoint caller, http:Request request) {
        var selectRet = simsDB->select("SELECT * FROM SIMS.dbo.tbl_SIMS_Building", Building);
        table<Building> dt;

        match selectRet {
        table tableReturned => dt = tableReturned;
        error e => log:printError("Select data from tbl_SIMS_Building failed: "
                               + e.message);
        }

        http:Response response = new;

        var jsonConversionRet = <json>dt;
        match jsonConversionRet {
            json jsonRes => {
                log:printTrace(io:sprintf("%s", jsonRes));

                // Untainting return as this resource takes no user input
                response.setJsonPayload(untaint jsonRes, contentType = "application/json");
                _ = caller -> respond(response);

            }
            error e => {
                json errResponse = {
                    "status" : "Connection Error",
                    "error": "500 - Internal Server Error"
                };
                response.statusCode = 500;
                response.setJsonPayload(untaint errResponse, contentType = "application/json");
                _ = caller -> respond(response);
                log:printError(e.message);
            }
        }
     }

    // @swagger:ResourceInfo {
    //     tags: ["sims", "buildings", "building", "singular"],
    //     summary: "Get all SIMS buildings",
    //     description: "The buildings resource is a bulk call that retireves all buildings in the SIMS system. This should be used sparingly."
    // }

    @http:ResourceConfig {
        methods: ["GET"],
        path: "/buildings/{buildID}",
        produces: ["application/json"]
    }

    documentation {
        ### Get specific building by building ID
        A resource is an invokable API method
        Accessible at '/sims/building/buildID'
    }
    getBuilding (endpoint caller, http:Request request, string buildID) {

        http:Response response = new;

        // Validate input is an integer
        if(isInteger(buildID)){
            sql:Parameter _buildID = {sqlType:sql:TYPE_VARCHAR, value:sanitizeInt(buildID)};

            var selectRet = simsDB->select("SELECT * FROM SIMS.dbo.tbl_SIMS_Building where building_Number=?", Building, _buildID);
            table<Building> dt;

            match selectRet {
            table tableReturned => dt = tableReturned;
            error e => log:printError("Select data from tbl_SIMS_Building failed: "
                                + e.message);
            }

            var jsonConversionRet = <json>dt;
            match jsonConversionRet {
                json jsonRes => {
                    log:printTrace(io:sprintf("%s", jsonRes));

                    // Untainting return as this resource takes no user input
                    response.setJsonPayload(untaint jsonRes, contentType = "application/json");
                    _ = caller -> respond(response);

                }
                error e => {
                    json errResponse = {
                        "status" : "Connection Error",
                        "error": "500 - Internal Server Error"
                    };
                    response.statusCode = 500;
                    response.setJsonPayload(untaint errResponse, contentType = "application/json");
                    _ = caller -> respond(response);
                    log:printError(e.message);
                }
            }
        }
        else {
            json json400 = {
                "status": "Invalid building ID",
                "error": "400 - Bad Request"
            };
            response.statusCode = 400;
            response.setJsonPayload(json400, contentType = "application/json");
            _ = caller -> respond(response);
            log:printInfo(json400.toString());
        }

    }
    @http:ResourceConfig {
        methods: ["GET"],
        path: "/buildings/{buildID}/floors",
        produces: ["application/json"]
    }
    documentation {
        ### Get floors for a specific building ID
        A resource is an invokable API method
        Accessible at '/sims/building/buildID/floor'
    }
    getFloorsByBuilding (endpoint caller, http:Request request, string buildID) {

        http:Response response = new;

        // Validate input is an integer
        if(isInteger(buildID)){
            sql:Parameter _buildID = {sqlType:sql:TYPE_VARCHAR, value:sanitizeInt(buildID)};

            var selectRet = simsDB->select("select * from tbl_SIMS_Floor where building = (select [name] from tbl_SIMS_Building where Building_Number = ? )", Floor, _buildID);
            table<Floor> dt;

            match selectRet {
            table tableReturned => dt = tableReturned;
            error e => log:printError("Select data from tbl_SIMS_Floor failed: "
                                + e.message);
            }

            var jsonConversionRet = <json>dt;
            match jsonConversionRet {
                json jsonRes => {
                    log:printTrace(io:sprintf("%s", jsonRes));

                    // Untainting return as this resource takes no user input
                    response.setJsonPayload(untaint jsonRes, contentType = "application/json");
                    _ = caller -> respond(response);

                }
                error e => {
                    json errResponse = {
                        "status" : "Connection Error",
                        "error": "500 - Internal Server Error"
                    };
                    response.statusCode = 500;
                    response.setJsonPayload(untaint errResponse, contentType = "application/json");
                    _ = caller -> respond(response);
                    log:printError(e.message);
                }
            }
        }
        else {
            json json400 = {
                "status": "Invalid building ID",
                "error": "400 - Bad Request"
            };
            response.statusCode = 400;
            response.setJsonPayload(json400, contentType = "application/json");
            _ = caller -> respond(response);
            log:printInfo(json400.toString());
        }
    }
    @http:ResourceConfig {
        methods: ["GET"],
        path: "/buildings/{buildID}/rooms",
        produces: ["application/json"]
    }
    documentation {
        ### Get rooms for a specific building ID
        A resource is an invokable API method
        Accessible at '/sims/building/buildID/rooms'
    }
    getRoomsByBuilding (endpoint caller, http:Request request, string buildID) {

        http:Response response = new;

        // Validate input is an integer
        if(isInteger(buildID)){
            sql:Parameter _buildID = {sqlType:sql:TYPE_VARCHAR, value:sanitizeInt(buildID)};

            var selectRet = simsDB->select("select * from tbl_SIMS_Room where building = (select [name] from tbl_SIMS_Building where Building_Number = ? )", Room, _buildID);
            table<Room> dt;

            match selectRet {
            table tableReturned => dt = tableReturned;
            error e => log:printError("Select data from tbl_SIMS_Room failed: "
                                + e.message);
            }

            var jsonConversionRet = <json>dt;
            match jsonConversionRet {
                json jsonRes => {
                    log:printTrace(io:sprintf("%s", jsonRes));

                    // Untainting return as this resource takes no user input
                    response.setJsonPayload(untaint jsonRes, contentType = "application/json");
                    _ = caller -> respond(response);

                }
                error e => {
                    json errResponse = {
                        "status" : "Connection Error",
                        "error": "500 - Internal Server Error"
                    };
                    response.statusCode = 500;
                    response.setJsonPayload(untaint errResponse, contentType = "application/json");
                    _ = caller -> respond(response);
                    log:printError(e.message);
                }
            }
        }
        else {
            json json400 = {
                "status": "Invalid building ID",
                "error": "400 - Bad Request"
            };
            response.statusCode = 400;
            response.setJsonPayload(json400, contentType = "application/json");
            _ = caller -> respond(response);
            log:printInfo(json400.toString());
            log:printInfo(request.rawPath);
        }
    }
    @http:ResourceConfig {
        methods: ["GET"],
        path: "/rooms",
        produces: ["application/json"]
    }
    documentation {
        ### Get rooms for a specific building ID
        A resource is an invokable API method
        Accessible at '/sims/rooms'
    }
    getAllRooms (endpoint caller, http:Request request) {

        http:Response response = new;

        // Validate input is an integer

        // /sims/rooms/_search?filter_path=hits.hits.*
        // tune es instance max query size to 200k
        var elasticResp = elastic->get("/sims/rooms/_search?filter_path=hits.hits.*&size=120000");

        match elasticResp {
            http:Response  resp => {
                var msg = resp.getJsonPayload();
                io:println("Status Code: ",resp.statusCode);
                io:println(resp);
                match msg {
                    json jsonPayload => {
                        io:println(jsonPayload);
                        // untaint jsonPayload - from trusted ES
                        response.setPayload(untaint jsonPayload);
                        // response.setJsonPayload(untaint jsonPayload, contentType = "application/json");
                        _ = caller -> respond(response);
                    }
                    error err => {
                        // Send safe response to consumer
                        json errResponse = {
                            "status" : "Connection Error",
                            "error": "500 - Internal Server Error"
                            };
                        response.statusCode = 500;
                        response.setJsonPayload(untaint errResponse, contentType = "application/json");
                        _ = caller -> respond(response);
                        // Log explicit error for observablity
                        log:printError(err.message);
                    }
                }

            }
            error err => {
                // Send safe response to consumer
                json errResponse = {
                    "status" : "Connection Error",
                    "error": "500 - Internal Server Error"
                    };
                response.statusCode = 500;
                response.setJsonPayload(untaint errResponse, contentType = "application/json");
                _ = caller -> respond(response);
                // Log explicit error for observablity
                log:printError(err.message);
            }
        }

    }
    @http:ResourceConfig {
        methods: ["GET"],
        path: "/assets",
        produces: ["application/json"]
    }
    documentation {
        ### Get rooms for a specific building ID
        A resource is an invokable API method
        Accessible at '/sims/assets'
    }
    getAllAssets (endpoint caller, http:Request request) {

        http:Response response = new;

        // Validate input is an integer

        // localhost:9200/sims/rooms/_search?filter_path=hits.hits.*
        // tune es instance max query size to 200k
        var selectRet = simsDB->select("select * from tbl_SIMS_Asset", Asset);
        table<Asset> dt;

        match selectRet {
        table tableReturned => dt = tableReturned;
        error e => log:printError("Select data from tbl_SIMS_Room failed: "
                            + e.message);
        }

        var jsonConversionRet = <json>dt;
        match jsonConversionRet {
            json jsonRes => {
                log:printTrace(io:sprintf("%s", jsonRes));

                // Untainting return as this resource takes no user input
                response.setJsonPayload(untaint jsonRes, contentType = "application/json");
                _ = caller -> respond(response);

            }
            error e => {
                json errResponse = {
                    "status" : "Connection Error",
                    "error": "500 - Internal Server Error"
                };
                response.statusCode = 500;
                response.setJsonPayload(untaint errResponse, contentType = "application/json");
                _ = caller -> respond(response);
                log:printError(e.message);
            }
        }

    }

}

function sanitizeInt(string input) returns @untainted string {
    string regEx = "[^\\d+$]";
    return input.replace(regEx, "");
}

function isInteger(string input) returns boolean {
    string regEx = "\\d+";
    boolean isInt = check input.matches(regEx);
    return isInt;
}

Steps to reproduce:
Affected Versions:
Ballerina 0.980.1
OS, DB, other environment details and versions:
Darwin
Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

Thanks for reporting the issue. I noticed that there is a dataTable to JSON conversion inside the resource. There was a known issue https://github.com/ballerina-platform/ballerina-lang/issues/9619 in v0.980.1, which causes datatable to JSON conversion to go OOM, if the size of data coming from the DB is very large.
This issue is fixed in the master branch. Is there any possibility for you to try the same scenario with a latest nightly-build (v0.980.2-SNAPSHOT) of ballerina distribution?
Note that, any JSON read from a datatable works in a streaming manner. So simply converting the dt to JSON and directly sending it back as the response, will not load the anything to memory. However, if we do any modification/printing json (in your case log:printTrace(io:sprintf("%s", jsonRes));), then the entire data will be loaded in to memory. So you need to remove that line of code for the streaming to work properly.

@SupunS I just locally tested with no code changes using the  Ballerina 0.980.2-SNAPSHOT nightly and it still threw java.lang.OutOfMemoryError: Java heap space.
The resource that I'm calling on this one is using an http endpoint. In the code its getAllRooms.
Should I switch gears on this and try using io:ByteChannel as in the HTTP Streaming by-example?

I'm currently trying to use stream<record> but hitting some hurdles mapping to the refined elasticsearch response:
{
    "hits": {
        "hits": [
            {
                "_index": "sims",
                "_type": "rooms",
                "_id": "sUkE3WQBgbOD3_8hqY_X",
                "_score": 1.0,
                "_source": {
                    "building": "building",
                    "function": "som func",
                    "earning_operation": "false",
                    "capacity": "4.0",
                    "POM_utility": "false",
                    "floor": "02",
                    "recordID": "1234",
                    "space_ID": "1234",
                    "area": "373.33",
                    "room_number": "0651",
                    "comment": "None",
                    "room_Type": "9C-Apartment",
                    "effective_date": "None",
                    "assignment_number": "None",
                    "POM_maintenance": "false",
                    "department": "Some Department",
                    "organization": "Some Org",
                    "sub_room_type": "Bedroom within Suite",
                    "POM_custodial": "false",
                    "type": "None",
                    "campus": "This Campus"
                }
            }
        ]
    }
}

When we say var msg = resp.getJsonPayload(); it will load the entire payload in to memory. You can simply respond back to the client with the same payload without loading it to the memory like below:
var elasticResp = elastic->get("/sims/rooms/_search?filter_path=hits.hits.*&size=120000");

match elasticResp {
    http:Response  resp => {
        _ = caller -> respond(resp);
    }
    error err => {
            // handle error
    }
}

Here we simply passthrough the response from the endpoint back to the client, without really touching it.
On a side note, seems like loading the JSON to memory eats up too much memory than it suppose to. We are further investigating this.

@SupunS The passthrough works great. From a consumer perspective we'll still need to do something to filter out all the elasticsearch metadata so excited to hear about the outcome of handling large JSON in memory.
In regards to the SQL streaming comment you made, using the nightly Ballerina 0.980.2-SNAPSHOT and commenting out the trace statement the response to the call is :
[]

@jimk-osu We are checking on the empty payload receiving issue.

@jimk-osu We have fixed the issue #9870. This will be available in the next release. Thanks for catching that!
With respect to the JSON object model, we have created a separate issue https://github.com/ballerina-platform/ballerina-lang/issues/9849 to track this. As of now, we are considering that as a possible improvement to the existing model. So even with that improvement, it will consume a considerable amount of memory if you try to load the entire JSON to memory and do filtering on top of it.

I am closing the issue, since the issue in streaming from DB is fixed with #9870.


Fix CLI admin domain bug that didn't load Cassandra plugin

What changed?
Add loading Cassandra plugin for the binary

Why?
A bug introduced from https://github.com/uber/cadence/pull/4311

How did you test it?

Potential risks

Release notes

Documentation Changes

Pull Request Test Coverage Report for Build 9d006eb4-085d-46ec-85f1-7a23d9f50696

0 of 0   changed or added relevant lines in 0 files are covered.
68 unchanged lines in 7 files lost coverage.
Overall coverage increased (+0.02%) to 56.772%

Files with Coverage Reduction
New Missed Lines
%

common/task/fifoTaskScheduler.go
2
82.47%

common/task/weightedRoundRobinTaskScheduler.go
2
89.12%

service/matching/taskListManager.go
2
74.09%

common/cache/lru.go
3
90.73%

common/persistence/nosql/nosqlplugin/cassandra/workflow.go
6
49.32%

common/persistence/nosql/nosqlplugin/cassandra/workflowUtils.go
20
75.24%

common/persistence/nosql/nosqlplugin/cassandra/workflowParsingUtils.go
33
75.97%

Totals

Change from base Build f398ed9f-4c3b-478d-9f9b-207c3ef9ebec:
0.02%

Covered Lines:
77846

Relevant Lines:
137120

💛  - Coveralls


Source local terraform files.

Terraform v0.12.24
terragrunt version v0.23.14

In some cases, we would like to use data_source.
For that was implemented this structure
.
├── cluster
│   └── terragrunt.hcl
├── data
│   ├── data.tf
│   └── terragrunt.hcl
├── firewalls
│   └── terragrunt.hcl
├── ips
│   ├── data.tf
│   └── terragrunt.hcl
├── kms
│   └── terragrunt.hcl
├── nat
│   └── terragrunt.hcl
└── subnets
    └── terragrunt.hcl

Where we have data folder with
data.tf that has:
variable "project_id" {
  type = string
}
data "google_project" "project" {
  project_id = var.project_id
}

output "project_number" {
  value = data.google_project.project.number
}

terragrunt.hcl that has:
terraform {
  source = "./"
}

# Include all settings from the root terragrunt.hcl file
include {
  path = find_in_parent_folders()
}
inputs = {}

Now we try to use the outputs from data folder like so
terraform {
  source = "git@github.com:terraform-google-modules/terraform-google-kubernetes-engine.git//modules/beta-private-cluster?ref=v8.1.0"
}

dependency "subnets" {
  config_path = "../subnets"
}
dependency "kms_key" {
  config_path = "../kms"
}
dependency "data" {
  config_path = "../data"
}

dependencies {
  paths = ["../subnets", "../kms", "../data"]
}

All this works while we run it such as terragrunt plan
If we would like to test a local module like so
terragrunt plan  --terragrunt-source "$TF_MODULES_PATH/terraform-google-kubernetes-engine//modules/beta-private-cluster"

I got an error
[terragrunt] [gke/subnets] 2020/05/22 14:57:54 Copying files from gke/subnets into /gke/subnets/.terragrunt-cache/XNuYzS1soLSZZEiouXjaCk7IReM/9XEm-aaMM4kcrssbEgiLlQVYJvY/modules/subnets
[terragrunt] [gke/subnets] 2020/05/22 14:57:54 Setting working directory to /gke/subnets/.terragrunt-cache/XNuYzS1soLSZZEiouXjaCk7IReM/9XEm-aaMM4kcrssbEgiLlQVYJvY/modules/subnets
[terragrunt] 2020/05/22 14:57:54 Unable to obtain the module path from the source URL './'. Ensure that the URL is in a supported format.
[terragrunt] 2020/05/22 14:57:54 Unable to determine underlying exit code, so Terragrunt will exit with error code 1

It seems that it doesn't like the source path in data/terragrunt.hcl which is source = "./"
Not sure if that happened after the upgrade to the latest terragrunt version(v0.23.18) or it never worked with the  --terragrunt-source
I guess, my question would be is this by design or a bug?

In the terragrunt.hcl in your data folder, you don't need this at all:
terraform {
  source = "./"
}

The default is to assume the Terraform code is in the same folder, so just remove that block, and I think things will work.

FYI this will still fail even after the "./" fix if the module repo of the dependency blocks and gke modules are different, because you can't override the local state for just one of the modules. We need to implement https://github.com/gruntwork-io/terragrunt/issues/1138 to handle that scenario.

I have removed that part from the terragrunt.hcl in the data folder
Now I have a different error.
terragrunt plan --terragrunt-source /git/terraform-modules/terraform-google-kubernetes-engine//modules/beta-private-cluster

[terragrunt] [/gke/data] 2020/05/23 10:39:40 Running command: terraform output -json
[terragrunt] 2020/05/23 10:39:41 Did not find any Terraform files (*.tf) in /gke/kms/.terragrunt-cache/v86ibmgQV_n58E7UWKa-Pn4cH84/9XEm-aaMM4kcrssbEgiLlQVYJvY/terraform-google-kms
[terragrunt] 2020/05/23 10:39:41 Unable to determine underlying exit code, so Terragrunt will exit with error code 1

Is this could be related that I have dependencies?
dependency "subnets" {
  config_path = "../subnets"
}
dependency "kms_key" {
  config_path = "../kms"
}
dependency "data" {
  config_path = "../data"
}

dependencies {
  paths = ["../subnets", "../kms", "../data"]
}

and the run with --terragrunt-source ignores their remote sources and tries to source them locally?

the run with --terragrunt-source ignores their remote sources and tries to source them locally?

Yes that is the issue, and unfortunately we don't currently have a workaround for this using CLI args until we implement --terragrunt-source-map.
To make this work, you have to actually switch the source in the terragrunt.hcl config to the local version temporarily...


Added stash_request function

Description
This function allows handlers to implement stuff like this
    content = {
      'path' => "maintenance/#{@event['client']['name']}",
      'content' => {
        'reason' => "Maintenance requested by #{@event['check']['user']}",
        'source' => 'cli'
      },
      'expire' => @event['check']['expire'].to_i
    }
    response = stash_request(:POST, "/stashes", content.to_json.to_s).code

Motivation and Context
The normal api_request function does not allow post data.
How Has This Been Tested?
This function is used in an internal maintenance handler.
Types of changes

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

Checklist:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have updated the Changelog following the conventions laid out on Keep A Changelog

Known Caveats

Thanks for the PR @runningman84, I've made a few comments on the proposed changes.

closing due to inactivity, please comment back if you intend to make the changes and I will re-open.


"TypeError: Cannot read property 'then' of undefined" when mocking async function with Jest

Describe the bug
I have the following interface in TypeScript:
interface Something {
  getValueAsync: () => Promise<number>
}

I'm trying to create a mock instance with Jest:
const mock : Something = {
  getValueAsync: jest.fn().mockResolvedValue(123),
};

When running the tests, the tested component that receives the mock fails with:
TypeError: Cannot read property 'then' of undefined

   7 |
   8 |   useEffect(() => {
>  9 |     if (something) something.getValueAsync().then(setValue);
     |                    ^
  10 |   }, [something]);

Note that the instance of something is retrieved via the context, if ever that's relevant
Did you try recovering your dependencies?
I created a fresh app to reproduce the issue.
Which terms did you search for in User Guide?
I searched for Jest TypeError: Cannot read property 'then' of undefined
Environment
> npx create-react-app --info
npx: installed 67 in 5.771s

Environment Info:

  current version of create-react-app: 4.0.3
  running from C:\Users\guill\AppData\Roaming\npm-cache\_npx\6932\node_modules\create-react-app

  System:
    OS: Windows 10 10.0.19042
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  Binaries:
    Node: 14.15.4 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.10 - C:\Program Files\nodejs\yarn.CMD
    npm: 6.14.10 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 91.0.4472.77
    Edge: Spartan (44.19041.964.0), Chromium (90.0.818.66)
    Internet Explorer: 11.0.19041.1
  npmPackages:
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
    react-scripts: 4.0.3 => 4.0.3
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce
Follow the steps in bug description, or clone the repo at https://github.com/gfox1984/jest-async, then run the tests
Expected behavior
All tests to pass (the component should render the mocked value '123')
Actual behavior
The error reported in bug description occurs.
Reproducible demo
https://github.com/gfox1984/jest-async, then run the tests
Beware, I could only reproduce the issue when cloning the repo locally (the same repo on codesandbox works as expected: https://codesandbox.io/s/pensive-pine-m481d?file=/src/SomethingComponent.test.tsx)

Has there been any progress on this aspect ?

I ran into the same issue after migrating a codebase to Creact React App. The tests were running fine before updating our jest config. Thanks to https://github.com/facebook/jest/issues/9131#issuecomment-668790615, I was able to pin resetMocks: true as the problem.
Moving the mocks inside beforeEach blocks fixed it for us.
Before
describe('test description', () => {
    myMockedFunction = jest.fn(() => Promise.resolve());

    it('cannot read property "then" of undefined', () => {
        ...
    })

After
describe('test description', () => {

    beforeEach(() => {
        myMockedFunction = jest.fn(() => Promise.resolve());
    });

    it('should work', () => {
        ...
    })


mssql insert query - wrong value for boolean statement

hi,
when i create an insert statement for mssql that contains a boolean value - which for mssql is a bit - the resulting sql contains a boolean instead of a bit. example:
let tuple = {
active: true
};
knex('table').insert(tuple).toString();
// prints: insert into [table] ([active]) values (true)
// should print: insert into [table] ([active]) values (1)
sql-server error: Invalid column name 'true'.
sql-server version 2012
npm packages:
<EMAIL_ADDRESS><EMAIL_ADDRESS>

I have the same issue. You cannot use the keywords true and false for bit fields in T-SQL, but the string literals 'TRUE' and 'FALSE' work and will get translated to 1 and 0 respectively. Lowercase works too I think.

@fpattis why are you using .toString()? Queries are sent to driver as SQL string and array of bindings and driver will do the conversion from true/false -> 1/0 etc.
toString() method does variable interpolation on knex side, which is not very safe and might expose your app to SQL injection attacks etc. if you try to run those queries.

I can't speak for @fpattis but in my case I'm actually using knex as a supplement for a different database library (Sequelize) that doesn't have a sensible query builder. Since I'm also trying to avoid having to configure two connections because I'm lazy, I'm running knex-generated queries through Sequelize for a few specific and hacky usecases that I should really get rid of. Sequelize doesn't support bound parameters with MSSQL even though the underlying driver does, so I can't rely on that either.
 Nevertheless I would argue that .toString() should generate correct syntax for the dialect, to ease debugging if nothing else.
Relatedly I also noticed that .toString() doesn't prefix string literals with N either in MSSQL, which results in Unicode strings not working properly (in MSSQL you need to write Unicode string literals like N'我来自北京').

@kblomster I actually hope that I can somehow deprecate the whole method and provide another .nativeSql attribute or getter to result of .toSQL() which can be given directly to DB driver (currently .sql string uses ? for bindings, which are not native binding chars for all of the databases).
That being said you are right, that currently it would be desired for .toString() to return valid and safe SQL. Which means that knex should implement value replacement code properly (not an easy task to make sure that it works perfectly).

hi, sry for the delayed answer.I was using the toString() method in order to add some MSSQL specific expressions. I had to addSET IDENTITY_INSERT dbo.users ON;
in front of the insert statements and; SET IDENTITY_INSERT dbo.users OFFafterwards in order to be able to seed some records where I wanted to provide the ID.
Am Montag, 18. September 2017, 12:46:53 MESZ hat Mikael Lepistö<EMAIL_ADDRESS>Folgendes geschrieben:
@kblomster I actually hope that I can somehow deprecate the whole method and provide another .nativeSql attribute or getter to result of .toSQL() which can be given directly to DB driver (currently .sql string uses ? for bindings, which are not native binding chars for all of the databases).
That being said you are right, that currently it would be desired for .toString() to return valid and safe SQL. Which means that knex should implement value replacement code properly (not an easy task to make sure that it works perfectly).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

.toNative() is now available in 0.14.1


Feed name on adding new feed

Instead of showing Name (optional), the app should rather fetch the feed name and allow user to edit it.

Adding a vote for this issue. I had this same thought when I was adding several feeds today.

The problem is that it needs to actually find the feed before it can fetch its name — and it doesn’t look for the feed until you click the button.

Makes sense. Is there a way that the Safari extension (which is how I was adding feeds) could send the title of the page when it triggers the feed URI to NetNewsWire ?

asked about this in Slack. @danielpunkass explained there wasn't an option at the time to grab the <title> from the URL but might be something that is doable now.

Gruber made good point that the <title> might be the post/page title so should grab from the the feed enclosure.


Added tvOS as a supported platform.

This pull request doesn't bring in any new features in support of tvOS, only the ability to use the existing functionality of QGrid, which seems to work just fine in tvOS as it does in iOS.
I've done some basic testing with loading and displaying several columns of data on screen, navigating the grid, and selecting cells in tvOS. All of which is working fine.

Cool! Thanks for contributing.


Static body linear_velocity as surface tangent speed

In Godot you can set a linear velocity on static bodies so that they behave like conveyor belts.
This is probably the best way to implement it:
http://www.iforce2d.net/b2dtut/conveyor-belts

heh, I'm confused about this

heh, I'm confused about this

linear velocity on static bodies?

linear velocity on static bodies?

linear velocity on static bodies?

linear velocity on static bodies?

Yeah, it doesn't move it but it changes collision behavior: https://docs.godotengine.org/en/latest/classes/class_staticbody2d.html#class-staticbody2d-property-constant-linear-velocity

Yeah, it doesn't move it but it changes collision behavior: https://docs.godotengine.org/en/latest/classes/class_staticbody2d.html#class-staticbody2d-property-constant-linear-velocity

Oh weird, ya, I guess godot doesn't expose any solver interaction, because this is trivial to do in pre-solve.

Oh weird, ya, I guess godot doesn't expose any solver interaction, because this is trivial to do in pre-solve.


Amend to print output file name and deal with format option error

Description

Adopt change of FOSSLight Util to print output file name.
Fix to handle wrongly inputted format and output option.

Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Documentation update
[x] Refactoring, Maintenance
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

It will be merged after FOSSLight Util v1.3.12 distribution.


Policy does not compile

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
When trying to run make policy.wasm, the compiler just throws a bunch of errors.
Expected Behavior
make policy.wasm returns a WebAssembly file.
Steps To Reproduce

Install rustup, cargo, cargo-generate, wasm32-wasi target
Create a new repository from this template
Run make policy.wasm

Environment
- OS: macOS Ventura
- Architecture: amd64

Anything else?
No response

I ran cargo generate -g https://github.com/kubewarden/rust-policy-template.git in a normal folder (and on my desktop) to confirm this behavior.
I filled out the metadata, just as cargo generate prompted me to.
I don't think the issue lies in the fact that this is a template (shouldn't an empty project still compile without error?), but rather the fact that this might not be entirely compatible with macOS.
When trying to run make policy.wasm just now, I got the following error:
$ make policy.wasm
sed: illegal option -- -
usage: sed script [-Ealnru] [-i extension] [file ...]
	sed [-Ealnu] [-i extension] [-e script] ... [-f script_file] ... [file ...]
cargo build --target=wasm32-wasi --release
   Compiling proc-macro2 v1.0.60
   Compiling num-traits v0.2.15
   Compiling num-integer v0.1.45
   Compiling num-bigint v0.4.3
   Compiling quote v1.0.28
   Compiling serde v1.0.164
   Compiling libc v0.2.146
   Compiling lock_api v0.4.10
   Compiling tinyvec_macros v0.1.1
   Compiling parking_lot_core v0.9.8
   Compiling num-rational v0.4.1
error[E0463]: can't find crate for `core`
  |
  = note: the `wasm32-wasi` target may not be installed
  = help: consider downloading the target with `rustup target add wasm32-wasi`

error[E0463]: can't find crate for `compiler_builtins`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `tinyvec_macros` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error[E0432]: unresolved imports `super::Send`, `super::Sync`, `ffi::c_void`
 --> /Users/phntxx/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.146/src/wasi.rs:1:13
  |
1 | use super::{Send, Sync};
  |             ^^^^  ^^^^
2 |
3 | pub use ffi::c_void;
  |         ^^^^^^^^^^^

Some errors have detailed explanations: E0432, E0463.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `libc` due to 3 previous errors
make: *** [policy.wasm] Error 101

Despite the fact that wasm32-wasi is installed and up-to-date:
$ rustup target add wasm32-wasi
info: component 'rust-std' for target 'wasm32-wasi' is up to date

The sed-error at the very beginning of the error message comes from this string in the Makefile:
VERSION := $(shell sed --posix -n 's,^version = \"\(.*\)\",\1,p' Cargo.toml)

Replacing this with VERSION = "0.1.0" yields no improvement.

Thank you very much for your help!
The issue was that I had both the rustup-init and rust packages installed at the same time.
Once I removed both, removed my ~/.cargo directory and reinstalled rust using rustup-init, the project compiles without a hitch.
Once again: thank you very much for assisting me in this layer 8 issue!

happy to help! Glad to hear it was an easy fix.
I will leave the card open, and look a the Macos compatibilities.
Feel free to ask any questions via issue or via slack!


Added pipeline run param tab

closes: https://github.com/opendatahub-io/odh-dashboard/issues/1245
Description

For a pipeline run, there is a new tab between the details and yaml that shows the global params for the pipeline

How Has This Been Tested?

create a pipeline that has global params and one that does not

global params can be added here
spec:
  params:
    - name: global-param-1
      value: some-value-1
    - name: global-param-2
      value: some-value-2

Create a run for the pipeline without params
go to run details -> Parameters tab
it should show an empty state
create a run for the pipeline with params
it should show the params on the tab

Test Impact

pipeline test issue: https://github.com/opendatahub-io/odh-dashboard/issues/1297

Request review criteria:

Self checklist (all need to be checked):

[x] The developer has manually tested the changes and verified that the changes work
[x] Commits have been squashed into descriptive, self-contained units of work (e.g. 'WIP' and 'Implements feedback' style messages have been removed)
[x] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
[x] The developer has added tests or explained why testing cannot be added (unit tests & storybook for related changes)

If you have UI changes:

[x] Included any necessary screenshots or gifs if it was a UI change.
[x] Included tags to the UX team if it was a UI/UX change (find relevant UX in the SMEs section).

After the PR is posted & before it merges:

[ ] The developer has tested their solution on a cluster by using the image produced by the PR to main

cc @yannnz

Is this parameter is for pipeline, not for run? If that's the case, would it be more appreciate to label the tab as Pipeline parameters?
cc: @Gkrumbach07 @andrewballantyne

Is this parameter is for pipeline, not for run? If that's the case, would it be more appreciate to label the tab as Pipeline parameters?

@yannnz So Pipelines are the definition for the Run. The Run is the active execution of the Pipeline. These parameters are values the Pipeline requests before you can make a Run of it; sometimes they have default values and thus you can continue with those values. This values are at the bottom of our Run form. They are called Input parameters there... perhaps we follow suit?

Functions as expected.
Note: Seems that there may be a bug in the underlying pipelines capability where pipeline parameters with default values that aren't overridden by the pipeline run spec don't show up in the pipeline creation form nor in here in this tab.

@manaswinidas Going off what is on the details tab (which doesnt have any headers) if we were to add headers, i would think we would do it for both right? what do you think @yannnz

@christianvogt default values should still show up bc they are set in the form

--->

This brings up a UX question @yannnz how should we display input params that dont have a value (should we include them or not, should we have a en empty placeholder?)

Updated tab name to Input parameters

Is this parameter is for pipeline, not for run? If that's the case, would it be more appreciate to label the tab as Pipeline parameters?

@yannnz So Pipelines are the definition for the Run. The Run is the active/completed execution of the Pipeline. These parameters are values the Pipeline requests before you can make a Run of it; sometimes they have default values and thus you can continue with those values. These "requests" are fields at the bottom of our Run form. They are called Input parameters there... perhaps we follow suit?

'Input parameters' is much easier to understand than 'parameters'.   We also have output parameters for run. "Parameters" doesn't tell if it is input or output, or maybe some other parameters if any.

@manaswinidas Going off what is on the details tab (which doesnt have any headers) if we were to add headers, i would think we would do it for both right? what do you think @yannnz

Yeap, I think Dash's suggestion is good. An alternative way is to use Bold font for the names. (See the screenshot below). In the right drawer, we also have tabs with similar layout. IMO, it would be good use Bold font for the names as a convention since we have many other places to change later.
When I looked at the Parameter tab, I was confused about the relationships between those info and their relationships. Under the Detail tab, it is easier to understand due to the terminologies of the names are easy to understand. But under the Parameter tab, it is hard to understand the first column represent Name and the second represent Value.
ODH right drawer:

An example from KBF pipeline:

@Gkrumbach07 Here's a pipeline run with a pipeline spec that has two parameters: username and greeting.suffix. But at pipeline run spec only overrides the username param. The dashboard UI only shows username in the wizard.
This PR also only shows username in the new tab.

PipelineRun spec
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  name: hello-run
spec:
  params:
  - name: username
    value: "tester"
  pipelineSpec:
    params:
    - name: username
      default: "world"
    - name: greeting.suffix
      default: "!"
    tasks:
      - name: hello
        params:
        - name: username
          value: "$(params.username)"
        - name: greeting.suffix
          value: "$(params.greeting.suffix)"
        - name: greeting
          value: "Hello $(params.username)$(params.greeting.suffix)"
        taskSpec:
          params:
          - name: username
            type: string
          - name: greeting.suffix
            type: string
          - name: greeting
            type: string
          steps:
            - name: greet
              image: quay.io/quay/ubuntu
              script: |
                #!/bin/bash
                echo "username: $(params.username)"
                echo "greeting.suffix: $(params.greeting.suffix)"
                echo "greeting: $(params.greeting)"

@christianvogt I see now. The global parameters are the only parameters that are being used as "input". so if you want them to show up in the form you need to add them to the global params.
spec:
  params:
  - name: username
    value: "tester"
  - name: greeting.suffix
    value: "!"
  pipelineSpec:
    params:
    - name: username
      default: "world"
    - name: greeting.suffix
      default: "!"

So i guess the question is. Do we want to show all params, or just the params that the user could have edited.

@Gkrumbach07 tbh i don't understand why pipieline definitions are defined from a pipeline run to begin with. Must be a kubeflowism. Anyways what I described is beyond the scope of this PR. If the data returned by the service doesn't include these values, then your PR is reflecting the available data appropriately.

Added bold to the var names

I'm still leaning towards having "Name" and "Values" in bold as two columns(maybe Table). Having a description list will make sense if we have a single name and value, but we have multiple parameters.

Is there a reason we don't use Patternfly Description list for these details items?

So this render key values function is used in multiple places and uses flex wrap=true so that longer keys are are not wrapped.

however when using description list there is no wrapping of the key value so it looks odd. it trys to keep it all on one line because it is a grid system.

So im guessing that is why Andrew went with using a flex system instead of the grid system used by Description List.
So this is up to UX @yannnz for what looks best. Should we switch to using the DescriptionList but as a side effect, we loose the wrapping effect for longer keys/labels, OR should we keep it as it is using the flex container.
And is there a consensus on what @manaswinidas is suggesting for the Key, value headers? I think we should just keep the bold but add an additional header, but that may be redundant because the tab already acts as a header in a way.

for completeness, this is what the name, value headers look like. This looks good but because it is not used anywhere else, it seems less cohesive.

@Gkrumbach07 Let's keep this PR focused on the Input parameters tab using the same components that are used elsewhere. We can log another issue and have a discussion there with UX about using the custom component or the PF description list. Besides, changing to a description list will affect many other areas. No need to hold up this work on that discussion.

We have many places using this style and I think some of them are not only one layer info with Name and Description, but with multiple sections and then Name and Description under the section. To be consistent, we will need to go through all tabs to find a better solution. So I agree with Christian.

@yannnz Feel free to create a Follow up issue to track this down, this might be worth to have logged as an enhancement in the near future.

@yannnz  @Gkrumbach07 The input parameters in the sidebar on node selection is inconsistent without the bold names:

The input parameters in the sidebar on node selection is inconsistent without the bold names:

@christianvogt
Yes, this is the other component (uses grid) which is used for this type of layout. It doesn't have bold, but should it?
For some reason i think that no bold for both is better than having bold for the key name because the key is not some constant value.

The input parameters in the sidebar on node selection is inconsistent without the bold names:

Yes, this is the other component (uses grid) which is used for this type of layout. It doesn't have bold, but should it?
For some reason i think that no bold for both is better than having bold for the key name because the key is not some constant value.

@Gkrumbach07 I think UX should make a call here. cc @yannnz

The input parameters in the sidebar on node selection is inconsistent without the bold names:

Yes, this is the other component (uses grid) which is used for this type of layout. It doesn't have bold, but should it?
For some reason i think that no bold for both is better than having bold for the key name because the key is not some constant value.

@Gkrumbach07 I think UX should make a call here. cc @yannnz

If we don't use the Name and Value header, then Bold is a common way in UI is help the user easier to understand the info of that column is for Name, not value. In the perspective of info display, the logic of using Bold for the name info is also consistent with other tags.

I made the keys bold for both components. I kept the two components separate for now as it is out of scope of this issue to combine them. I will create an issue talking about combining them into one component.
@christianvogt anything else before its good to go?
@manaswinidas @dpanshug do you want to give it a quick rereview?

Retested and reviewed latest changes.
/lgtm
/approve


Better visualize graphs with only one datapoint in "smooth-line"

Hello,
right now it's impossible to actually see the value of the first datapoint if there's only one datapoint (in this case it's set to 15000 for x and 0 for y):

It'd be nice if the first datapoint were a point if there's only one datapoint

Done, it now draws a point.


updated installation instruction

Updated the github line in the installation instruction from wyhaines/defined to wyhaines/defined.cr.
Without the .cr extension I get the following message when I run shards install
Resolving dependencies
Fetching https://github.com/wyhaines/defined.git
Failed to clone https://github.com/wyhaines/defined.git

I think this might be because of the name of the github repo?

Oh, yes. That was a good catch, and very true. I've gotten into the habit of putting the .cr onto the names of my various Crystal repositories, in order to avoid name collisions for simple things. Thanks again!


Move epa_check_alignment from bsg_manycore.cpp into bsg_manycore_epa.h

Super useful when writing a DPI tile. Also, just generally useful when checking addresses.

Doesn't really matter. I figured it was small enough but I'll put it in the .cpp file.

Doesn't really matter. I figured it was small enough but I'll put it in the .cpp file.