Add support for buildpack API v0.9

Summary
This PR adds compatible support for buildpack API v0.9 fixing https://github.com/paketo-buildpacks/packit/issues/431.
Use Cases
It currently supports three "modes" to stay compatible also with older API versions:

API < v0.9: No changes required, direct and indirect processes are possible
API >= v0.9: If only the BP API version is bumped, the provided Process struct is translated into a DirectProcess using ToDirectProcess. If it was used as an indirect process, it will be translated by prepending bash to the original command. I would put this up for discussion if it is the right thing to do. Maybe failing or supporting either the old or the new struct is a better way.
API >= v0.9: Using node-start as an example, the new facilities could be used like this:

func Build(applicationFinder ApplicationFinder, logger scribe.Emitter, reloader Reloader) packit.BuildFunc {
	return func(context packit.BuildContext) (packit.BuildResult, error) {
...
		originalProcess := packit.DirectProcess{
			Type:    "web",
			Command: []string{"node"},
			Args:    []string{file},
			Default: true,
		}
...
		logger.LaunchDirectProcesses(processes)
		return packit.BuildResult{
			Launch: packit.LaunchMetadata{
				DirectProcesses: processes,
			},
		}, nil
	}
}

The separate LaunchProcess interface is a bit ugly but it was the easiest way to enable compatibility with the emitter, but I'm open for alternatives as well. One neat way could be to use generics, but the project is currently using go 1.16.
Checklist

[X] I have viewed, signed, and submitted the Contributor License Agreement.
[X] I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
[X] I have added an integration test, if necessary.
[X] I have reviewed the styleguide for guidance on my code quality.
[X] I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@modulo11 this looks great, thanks for updating the PR. When you have a chance, can you rebase it with the latest v2 branch changes?
Also giving time for @robdimsdale to take another look if he wants to before we merge it in.

@modulo11 There's a refactor that I'd like to do, but I don't have permissions to push to your fork. Essentially I want to move the GetXYZ methods off the public API and into an internal interface within scribe/emitter.go. This change keeps the same functionality while also maintaining a minimal public API. These methods are only used within scribe/emitter.go, so this refactor continues to work. And I don't think it's particularly useful to add these methods to the public API of Process.go.
Could you either: A) give me permissions to write to your fork. Or B) apply this commit.

@modulo11 There's a refactor that I'd like to do, but I don't have permissions to push to your fork. Essentially I want to move the GetXYZ methods off the public API and into an internal interface within scribe/emitter.go. This change keeps the same functionality while also maintaining a minimal public API. These methods are only used within scribe/emitter.go, so this refactor continues to work. And I don't think it's particularly useful to add these methods to the public API of Process.go.
Could you either: A) give me permissions to write to your fork. Or B) apply this commit.

That makes sense. I rebased the branch and picked your commit.

@modulo11 can you add a basic test case for emitter.LaunchDirectProcesses ?


feat(naming-convention): add support for fieldArgumentNames

Description
Add support for naming-convention transforms on the field arguments.
Fixes #3464
Type of change
Please delete options that are not relevant.

[ ] 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 not work as expected)
[x] This change requires a documentation update

How Has This Been Tested?
I've updated the existing unit-test to cover this new option
This new feature can be tested on any GraphQL Mesh schema that have some field arguments, example:
type Query {
   userById(userId: ID!): User
}

If we apply the following configuration:
transforms:
  - namingConvention:
        fieldArgumentNames: snakeCase

we should get the following generated schema:
type Query {
   userById(user_id: ID!): User
}

Checklist:

[x] I have followed the CONTRIBUTING doc and the style guidelines of this project
[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
[ ] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests and linter rules pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

Questions
@ardatan does this change might have an impact at runtime? (on the mapping between the schema args and the source args?) 👀

Found a regression at the execution phase, investigating... 🕵🏻♂


version 3.1.2 has a simple error

There is an import error in this version that wouldn't let my app start, inside the angular-emojione.js file there are two imports referencing emojione/index; taking off the /index seems to fix the problem and everything is working beautifully!

So sorry this issue has taken me so long, I've been quite busy the last few months! I'll try to get this taken care of as quickly as I can!

This repository is no longer maintained. Instead please use ngx-joypixels. Thank you!


totalLoad call crashing

With the latest version, 0.1.3 I an experiencing an exception at line 139. It looks like ocasionally wmic will return
"LoadPercentage

"

without a value, so the map function fails.
C:\node\DataCollector\node_modules\windows-cpu\index.js:139
            var cpus = res.match(/\d+/g).map(function(x) {
                                        ^
TypeError: Cannot read property 'map' of null
    at C:\node\DataCollector\node_modules\windows-cpu\index.js:13
9:41
    at ChildProcess.exithandler (child_process.js:735:7)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1008:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1080:5)

I fixed this for me by changing line 139 to
var cpus = (res.match(/\d+/g)) ? res.match(/\d+/g).map(function(x) {
    return +(x.trim());
}) : [null];

but I dont know if this is the best way to handle the error. I'll let you look into it further.

Fixed in 0.1.4 which is now published to NPM. Thanks for reporting this issue!


SSH into a running BOSH job story is out of date

This story: https://github.com/pivotal-cf/onboarding/blob/955551322f3e9ebc148b5ce76e3a0f1ce2b05fb4/bosh_troubleshooting.prolific#L20-L38
no longer makes sense as the more recent versions of BBL automatically create a jumpbox and change the bosh ssh behavior.

Thanks for the feedback @jrussett. I'll update the story.

Addressed in https://github.com/pivotal-cf/onboarding/pull/109

This has been fixed, thanks for reporting the issue!


single quotes in answers

if there is a single quote in prefixed reply question it occurred error with
"Uncaught SyntaxError: missing ) after argument list"
on questionsHTML
ie)
if the answer is "i don't care" or else
rest of chat will be stops with javascript error

You can escape single quotes like this: \’

but still occurs same issues
this issues can be solved with javascript escape function at el.question and el.answer from bubbles.js

@jbkeg Can you show me an example snippet of your code? I'd like to try and find out why it may occur.
The escape function might be an interesting way of dealing with these kinds of issues. If you'd like to submit a PR, I'll do some testing on it to see if it can be safely implemented.

I can confirm "i don\'t care" does not work.

Thanks for the sample, @sabatale ! I'm gonna reopen this since this is now a replicable issue.
For now, I suggest you try curly apostrophes: ’ instead of '.


[FLINK-14445][python] fix python module build failed when making sdist.

What is the purpose of the change
This pull request fixes the issue that python module build failed when making sdist.
Brief change log

Ignore the licenses folder and NOTICE file if not exist when packaging source distribution of flink-python.

Verifying this change
This change is already covered by existing tests. tox will create the source distribution of flink-python before tests begin.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
The S3 file system connector: (no)

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (not applicable)

@WeiZhong94 Thanks for your review! The change makes sense to me :)

Python module has passed the travis test. Merge this asap as the master is broken now.


Reads in GB for minutes after deleting .wslconfig

Windows Version
Microsoft Windows [Version 10.0.22621.2283]
WSL Version
<IP_ADDRESS>
Are you using WSL 1 or WSL 2?

[X] WSL 2
[ ] WSL 1

Kernel Version
No response
Distro Version
No distro
Other Software
Docker desktop with no distro.
Repro Steps
I install the latest pre-released 2.0 from this repo. After installing it I first set the 4gb limit than 1gb than 2gb with 4 core in .wslconfig in %userprofile% folder.
I deleted .wslconfig in %userprofile% and
I restart my machine and docker doesn't start in seconds, which usually happen.  I see a lot of R/W happen (in GBs) from vmmem kind of exe which I usually seen running docker.
What exactly wsl do when it doesn't find the .wslconfig. in my case I see a lot of R/W.
Expected Behavior
it should not do too much R/W. look like a bug.
Actual Behavior
it should not do too much R/W. look like a bug.
Diagnostic Logs
NA

What setting are you changing? It's not clear from your description.


Update keyboard_dismisser.dart

fix warning G1E0FE241: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.

Hi @liudonghua123,
Closing this as it's a duplicate of #12. I have just pushed a new version of the package, v3.0.0, that solves the warning.
Thanks a lot!


NLog works locally but not in IIS - PreRequestFilterCommandContext.Debug Rejecting message because of a filter

Hi! Thanks for reporting this bug!
Please keep / fill in the relevant info from this template so that we can help you as best as possible.
NLog version: (e.g. <IP_ADDRESS>)
Platform: .Net 4.7
Current NLog config (xml or C#, if relevant)
            var config = new LoggingConfiguration();
            NLog.LogManager.Configuration = config;
            LogManager.LogFactory = new NLogXPlatformFactory();

What is the current result? It works perfectly in my local machine with IIS Server but not in a development server under IIS
What is the expected result? To work too in the servers
Did you checked the Internal log? Correct, the internal logs write this messae:

2022-03-10 11:01:10.3547 Debug PreRequestFilterCommandContext.Debug Rejecting message because of a filter.
2022-03-10 11:01:10.3547 Debug PostRequestFilterCommandContext.Debug Rejecting message because of a filter.
2022-03-10 11:01:10.3547 Debug PostRequestFilterCommandContext.Debug Rejecting message because of a filter.
2022-03-10 11:01:10.3547 Debug PostRequestFilterCommandContext.Debug Rejecting message because of a filter.
As you see, I don't have any filters configurated, why works in my local machine and not in the server  ?

Are there any workarounds? no

Maybe check the NLog InternalLogger (activate from code) to see what NLog.config is being loaded.

Closing due to inactivity.


fix: Build error with luarocks

Coverage remained the same at 85.462% when pulling 48d9338b766b61c0299bb5fbbac46dd74b15f8c7 on luarocks into 5609326d09ca71d7a05afef5026a54c742980228 on main.

Coverage remained the same at 85.462% when pulling 48d9338b766b61c0299bb5fbbac46dd74b15f8c7 on luarocks into 5609326d09ca71d7a05afef5026a54c742980228 on main.


Implement upload file control

Add a widget that will handle attachment type of QuestionnaireItem.
This control should leverage custom operations defined in https://github.com/beda-software/aidbox-file-uploader

https://www.figma.com/design/4zUBTBQuk3VQBb6KHYqwGn/Beda-EMR-Web-UI?node-id=2570-5195&node-type=canvas&t=vbD7DjdQ0tHdr7Qe-0

https://ant.design/components/upload


Missing 2.57.1 release?

2.57.1 seems to have become generally available as of December 12th, but there's still no information or changelogs available for this version (No information on this repo, and no information under https://docs.mixpanel.com/docs/tracking-methods/sdks/javascript#release-history). As far as I can tell, this version does not exist.

This will be available shortly, thanks for your patience.

Release notes are up (along with 2.58.0 from today): https://github.com/mixpanel/mixpanel-js/releases
Apologies for the delay.


Look into usage of server-sent events as an alternative to websockets

We dont need to stream data from client to the server, so using websocket is kind of overkill and server-sent events could be a better replacement, which provides a one way stream from server to client.
https://github.com/sysid/sse-starlette

I'm not sure that we care too much about this, but SSE does apparently not work with Internet Explorer 😁.
https://caniuse.com/?search=server-sent events

And a few notes I found across the web about antivirus implications of SSE:
https://medium.com/developer-rants/antivirus-software-blocking-javascript-server-side-events-fb505f768c6
https://stackoverflow.com/questions/63716882/server-side-events-blocked-by-antivirus
It seems to me that most of the issues in this domain might be due to people creating updates that don't conform to the w3c standards, so i'd reckon that if we just make sure that we follow their guidelines, it will be a non-issue for us.

Some more caveats regarding SSE:

This answer on SO details the issue that Firefox & Chrome for HTTP/1 only allow 6 SSE connections per domain
HTTP/2 fixes this issue (see Mozilla MDN docs)

at least for ESnet, we are serving the FastAPI orchestrator-core application using uvicorn, which does not support HTTP/2.
The hypercorn library (officially documented in FastAPI) for serving you application) does support HTTP/2, so this may not be a problem if downstream users can switch to that library.

@hanstrompert if it's a won't fix? I guess we'll be using websockets?

I guess the 'wontfix' deserves some explanation 😊  In a discussion with @anieuwland and @wouter1975 we decided to postpone the implementation of WebSockets or SSE in the new frontend for now. Looking back, the main reason that we implemented WebSockets in the current fronted is because the polling triggered a spinner that was visible to the user. We trust that in the new frontend this visual artefact can be avoided by better separation of the polling from the other regular data fetching. This way we can avoid introducing functionality we do not actually need, thus saving resources now and on future maintenance.

A larger impetus for implementing websockets was also performance. I would like to see that we attempt to re-use the existing tools to have Websockets. Furthermore a correct implementation will also increase the usability of the FE will discuss with @wouter1975

Will be using websockets


Fix: repartition to more partitions than rows can cause crushes

Describe the bug
There's an edge case where using repartition into more partitions than there are rows in the df will results in empty partitions, which will then crush when a transformation is applied on the df.
To Reproduce
With Daft version 0.2.21, run the following script:
df = daft.from_pydict({"data": ["foo", "bar", "baz"]}).repartition(4)
df.with_column("replace", df["data"].str.replace("ba", "123")).collect()

It should result in a stack trace that culminates with:
ValueError: DaftError::ValueError Error in replace: Inputs have invalid lengths: 0, 1, 1
Note: this does not happen when using into_partitions. Both the following examples work as expected (i.e transformation is succesfully applied to entire df, no crush occurs):
# Example 1
df = daft.from_pydict({"data": ["foo", "bar", "baz"]}).into_partitions(4)
df.with_column("replace", df["data"].str.replace("ba", "123")).collect()

# Example 2
df = daft.from_pydict({"data": ["foo", "bar", "baz"]}).repartition(4).into_partitions(4)
df.with_column("replace", df["data"].str.replace("ba", "123")).collect()

Expected behavior

Without deep understanding of the rust engine, I'd say repartitioning should never create empty partitions in the first place, as it is hard to imagine their use. I'd expect the repartition(4) call from the above example to silently create only 3 partitions.
Even if there's a reason for supporting empty partitions, a mechanism for not attempting to perform the apply operation on these empty partitions, or at the very least recognize the issue ahead of execution and raise an exception that the operation is expected to fail due to he existence of empty partitions.
repartition and into_partitions should have consistent behavior on this

Desktop (please complete the following information):

OS: Ubuntu 18.04
Daft Version: 0.2.21

Thanks for the issue @EtayLivne !
To address your point about (2), this is actually specifically a bug over our string kernels! .str.replace() should absolutely work over an empty column (it just returns the empty result!) Fix: https://github.com/Eventual-Inc/Daft/pull/2165
On your point about (1)

Without deep understanding of the rust engine, I'd say repartitioning should never create empty partitions in the first place, as it is hard to imagine their use.

The current query planner in Daft unfortunately still has some very strong assumptions about knowing exactly how many partitions each "stage" expects, so we don't yet have a way to dynamically change the number of partitions during execution time.
HOWEVER! 😁 We are actually building mechanisms to make partitioning a lot less burdensome on the user! Coming soon to Daft - "Adaptive Query Execution (AQE)", where Daft is able to pause execution to inspect metadata about the partitions (e.g. how many empty partitions, how imbalanced partitions are) to perform dynamic splitting/partition pruning without user input.
You should be able to test this behavior out within the next month or so... Feel free to pop by our Slack to ask us any questions!

OK, neat, and thank you!
I do have some lingering questions (such as why into_partitions and repartition display different behaviors about this) but I think I'll be asking them a bit later in Slack :)


Added unit test for link command

Added tests for the link command

It seems the that CircleCI test that is failing is the integration tests. Do you think that my test has caused the issue?

There was a bug that was merged in as part of #21 that was causing some tests to fail 😞 . The fix for that bug was merged just a minute ago and the repo's now green again.
I would pull the new changes from master and re-verify your tests to make sure that old bug isn't causing your new test to fail still.

Sounds good! I'll rebase and push

There's a little issue with our CD script at the moment (being fixed in #36) once thats merged sometime today, I will merge in this PR.


Fix react-vapor.js distributed files & improve build speeds

The issue I was initially trying to fix was that react-vapor.js and react-vapor.min.js were exactly the same (both minified).
Proposed Changes

react-vapor.js is now non-minified and not optimized (built using webpack's development mode)
react-vapor.js now comes with a source map file
react-vapor.min.js remains the same
Improved build times of some npm build scripts:

Command
On master branch
On this branch

start
1m 15s
36s

docs
41s
33s

build
1m 15s
33s

build:dev
45s
29s

Potential Breaking Changes
None
Acceptance Criteria

[ ] The proposed changes are covered by unit tests
[ ] The potential breaking changes are clearly identified
[ ] README.md is adjusted to reflect the proposed changes (if relevant)

Codecov Report

Merging #1184 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1184   +/-   ##
=======================================
  Coverage   99.67%   99.67%
=======================================
  Files         350      350
  Lines        8860     8860
  Branches     2099     2099
=======================================
  Hits         8831     8831
  Misses         29       29

Continue to review full report at Codecov.

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

Codecov Report

Merging #1184 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1184   +/-   ##
=======================================
  Coverage   99.67%   99.67%
=======================================
  Files         350      350
  Lines        8860     8860
  Branches     2099     2099
=======================================
  Hits         8831     8831
  Misses         29       29

Continue to review full report at Codecov.

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


🐛 v1.0.31

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.


Unable to detect php-fpm service with port resource

Describe the bug
I have an issue when trying to ensure that a php-fpm service is listening with port resource.
How To Reproduce
I have the issue on a compute instance but it's seems to be reproductible in a docker container…
Start a docker container with php:8.2-fpm and take a shell in it:
docker run -d --rm -it --name goss-test php:8.2-fpm
docker exec -it goss-test bash

Install netcat & goss:
apt-get update
apt-get install netcat-openbsd
curl -L https://github.com/goss-org/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss

Ensure service is listening with netcat:
nc -z -v <IP_ADDRESS> 9000
Connection to <IP_ADDRESS> 9000 port [tcp/*] succeeded!

I ran goss with the following spec file:
# goss.yaml
port:
  tcp:9000:
    listening: true

goss validate
F

Failures/Skipped:

Port: tcp:9000: listening:
Expected
    false
to equal
    true

Total Duration: 0.000s
Count: 1, Failed: 1, Skipped: 0

Expected Behavior
Detect port as listening: true.
Actual Behavior
Running the add port command doesn't help:
goss add port 9000
Adding Port to './goss.yaml':

tcp:9000:
  listening: false
  ip: []

Environment:

Version of goss: v0.4.2
OS/Distribution version: Linux (Debian 11/12)

ℹ I didn't have any issues to validate many other services: sshd, postgresql, nginx,  redis and other http servers…

Does tcp6:9000 work? If it does, the doc explains it a bit.

Yes it works !
My apologies, I didn't check well my server state, may be this could help someone else, if not IP is defined in the php-fpm listen option it will bind the IPV6 interface:
; /etc/php/8.2/fpm/pool.d/www.conf
listen = "9082"
listen.allowed_clients = <IP_ADDRESS> # This IPV4 address confused me

sudo sockstat -l
USER     PROCESS              PID      PROTO  SOURCE ADDRESS            FOREIGN ADDRESS           STATE
root     php-fpm8.2           37132    tcp6   :::9082                   :::*                      LISTEN

Adding the IPV4 loopback IP force it on tcp4:
; /etc/php/8.2/fpm/pool.d/www.conf
- listen = "9082"
+ listen = "<IP_ADDRESS>:9082"
listen.allowed_clients = <IP_ADDRESS> # This IPV4 address confused me

sudo sockstat -l
USER     PROCESS              PID      PROTO  SOURCE ADDRESS            FOREIGN ADDRESS           STATE
root     php-fpm8.2           41486    tcp4   <IP_ADDRESS>:9082            *:*                       LISTEN

As a goss user the confusing point for me was this note in the documentation:

Note: Goss might consider your port to be listening on tcp6 rather than tcp, try running goss add port .. to see how goss detects it. (https://github.com/goss-org/goss/issues/149)

Because goss didn't detect my service as listening on tcp6!.
🎉 Also as a goss user I really love this proposal because it makes the most common use case really simple and allow more finest checks tcp4/tcp6 as well.
Thanks for your help @aelsabbahy ! I also would like to congratulate you for this product, the alternative to testinfra, serverspec I was looking for.


Number to Human function

dear
i'm not a ruby speaker, i found the number_to_human_size function, but it doesnt have number_to_human function as rails did. Is it going to be implemented?
best regards

You can import actionview and use it outside rails.
2.5.1 :001 > require 'action_view'
 => true
2.5.1 :002 > include ActionView::Helpers::NumberHelper
 => Object
2.5.1 :003 > number_to_human(1234)
 => "1.23 Thousand"

hi @basex do i need to add gem into my Gemfile ? thanks man!