text:
Integration with deploy package function

Fixes issue https://github.com/elastic-coders/serverless-webpack/issues/107.
Also PR https://github.com/elastic-coders/serverless-webpack/pull/110 seems incomplete and it looks like the author is not working on it anymore.
Here is a working webpack.config.js
const yaml = require('js-yaml');
const fs = require('fs');
const path = require('path');
const nodeExternals = require('webpack-node-externals');

const handlerRegex = /\.[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
const include = './_webpack/include.js';
const entries = {};

const doc = yaml.safeLoad(fs.readFileSync('serverless.yml', 'utf8'));

// If we pass a function, package just it
// not all the functions listed on serverless.yml
const serverlessFunction = process.env.serverlessFunction;
const functions = serverlessFunction ?
  { serverlessFunction: doc.functions[serverlessFunction] }
  : doc.functions;
for (const key in functions) { // eslint-disable-line guard-for-in
  const handler = functions[key].handler;
  const entryKey = handler.replace(handlerRegex, '');
  entries[entryKey] = [include, `./${entryKey}.js`];
}

module.exports = {
  entry: entries,
  target: 'node',
  // Generate sourcemaps for proper error messages
  devtool: 'source-map',
  // Since 'aws-sdk' is not compatible with webpack,
  // we exclude all node dependencies
  externals: [nodeExternals()],
  // Run babel on all .js files and skip those in node_modules
  module: {
    loaders: [{
      test: /\.js$/,
      loaders: ['babel-loader'],
      include: __dirname,
      exclude: /node_modules/,
    }]
  },
  output: {
    libraryTarget: 'commonjs',
    path: path.join(__dirname, '.webpack'),
    filename: '[name].js'
  }
};

Installed and tested this PR
Although Lambda shows this when opening the function on AWS console:

Your Lambda function "fnName" cannot be edited inline since the file name specified in the handler does not match a file name in your deployment package.

The function does get packaged correctly and work.

@HyperBrain
Related to https://github.com/elastic-coders/serverless-webpack/issues/134
This PR replaces your PR https://github.com/elastic-coders/serverless-webpack/pull/110.
I have used it in some of my projects for about 1 month now without any problems.

@franciscocpg Ok. Then I will close my PR.

Regarding the new label please check my comment https://github.com/elastic-coders/serverless-webpack/issues/134#issuecomment-312304294

@franciscocpg Can you check if #91 is also replaced, as it also about hooking package function and on the first sight does something quite similar?

@HyperBrain. Yes it replace.
In fact I've tested the branch from https://github.com/elastic-coders/serverless-webpack/pull/91 and it's not working because the zip file is not being copied to .serverless.

I like this approach. I wonder though if we should provide a utility function. Something like
const slsw = require('serverless-webpack');

module.exports = {
  entry: slsw.entries(),
  // other bits
  output: {
    libraryTarget: 'commonjs',
    path: path.join(__dirname, '.webpack'),
    filename: '[name].js'
  }
};

@johnf Interesting idea 🙌 . As this is out of scope for this particular PR, would you mind creating a separate issue for the "library extension" of the plugin with a detailed description what problem it addresses? Thanks.

I think having exported entries is a pretty cool idea 👍 .
We don't really do single function deploys, so my experience is a bit limited 😅 . My only worry would be to inadvertently affect whole package deploys. That said, it would save a lot of trouble having to manually sync serverless.yml and webpack.config.js and I'd be up for pushing to v2.1 so we can test it properly.

Ok. I'll tag it accordingly... we will do function deploys as soon as this is done 😄

@franciscocpg Do you need any help with the entries fix? I could create a separate branch in the repository to consolidate the feature, so that we can add this with a separate PR before it finds its way to master.

Hi @HyperBrain
So if I don't misunderstood anything we are going to move this logic (with some modifications) from webpack.config.js
const entries = {};

const doc = yaml.safeLoad(fs.readFileSync('serverless.yml', 'utf8'));

// If we pass a function, package just it
// not all the functions listed on serverless.yml
const serverlessFunction = process.env.serverlessFunction;
const functions = serverlessFunction ?
  { serverlessFunction: doc.functions[serverlessFunction] }
  : doc.functions;
for (const key in functions) { // eslint-disable-line guard-for-in
  const handler = functions[key].handler;
  const entryKey = handler.replace(handlerRegex, '');
  entries[entryKey] = [include, `./${entryKey}.js`];
}

to our plugin (a new file called index.js or lib.js) and then export entries (through lib expose) so one could use like this webpack.config.js:
const slsw = require('serverless-webpack');
module.exports = {
  entry: slsw.lib.entries,
  // other bits
  output: {
    libraryTarget: 'commonjs',
    path: path.join(__dirname, '.webpack'),
    filename: '[name].js'
  }
};

Did I understand correctly?

I understood it that way 😄 . The webpack config should have no knowledge of Serverless internals, so everything that interacts directly with the plugin or Serverless should be in the plugin.
After a solution is finsihed we also should test the behavior with all possible configurations (may it be the entries retrieved from the plugin or statically set entries).

Sorry for the late, guys. I was very busy these days.
I made the changes we've discussed here and also I've updated examples folder.
IMO babel-dynamically-entries (entries retrieved from the plugin) and babel-multiple-statically-entries (statically set entries) examples are a good place to do some manual tests for this PR (sls deploy, sls deploy function -f first, sls deploy function -f second, sls webpack invoke -f first, sls webpack invoke -f second).
I think this PR is still a WIP because I didn't add any specs to tests (hope to do this ASAP) but it looks like everything is working as expected.

@franciscocpg Great stuff and a big thank you 🙌 . I will test it over the weekend and review the PR again.

@franciscocpg Just testing now and it looks good so far. Could you rebase the PR onto the current master before you add the unit tests? I upgraded the test tools to the most recent versions.

Can you try with git rebase to rebase the branch onto the current master? I think the "merge" commit (the latest one) somehow messes up GitHub's diff display because it does not change the commit dates.

@HyperBrain
Do you mean git rebase master, right?

Yes, given that your fork's master is up-to-date with the webpack's master 👍 .
But first remove the merge commit with "reset"

According to the git docs (https://git-scm.com/docs/git-rebase) it should be git rebase --onto master

I managed to rebase the commits locally. If you agree, I can commit them back to your branch into the PR.

Ok @HyperBrain

Can you check if "enable edits by maintainers" is checked in the PR?

I've just checked Allow edits from maintainers now

It worked 💯
You can now pull the branch again locally. It is now rebased onto the current master.

@HyperBrain
I've added tests (file validate.test.js).

I found an issue with handlers in arbitrary paths when testing with one of our bigger production projects.
I fixed it and added the commits. All my tests now worked properly.
Additionally I added lodash and used the serverless framework to retrieve the service functions which is the proposed way to do that.
This should be good to go now :)

Nice @HyperBrain!
Just a note about this commit

https://github.com/elastic-coders/serverless-webpack/commit/b4a9e1c Removed yarn lock file. yarn should use package-lock.json

It looks like yarn isn't using package-lock.json right now: https://github.com/yarnpkg/yarn/issues/3614
So if I ran yarn at the root of this repository, it's going to generate a yarn.lock.
According to the issue above right now we should choose to support package-lock.json (npm) OR yarn.lock (yarn).
Maybe in the future we could use yarn with package-lock.json.
This thread may be helpful: https://stackoverflow.com/a/44904494

@franciscocpg Yeah, at the moment it seems to be quite a mess with the different package lock mechanisms. Maybe we should remove the lock files completely for now, and use it as soon as the tools (npm and yarn) can work with the same one.

@HyperBrain
IMO we should remove package-lock.json and add yarn.lock.  Of course this means that we are "officially" migrating our node package manager to yarn (maybe we should open another issue for this discussion?).
But I don't think is a good ideia to remove lock files for now. I think we should decide if we migrate to yarn (adding yarn.lock and removing package-lock.json) or keep with npm as our official node package manager (keeping package-lock.json).

For this PR maybe we should keep npm and create a new issue about migration to yarn so community could contribute with opinions.
What do you think @HyperBrain ?

That sounds good to me. This PR should not invent or change things other than the problem solved ;-)
I will open a separate issue for the yarn/npm discussion.

authors: HyperBrain afhammad franciscocpg hassankhan johnf

repo: elastic-coders/serverless-webpack


text:
Rework REST API client design

The current elastic_hyper design is very simple; it does some basic codegen from the API spec and dumps out unique methods for each possible endpoint, wrapping up a hyper::Client.
See #145 for a discussion of where this isn't stacking up. I think the issue is that the API generated for elastic_hyper is really just providing a typed url. There needs to be some sanity build on top of this that makes it better to work with. I think something like the following would be a good start:

Generate parameter structures for each endpoint, instead of separate method args
Have some basic metadata that can be pulled in with the JSON spec, to filter out verbs we don't care about, rename things etc
Have a manual layer over the top that exposes the API we want. This too should be codegenned down the track

This is now done and dusted.

source: gharchive/issue

repo: elastic-rs/elastic

license_type: permissive

license_source: github-api


text:
Move SPID check to dir block in release job

What does this PR do?
Should fix an error encountered in the release attempt.
./scripts/jenkins/fetch_nexus_id.sh: not found
Checklist

[ ] This is an enhancement of existing features, or a new feature in existing plugins

[ ] I have updated CHANGELOG.asciidoc
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] Added an API method or config option? Document in which version this will be introduced
[ ] I have made corresponding changes to the documentation

[ ] This is a bugfix

[ ] I have updated CHANGELOG.asciidoc
[ ] I have added tests that would fail without this fix

[ ] This is a new plugin

[ ] I have updated CHANGELOG.asciidoc
[ ] My code follows the style guidelines of this project
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] I have updated supported-technologies.asciidoc
[ ] Added an API method or config option? Document in which version this will be introduced
[ ] Added an instrumentation plugin? Describe how you made sure that old, non-supported versions are not instrumented by accident.

[ ] This is something else

[ ] I have updated CHANGELOG.asciidoc

Codecov Report

Merging #1390 into master will decrease coverage by 3.77%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #1390      +/-   ##
============================================
- Coverage     63.74%   59.97%   -3.78%
+ Complexity     3290       91    -3199
============================================
  Files           338      385      +47
  Lines         15900    17373    +1473
  Branches       2174     2386     +212
============================================
+ Hits          10136    10419     +283
- Misses         5074     6239    +1165
- Partials        690      715      +25

Impacted Files
Coverage Δ
Complexity Δ

...ration/source/PropertyFileConfigurationSource.java
35.52% <0.00%> (-41.62%)
0.00% <0.00%> (-11.00%)

...nt/configuration/converter/ListValueConverter.java
43.47% <0.00%> (-39.86%)
0.00% <0.00%> (-4.00%)

...c/main/java/co/elastic/apm/agent/util/IOUtils.java
56.60% <0.00%> (-34.31%)
0.00% <0.00%> (-16.00%)

...tion/source/SystemPropertyConfigurationSource.java
23.07% <0.00%> (-26.93%)
0.00% <0.00%> (-3.00%)

...ic/apm/agent/profiler/collections/LongHashSet.java
16.66% <0.00%> (-0.80%)
0.00% <0.00%> (-13.00%)

...acing/impl/ExternalSpanContextInstrumentation.java
0.00% <0.00%> (ø)
0.00% <0.00%> (?%)

...a/co/elastic/apm/plugin/PluginInstrumentation.java
44.44% <0.00%> (ø)
4.00% <0.00%> (?%)

.../helper/KafkaInstrumentationHeadersHelperImpl.java
0.00% <0.00%> (ø)
0.00% <0.00%> (?%)

...va/co/elastic/apm/opentracing/ApmScopeManager.java
92.00% <0.00%> (ø)
12.00% <0.00%> (?%)

.../opentracing/impl/ScopeManagerInstrumentation.java
0.00% <0.00%> (ø)
0.00% <0.00%> (?%)

... and 42 more

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 98b9c4d...dc895c5. Read the comment docs.

:green_heart: Build Succeeded

Expand to view the summary

Build stats

Build Cause: [Pull request #1390 opened]

Start Time: 2020-09-08T09:17:51.790+0000

Duration: 47 min 12 sec

Test stats :test_tube:

Test
Results

Failed
0

Passed
1561

Skipped
12

Total
1573

source: gharchive/pull-request

authors: apmmachine cachedout codecov-commenter

repo: elastic/apm-agent-java


text:
[load testing] simplify, rince and repeat

:green_heart: Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS

Expand to view the summary

Build stats

Build Cause: Pull request #1553 updated

Start Time: 2020-12-04T16:04:12.623+0000

Duration: 46 min 30 sec

Test stats :test_tube:

Test
Results

Failed
0

Passed
1629

Skipped
12

Total
1641

authors: SylvainJuge apmmachine


text:
avoid double ending grpc transaction

What does this PR do?
Fixes issue reported in our forum where we sometimes attempt to end a grpc transaction more than once.
2023-07-06 15:42:44,431 [grpc-default-executor-0] WARN  co.elastic.apm.agent.impl.transaction.AbstractSpan - End has already been called: 'de.testservice.grpc.TestService/testRequest' 00-d50b05d4dd2b488c0a90829f6a836381-6449284edc49c220-01 (7c46c4b3)
java.lang.Throwable: null
        at co.elastic.apm.agent.impl.transaction.AbstractSpan.end(AbstractSpan.java:584) [elastic-apm-agent-1.39.1-SNAPSHOT.jar:1.39.1-SNAPSHOT]
        at co.elastic.apm.agent.impl.transaction.AbstractSpan.end(AbstractSpan.java:559) [elastic-apm-agent-1.39.1-SNAPSHOT.jar:1.39.1-SNAPSHOT]
        at co.elastic.apm.agent.grpc.GrpcHelper.exitServerListenerMethod(GrpcHelper.java:272) [elastic-apm-agent-1.39.1-SNAPSHOT.jar:?]
        at co.elastic.apm.agent.grpc.ServerCallListenerInstrumentation$OnCancel$OnCancelAdvice.onExit(ServerCallListenerInstrumentation.java:131) [elastic-apm-agent-1.39.1-SNAPSHOT.jar:?]
        at io.grpc.Contexts$ContextualizedServerCallListener.onCancel(Contexts.java:100) [grpc-api-1.51.0.jar!/:1.51.0]
        at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.closedInternal(ServerCallImpl.java:378) [grpc-core-1.51.0.jar!/:1.51.0]
        at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.closed(ServerCallImpl.java:365) [grpc-core-1.51.0.jar!/:1.51.0]
        at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1Closed.runInContext(ServerImpl.java:923) [grpc-core-1.51.0.jar!/:1.51.0]
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) [grpc-core-1.51.0.jar!/:1.51.0]
        at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) [grpc-core-1.51.0.jar!/:1.51.0]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]

In the provided example, we have an extra call to onCancel just before the onComplete, which is a bit odd to me and could be an implementation detail that is not very common otherwise it would have been reported earlier.
When there is such onCancel call before the onComplete, it means that the captured transaction will be ended a bit earlier, which should not be an issue time-wise, but it could mean the transaction get sent with a cancelled status when it actually completes (and I don't know if we could prevent that). In practice when testing with the provided project this does not happen, thus it should be fine most of the time.
Checklist

[x] This is a bugfix

[x] I have updated CHANGELOG.asciidoc
[ ] I have added tests that would fail without this fix
[x] manually testing with provided sample project https://github.com/hackermann/reproducible_example_bug_elastic_apm_grpc/tree/main and grpc-client-cli

This bugfix was validated by user who reported the initial issue.


text:
Python RQ support

I'm having hard time setting up APM with Python RQ. I tried following old solution Python agent only recording some background tasks, which led me to creating custom rq.job. But this solution no longer works. I tried setting API_REQUEST_SIZE to 1b instead of MAX_QUEUE_SIZE but that didn't make a change.
I tried to debug where the things go wrong but the code is just advanced for me. I created minimal Django app with Elastic APM working on the view and my attempt to implement TracingJob.
Readme describes how to setup the app and how to replicate my issue. It would be great if someone with understanding of the queue and the transport layer could take a look at it.

Thanks for opening an issue for me. I'm going to add this to my list, probably for next week.

Finally got back to this.
There are two things that you're missing from the post you were following:
Need to create the client from scratch
I'm pretty sure this is due to the worker spinning up its own client, which includes background threads for sending the transactions to the APM server. When a new RQ job comes in, it forks to handle that job, so the existing Client object loses all of its support threads. As a result the transaction never is sent. Creating a new Client creates these threads and properly handles the transaction. @beniwohli does that sound right?
Note that spinning up a Client is a non-trivial operation, constituting as much as a millisecond of overhead. Keep this in mind, as with a heavy RQ workload this adds up.
Need to explicitly close the client
This was called out in that thread, but it was easy to miss. If you don't explicitly close the client, the forked job ends without waiting for the queue flush in the background thread.
Note that with the addition of the close() call, I don't think you actually need the API_REQUEST_SIZE setting. The close() will flush the queue by itself (it's working in my testing, anyway).
Here's the diff on my tracing_job.py:
--- a/elastic_rq_demo/tracing_job.py
+++ b/elastic_rq_demo/tracing_job.py
@@ -1,12 +1,11 @@
 import elasticapm
-from elasticapm.contrib.django.client import get_client
 from rq.job import Job
 import logging
 logger = logging.getLogger('TracingJob')

 class TracingJob(Job):
     def perform(self):
-        client = get_client()
+        client = elasticapm.Client()
         client.begin_transaction("backgroundjob")
         context = {"args": self.args, "kwargs": self.kwargs}
         logger.info(context)
@@ -19,3 +18,5 @@ class TracingJob(Job):
         except:
             client.capture_exception()
             raise
+        finally:
+            client.close()

Anyway, thanks again for your question. I was able to learn a bit myself while investigating this. :)

Awesome, I've got it working. Thank you for your help!

hi guys,
am a little confused on how to use this in flask - should i use it the way its mentioned in code.
https://github.com/elastic/apm-agent-python/blob/04f0edab39795ec4e3e304afbf82e29b726f7e45/elasticapm/contrib/rq/__init__.py#L32
because this issue mentions some other way and im not able to get it to work

@sandys You'll probably want to check out the old discuss post that was referenced above. But note that this is not a supported use case, it has some big problems in terms of performance due to sending after each event instead of batching.

@basepi well we are looking for full tracing rather than a metric ping. im not entirely sure if this is the right issue for it, or if thats a usecase you are planning to support.
I would say rq and celery would be in the same bucket for these kind of usecases.

We actually support celery today. And I think we do want to support rq eventually we just haven't figured out the right way to do so.

(I would open a new issue if I were you. Much cleaner than repurposing a "question" issue)

Will do.
I wasn't sure if you guys were ok with opening a new issue with pretty much
the same topic!
Just one quick request though - I have simultaneously been discussing with
rq Devs to add any hooks to support APM.
They have offered to do so here -
https://github.com/rq/rq/issues/1230#issuecomment-612698580
Would you be able to comment on what exactly you need from rq to make
this happen? Especially since you support celery much better.
On Wed, 15 Apr, 2020, 22:07 Colton Myers, notifications@github.com wrote:

(I would open a new issue if I were you. Much cleaner than repurposing a
"question" issue)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/elastic/apm-agent-python/issues/637#issuecomment-614147128,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAASYUYFC3VO4VW5P5CQVATRMXPERANCNFSM4JNPUGAQ
.

Done. :)

authors: basepi sandys stlk

repo: elastic/apm-agent-python


text:
Asgi middleware

exception tracking is still missing, as I haven't figured out
yet why the exception doesn't bubble up to our middleware
What does this pull request do?

Related issues
closes #1341

:green_heart: Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS

Expand to view the summary

Build stats

Start Time: 2022-04-13T13:07:52.184+0000

Duration: 23 min 12 sec

Test stats :test_tube:

Test
Results

Failed
0

Passed
4829

Skipped
3374

Total
8203

:green_heart: Flaky test report
Tests succeeded.
:robot: GitHub comments
To re-run your PR in the CI, just comment with:

/test : Re-trigger the build.

/test linters : Run the Python linters only.

/test full : Run the full matrix of tests.

/test benchmark : Run the APM Agent Python benchmarks tests.

run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

/test

:globe_with_meridians: Coverage report

Name
Metrics % (covered/total)
Diff

Packages
100.0% (69/69)
:green_heart:

Files
100.0% (226/226)
:green_heart:

Classes
100.0% (226/226)
:green_heart:

Lines
88.972% (16249/18263)
:grey_exclamation:

Conditionals
76.355% (3029/3967)
:grey_exclamation:

@beniwohli This just needs a CHANGELOG and it's ready to merge. I also opened https://github.com/elastic/apm-agent-python/issues/1548 to track the exception handling issue.

@beniwohli We should probably write some docs on this and mark it as beta since it has the exception-handling issue. Also prominently point out that known issue and link to the open issue.

authors: apmmachine basepi beniwohli v1v


text:
ci: re-enable more python 3.12 testing

What does this pull request do?
Re-enable some python3.12 testing.
Related issues
None

/test matrix

authors: basepi xrmx


text:
Update aws sdk to 1.10.69 and add cloud.aws.s3.throttle_retries setting

This PR brings 2 changes:

Upgrade to AWS SDK 1.10.69

Add cloud.aws.s3.throttle_retries setting

Moving from JSON.org to Jackson for request marshallers.

The Java SDK now supports retry throttling to limit the rate of retries during periods of reduced availability. This throttling behavior can be enabled via ClientConfiguration or via the system property "-Dcom.amazonaws.sdk.enableThrottledRetry".

Fixed String case conversion issues when running with non English locales.

AWS SDK for Java introduces a new dynamic endpoint system that can compute endpoints for services in new regions.

Introducing a new AWS region, ap-northeast-2.

Added a new metric, HttpSocketReadTime, that records socket read latency. You can enable this metric by adding enableHttpSocketReadMetric to the system property com.amazonaws.sdk.enableDefaultMetrics. For more information, see Enabling Metrics with the AWS SDK for Java.

New Client Execution timeout feature to set a limit spent across retries, backoffs, ummarshalling, etc. This new timeout can be specified at the client level or per request.
Also included in this release is the ability to specify the existing HTTP Request timeout per request rather than just per client.

Added support for RequesterPays for all operations.

Ignore the 'Connection' header when generating S3 responses.

Allow users to generate an AmazonS3URI from a string without using URL encoding.

Fixed issue that prevented creating buckets when using a client configured for the s3-external-1 endpoint.

Amazon S3 bucket lifecycle configuration supports two new features: the removal of expired object delete markers and an action to abort incomplete multipart uploads.

Allow TransferManagerConfiguration to accept integer values for multipart upload threshold.

Copy the list of ETags before sorting aws/aws-sdk-java#589.

Option to disable chunked encoding aws/aws-sdk-java#586.

Adding retry on InternalErrors in CompleteMultipartUpload operation. aws/aws-sdk-java#538

Deprecated two APIs : AmazonS3#changeObjectStorageClass and AmazonS3#setObjectRedirectLocation.

Added support for the aws-exec-read canned ACL. Owner gets FULL_CONTROL. Amazon EC2 gets READ access to GET an Amazon Machine Image (AMI) bundle from Amazon S3.

Added support for referencing security groups in peered Virtual Private Clouds (VPCs). For more information see the service announcement at https://aws.amazon.com/about-aws/whats-new/2016/03/announcing-support-for-security-group-references-in-a-peered-vpc/ .

Fixed a bug in AWS SDK for Java - Amazon EC2 module that returns NPE for dry run requests.

Regenerated client with new implementation of code generator.

This feature enables support for DNS resolution of public hostnames to private IP addresses when queried over ClassicLink. Additionally, you can now access private hosted zones associated with your VPC from a linked EC2-Classic instance. ClassicLink DNS support makes it easier for EC2-Classic instances to communicate with VPC resources using public DNS hostnames.

You can now use Network Address Translation (NAT) Gateway, a highly available AWS managed service that makes it easy to connect to the Internet from instances within a private subnet in an AWS Virtual Private Cloud (VPC). Previously, you needed to launch a NAT instance to enable NAT for instances in a private subnet. Amazon VPC NAT Gateway is available in the US East (N. Virginia), US West (Oregon), US West (N. California), EU (Ireland), Asia Pacific (Tokyo), Asia Pacific (Singapore), and Asia Pacific (Sydney) regions. To learn more about Amazon VPC NAT, see New - Managed NAT (Network Address Translation) Gateway for AWS

A default read timeout is now applied when querying data from EC2 metadata service.

Defaults to true.
If anyone is having trouble with this option, you could disable it with cloud.aws.s3.throttle_retries: false in elasticsearch.yml file.
Backport of elastic/elasticsearch#17784 for 1.7 series

@tlrx Also updated here if you want to review.
Thanks!

LGTM

authors: dadoonet tlrx

repo: elastic/elasticsearch-cloud-aws

license_source: bigquery


text:
Support for get task API

Adds support for GET /_tasks/{taskid}
Also renamed TasksList and TasksCancel for consistency.

LGTM :+1:

authors: gmarz russcam

repo: elastic/elasticsearch-net


text:
Changing log.level and path.logs

Team,
How can I change the "log.level" and "path.logs" in logstash, I know one way to make change in  module itself. But I am using hiera for  installation purpose, it would be grateful if you can guide me.
Module Version : 5.0.3
Ubuntu: 14.04

Hi @smitjainsj,
Both log.level and path.logs are specified in the settings parameter. It expects a hash of key/values, so if you want to set them with Hiera (and assuming you are using the YAML backend for Hiera, you can set:
logstash::settings:
  log.level: debug
  path.logs: /tmp

Hopefully this worked for you, @smitjainsj.

authors: jarpy smitjainsj

repo: elastic/puppet-logstash


text:
1k limitation

Our customer from PDI has a flow that inserts data from Salesforce to Redshift. He has around 8k records, however, the flow goes to sleep after importing 1k records.

AFAIK this might be related to :
https://github.com/elasticio/salesforce-component/blob/65c472a9fcfaa3b1564e2c6f2a3f5877df53820d/lib/actions/query.js#L8

The bug was fixed and update is available in the master branch

authors: kirill-levitskiy vdidushko

repo: elasticio/salesforce-component


text:
Feature Request - Ability to feed list of domains

I have seen entities with multiple domains used for email and the ability to twist the list of domains into a single file export would be very useful.

How about a simple loop?
for i in $(cat domains.txt); do ./dnstwist.py -f list $i >> permutations.txt; done

is there an update on this feature?

https://github.com/hardwaterhacker/CrazyParser ... did that for both URLcrazy and DNStwist, unfortunately it doesn't run on 2023 updated versions of Ubunto, Python etc....

**Hi 👽 ! If you are interested in ⚙Advanced Phishing⚙ and the ✨Evilginx3✨ tool then I offer you Google Gmail and Custom Phishlets (Paypal, Cryptos...) with a ✅Free Tutorial✅ which arrives if the 📈Telegram reaches 50 Subscribers📈
⏳ GOOGLE GMAIL PHISHLET 2024 WITH PROOF ⏳
->
⛔https://www.youtube.com/watch?v=nA47UknIE6A⛔
🔓 Ask your questions and a free tutorial from 50 subs on telegram !!!
->
📩https://t.me/Noremorse1011📩**

repo: elceef/dnstwist


text:
🛑 Banco Provincia is down

In c7619d6, Banco Provincia (https://www.bancoprovincia.com.ar) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Banco Provincia is back up in f16c559.

repo: eldikra/monitoreo

license: MIT


text:
LDAP Connexion

Hello :)
Just to know, is there a hope having a LDAP connexion possibility in the furure?
Thank you!

It's currently not planned to add this a feature.

repo: electerious/Lychee

license: mit


text:
Audio I/O channels swapped with certain build settings

This is particularly evident when switching between the default Make build and the VS/VisualGDB build.
It seem like a timing issue related to the SAI StartDMA function, as adding a delay in the middle of that function can swap the channels back.
It also seems like this changes based on debug/release settings like optimization.
I'll add more details as I investigate further

This sounds like a reordering problem to me. During the optimization, the compiler may be reordering access to the various registers and swap thing around. Have you tried adding the __sync_synchronize(); function as a barrier?

It's been a while since I was tinkering on this, but I'm fairly certain I tried all of __sync_synchronize(), __DSB(), etc.
What was also interesting was the length of the delay that I had inserted in the HAL_SAI_StartDMA seemed to have an effect on the channel offset. It really seems like the data lines are getting offset from the FS lines by a fixed number of bits that seems related to the timing between enabling the SAI and starting the transaction.
There is this note:

Each of the audio blocks in the SAI are enabled by SAIEN bit in the SAI_xCR1 register. As soon as this bit is active, the transmitter or the receiver is sensitive to the activity on the clock line, data line and synchronization line in slave mode. In master TX mode, enabling the audio block immediately generates the bit clock for the external slaves even if there is no data in the FIFO, However FS signal generation is conditioned by the presence of data in the FIFO. After the FIFO receives the first data to transmit, this data is output to external slaves. If there is no data to transmit in the FIFO, 0 values are then sent in the audio frame with an underrun flag generation.

From the reference manual (rev7 page 2259),
That seems like it could be related,

Thanks for bumping this, though. I've totally been neglecting it, and it should really get addressed sooner than later.

Fixed in #420

authors: TheSlowGrowth stephenhensley

repo: electro-smith/libDaisy


text:
Use JavaParser instead of JavaPoet to generate the Wasi testsuite

Quick and dirty port to JavaParser

Thanks. I made a few edits and squashed it into my PR.

👍

authors: andreaTP electrum

repo: electrum/chicory


text:
vite-plugin-element-plus 并不是 es5 代码

dist/index.js 还是 es6，请尽量往官方插件靠近，打包后使用 es5

好，这个插件还在开发中，今天应该会再发一个，感谢指出 :bow:

不过有一点我蛮好奇的，为什么 vite 本身支持 ES6 + 的语法而插件不行，， 我本地跑插件也是跑的这个没啥问题呀，你有具体的问题仓库看看吗？

不过有一点我蛮好奇的，为什么 vite 本身支持 ES6 + 的语法而插件不行，， 我本地跑插件也是跑的这个没啥问题呀，你有具体的问题仓库看看吗？

我这个 vite2 是零配置开发，当在 vite.config.js 导入 es6 模块的插件时，会输出 out of module 错误。估计是没有配置 babel 造成的

不过有一点我蛮好奇的，为什么 vite 本身支持 ES6 + 的语法而插件不行，， 我本地跑插件也是跑的这个没啥问题呀，你有具体的问题仓库看看吗？

我这个 vite2 是零配置开发，当在 vite.config.js 导入 es6 模块的插件时，会输出 out of module 错误。估计是没有配置 babel 造成的

https://github.com/element-plus/vite-plugin-element-plus/blob/main/examples/vite.config.ts 你可以看下这个文件，基本也是 0 配置，我不太清楚到底是为啥，理论上来说 vite 肯定是支持 es6 的

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import importElementPlus from '../dist'
vite 跟 @vitejs/plugin-vue 都是编译后的代码，我估计../dist 也是，你试试引入 vite-plugin-element-plus，估计就有错误了？

import importElementPlus from '../dist'

这里 import 的就是我们打包后的代码，你的 node 版本是多少？

import importElementPlus from '../dist'

这里 import 的就是我们打包后的代码，你的 node 版本是多少？

14.15.3

我看了下 example 里的配置文件，这个文件是 vite.config.ts 然后直接通过 vite 命令启动的，中间可能是有一个编译过程。

@lizy0329 发了个 0.0.4

我这直接报错没法跑起来
"vite-plugin-element-plus": "^0.0.4"
"vue": "^3.0.5"
"element-plus": "^1.1.0-beta.1"

我这直接报错没法跑起来
"vite-plugin-element-plus": "^0.0.4"
"vue": "^3.0.5"
"element-plus": "^1.1.0-beta.1"

报错发一下

@JeremyWuuuuu 我把vite.config.ts 中 importElementPlus 注销掉就没啥问题
importElementPlus({
useSource: true
})

@JeremyWuuuuu 我把vite.config.ts 中 importElementPlus 注销掉就没啥问题
importElementPlus({
useSource: true
})

Hummm，这个问题还真挺奇怪的。我还没遇到我测试一下。

@JeremyWuuuuu 我把vite.config.ts 中 importElementPlus 注销掉就没啥问题
importElementPlus({
useSource: true
})

Hummm，这个问题还真挺奇怪的。我还没遇到我测试一下。
不知道啥情况。。。

@JeremyWuuuuu 我把vite.config.ts 中 importElementPlus 注销掉就没啥问题
importElementPlus({
useSource: true
})

Hummm，这个问题还真挺奇怪的。我还没遇到我测试一下。
不知道啥情况。。。

LoL 我知道什么情况了。我之前改了代码忘发了。。。

LoL 我知道什么情况了。我之前改了代码忘发了。。。

啥时候发一个我还能测一下。。。

@pollux2015 好像不对啊。我这边是 OK 的，这咋回事呢。。。
我这边的测试代码没有用 router，我不清楚是不是这个问题。

@pollux2015 好像不对啊。我这边是 OK 的，这咋回事呢。。。
我这边的测试代码没有用 router，我不清楚是不是这个问题。

那我用一个不使用router的看一下

我这边的测试截图你可以看一下。我这边看起来是没问题的，但是我没有用 hot reload 可能

我怀疑是vue-router 的问题

我怀疑是vue-router 的问题

我来写个简单的试试

@JeremyWuuuuu
我用vite重新弄了一个, 同样的问题
yarn create vite my-vue-app --template vue

// vite.config.js
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import VitePluginElementPlus from 'vite-plugin-element-plus'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
VitePluginElementPlus({
// 如果你需要使用 [component name].scss 源文件，你需要把下面的注释取消掉。
// 对于所有的 API 你可以参考 https://github.com/element-plus/vite-plugin-element-plus
// 的文档注释
// useSource: true
}),
],
})

@pollux2015  我来看看哈，稍等。

@pollux2015 我来看看哈，稍等。
好的， 没事

@pollux2015 我来看看哈，稍等。
好的， 没事

Emmm, 我本地跑都没啥问题，你能把你这代码上传到 github 给我一个链接我下载看看吗？

@pollux2015 我来看看哈，稍等。
好的， 没事

Emmm, 我本地跑都没啥问题，你能把你这代码上传到 github 给我一个链接我下载看看吗？

https://gitee.com/pollux2020/test

用这个插件就报这个错误, 注释掉就没有问题

版本

版本

可能还有些问题，有人已经在处理了， 稍等

@zhangshichuan @pollux2015 两位 vue 的版本能发一下吗？

@JeremyWuuuuu

@pollux2015 我根据你的 repo 安装了一下，然后发现一个问题，就是因为 vue 3.2 做了 breaking change，然后 element-plus 没有做兼容。cc @zhangshichuan 我觉得这个是导致这个问题的根本原因。

@pollux2015 我根据你的 repo 安装了一下，然后发现一个问题，就是因为 vue 3.2 做了 breaking change，然后 element-plus 没有做兼容。cc @zhangshichuan 我觉得这个是导致这个问题的根本原因。

那我回退一下vue的版本是不是就ok了

你试试呗, 或者全量引入算了. 不搞这些了

@pollux2015 我根据你的 repo 安装了一下，然后发现一个问题，就是因为 vue 3.2 做了 breaking change，然后 element-plus 没有做兼容。cc @zhangshichuan 我觉得这个是导致这个问题的根本原因。

那我回退一下vue的版本是不是就ok了

Emmm 我们尽量赶快兼容  3.2.x。
实在不好意思 @zhangshichuan @pollux2015

辛苦了哈

我也注意到这个测试代码里面用了 setup 的语法糖，我们尽量快点兼容。

我也注意到这个测试代码里面用了 setup 的语法糖，我们尽量快点兼容。

好的， 今天我是重新拉一个项目发现很多vue3里面的语法糖也有更改。。

@pollux2015 你的问题我总结了一下，由于 Vue3.2.x 对 style 的部分做了改造，导致这里

的代码出错了，因为 ElementPlus 并没有做 3.2.x 的兼容。应该发个新版本就好了。
至于 @zhangshichuan 的问题我可能还要再看看。

@pollux2015 你的问题我总结了一下，由于 Vue3.2.x 对 style 的部分做了改造，导致这里

的代码出错了，因为 ElementPlus 并没有做 3.2.x 的兼容。应该发个新版本就好了。
至于 @zhangshichuan 的问题我可能还要再看看。
造成不便实在抱歉 🙇

好的收到

@pollux2015 昨天晚上发了新版本，你能试试看还有问题吗？

用这个插件就报这个错误, 注释掉就没有问题

@zhangshichuan Locale 这个方法建议不要用了，使用 https://element-plus.org/#/zh-CN/component/i18n#quan-ju-pei-zhi 这个方法。

@JeremyWuuuuu 确定更新？？ 还是0.0.4

@JeremyWuuuuu 确定更新？？ 还是0.0.4

更新指的是 ElementPlus 更新，已经把配套的 Vue 改到了 3.2.x

@JeremyWuuuuu 不行啊同样的错误， 而且拉的新项目中还没有在哪个页面中引入element-plus的组件
只是在vite里面配置了VitePluginElementPlus()这个插件就报错了

@JeremyWuuuuu 不行啊同样的错误， 而且拉的新项目中还没有在哪个页面中引入element-plus的组件
只是在vite里面配置了VitePluginElementPlus()这个插件就报错了

😢 我在这个仓库里的 examples 里面的代码全是好的，我来看看到底为什么。

@JeremyWuuuuu 不行啊同样的错误， 而且拉的新项目中还没有在哪个页面中引入element-plus的组件
只是在vite里面配置了VitePluginElementPlus()这个插件就报错了

同样的错误,配置如下:
package.json:

vite:

同样的问题。

@pollux2015 @WangXang
我分别运行了两个项目，一个是本项目中的 examples/ 一个是 @pollux2015 给出的 repo
通过对比编译后的文件我发现一个问题

@pollux2015 的仓库
examples

我推测问题的根源就在这个地方，方便问一下各位的 Node.js 版本吗 @zhangshichuan @exherb @lizy0329 @pollux2015
$ node -v | clipcopy

v15.9.0

@pollux2015 @exherb @lizy0329 定位到问题了，我迅速修复下，及时通知你们。抱歉 :bow:

@pollux2015 @exherb @lizy0329 定位到问题了，我迅速修复下，及时通知你们。抱歉 🙇

没事，感激

@pollux2015 @exherb @zhangshichuan @WangXang  升级到。vite-plugin-element-plus: ^0.0.8

本地测试已经成功了。造成不便非常抱歉。 :bow:

[庆祝][庆祝]

用这个插件就报这个错误, 注释掉就没有问题

@zhangshichuan Locale 这个方法建议不要用了，使用 https://element-plus.org/#/zh-CN/component/i18n#quan-ju-pei-zhi 这个方法。

收到! 然后我也升级下这个按需引入插件看看可以了不! 辛苦!

node.js version: v16.6.0

@zhangshichuan 晕。。bug，我处理下 0.0

node.js version: v16.6.0

改成 import { ElButton } from 'element-plus/es/components/' 可以正常运行
但是并没有按需加载样式，所以这个插件到底有什么用？之前官方文档的那个插件是不好用吗？

@exherb 你能发一下代码出来吗？为什么会没有用。我已经测试过了啊？？？

@zhangshichuan  升级下 0.0.9 fixed

@zhangshichuan 升级下 0.0.9 fixed

收到, 马上验证

@exherb

看图

@JeremyWuuuuu 已经可以了

我差点准备庆祝胜利了.
其他组件按需引入目前都没有问题, 然后布局组件有问题.

@zhangshichuan ..万分抱歉。。实在是因为我们最近变大，然后有些地方没测到。测试覆盖不够全。我会尽快发一个新的版本。

@zhangshichuan ..万分抱歉。。实在是因为我们最近变大，然后有些地方没测到。测试覆盖不够全。我会尽快发一个新的版本。

嗯, 我先注释掉, 还好是布局组件不影响业务.

升级到0.0.9路径改为'element-plus'样式加载进来了，但部分组件依然不可用
总的来说最近element的更新都缺乏测试，还是退回到52版本等稳定再说吧

@dxy2233 这个插件是为了
import { ElButton } from 'element-plus'

这样的按需引入而做的。最近的发布确实缺乏测试，因为大部分改动都是基于打包文件的改动，而不是基于原有代码的改动，这部分的改动是只有上线之后才能看得到的，这点实在是抱歉。

哇, 菜单组件也报错

这一块 css 引入问题现在有什么解决方案吗

@zhangshichuan  可以这样
import { ElMenu } from 'element-plus'

const { ElMenuItem } = ElMenu

@zhangshichuan 可以这样
import { ElMenu } from 'element-plus'

const { ElMenuItem } = ElMenu

事实上 ElMenuItem 是没有任何单独的样式的，都是在 ElMenu 上，你可以按我这样先 Workaround 一下。造成不便真的是非常抱歉。🙇

好的,谢谢!

@zhangshichuan https://github.com/element-plus/element-plus/pull/3053 我已经检查了一遍遗漏掉的组件，是在不好意思。

@zhangshichuan element-plus/element-plus#3053 我已经检查了一遍遗漏掉的组件，是在不好意思。
BTW，目前最简单的方法是先不用这个插件，全量引入 CSS 就行，总之代码的按需加载是一定有的。

嗯. 我现在的做法就是全量引入组件和 css 了.  按需引入注释了的. 等过段时间再来搞. 辛苦!

@zhangshichuan 感谢理解，我也是第一次搞这个插件，有些边缘用例自己测不到（或者说是不会测）真的辛苦你们帮忙踩坑了，感恩 :pray:

vue3依赖es6语法，谷歌52及以上支持90% es6语法，转es5语法没任何意义

构建正式版没有被引入，开发版可以正常引入

repo: element-plus/vite-plugin-element-plus


text:
Implement support for multiple-table syntax on delete statements

Currently you are not able to create a delete statement, to delete from multiple tables, like in mysql documentation described: http://dev.mysql.com/doc/refman/5.7/en/delete.html#idm140368126356160
Is it possible to implement it?

Hi @Cruiser79!
Thanks, I'll take a look at my spare time. But if you have any idea or ready-to-submit pull request, it would be great!

Hi elgris,
to make a pull request, it is not clear to me, what is the best way, for the right method construct.
The main problem is, that in https://github.com/elgris/sqrl/blob/master/delete.go the sql is build with
sql.WriteString("DELETE FROM ")
Here we need somthing like
sql.WriteString("DELETE ")
sql.WriteString(b.deleteTables)
sql.WriteString(" FROM ")
and set deleteTables in an own method. If it is empty, everthing is, like before.
But i don't know, if this is the best way for this!?

repo: elgris/sqrl


text:
Fix typo for number of functions hits

Appears to be a typo with the FNH , lcov.info files with this token get a parse error
@eliasreis54

Hi @landonmr!!
Thank you so much for your contribution!
I think we should fix the tests...

oops will do!

Thanks @landonmr!

@eliasreis54 any idea when a new version will be pushed to pub.dev
Thanks!

@eliasreis54 Great thank you very much for the update and this awesome package!


text:
This lib doesn't seem to work atm

I get lots of errors, starting with
/mnt/d/Downloads/LearnWebGPU-Code-step095-emscripten/webgpu/include-emscripten/webgpu/webgpu.hpp:226:1: error: unknown type name 'WGPUComputePassTimestampLocation'; did you mean 'ComputePassTimestampLocation'?
  226 | ENUM(ComputePassTimestampLocation)
      | ^
/mnt/d/Downloads/LearnWebGPU-Code-step095-emscripten/webgpu/include-emscripten/webgpu/webgpu.hpp:104:10: note: expanded from macro 'ENUM'
  104 |         typedef WGPU ## Type W; /* W == WGPU Type */ \
      |                 ^
<scratch space>:325:1: note: expanded from here
  325 | WGPUComputePassTimestampLocation

Ehh, I see, the API is forever changing. I managed to generate new headers with this tool, but then other problems fallow with examples from tutorials, like issues with swapChains etc.

If dont aim for new wegpu headers, but use all from tutorial sources, I get :
/mnt/d/Downloads/LearnWebGPU-Code-step095-emscripten/webgpu/include-emscripten/webgpu/webgpu.hpp:839:1: error: use of undeclared identifier 'nextInChain'
  839 | DESCRIPTOR(RenderPassColorAttachment)
      | ^
/mnt/d/Downloads/LearnWebGPU-Code-step095-emscripten/webgpu/include-emscripten/webgpu/webgpu.hpp:77:17: note: expanded from macro 'DESCRIPTOR'
   77 |         Type() : W() { nextInChain = nullptr; } \
      |                        ^
/mnt/d/Downloads/LearnWebGPU-Code-step095-emscripten/webgpu/include-emscripten/webgpu/webgpu.hpp:839:1: error: use of undeclared identifier 'nextInChain'
/mnt/d/Downloads/LearnWebGPU-Code-step095-emscripten/webgpu/include-emscripten/webgpu/webgpu.hpp:78:36: note: expanded from macro 'DESCRIPTOR'
   78 |         Type(const W &other) : W(other) { nextInChain = nullptr; } \

Desktop version is working tho

Yeah given that the divergence between the standard that dropped SwapChains 6 months ago and Dawn that still did not, I started working on it upstream. ;) Hopefully I'll soon be able to resync the guide with the 3 versions Dawn/wgpu-native/emscripten!
BTW to ease the numerous generation of the header I had to do myself due to this ever changing API, I implemented a web frontend that you may appreciate: https://eliemichel.github.io/WebGPU-Cpp/

authors: eliemichel trsh

repo: eliemichel/WebGPU-Cpp


text:
MSID: 94616 Version: 1 DOI: 10.1101/2023.11.14.566992

MSID: 94616
Version: 1
Preprint DOI: https://doi.org/10.1101/2023.11.14.566992
Step 1. Awaiting reviews
Editorial to post reviews via hypothesis
Useful links:

DocMap: https://data-hub-api.elifesciences.org/enhanced-preprints/docmaps/v2/by-publisher/elife/get-by-manuscript-id?manuscript_id=94616
New model tracking: https://docs.google.com/spreadsheets/d/1_fHaoOy7hjyocptKtVJRijeNpUY4hBS7Ck_aVmx6ZJk/
Reviews on sciety: https://sciety.org/articles/activity/10.1101/2023.11.14.566992

For trouble shooting (e.g. no Docmaps available):

DocMap issue addressing: https://miro.com/app/board/uXjVNCwK6EI=/
Explore DataHub DocMaps API: https://lookerstudio.google.com/reporting/4c2f0368-babb-4beb-b5b3-497e7e7b0f08/page/ejphD
Unmatched submissions and preprints: https://lookerstudio.google.com/u/0/reporting/9f86204f-3bf7-477c-9b18-5c5ef141bf69/page/p_gxi57ha93c
Unmatched manuscripts spreadsheet: https://docs.google.com/spreadsheets/d/15QcK8w-ssB7109RQEDtFpJPZ0J5HTGxoHa_2TtpMBbg/edit#gid=1336081641

Step 2. Preview reviewed preprint
Production QC content ahead of publication
Instructions:

QC preview: https://prod--epp.elifesciences.org/previews/94616v1
Update ticket with any problems (add blocked label)
When QC OK, add QC OK label to ticket and add publication date and time to https://docs.google.com/spreadsheets/d/1amAlKvdLcaDp5W8Z8g77NmkwbMF5n_u89ArSqPMO8jg
Move card to next column
(At end of the day post link in #enhanced-preprint and ask for PDF to be generated)

Useful links:

Preprint DOI :  https://doi.org/10.1101/2023.11.14.566992
Confirm reviews returned by EPP: https://prod--epp.elifesciences.org/api/reviewed-preprints/94616/v1/reviews
To update the MECA path in the docmap: https://docs.google.com/spreadsheets/d/1mctCQuNFBjSn97Lihy7_vBO6z7-N-oqyLv4clyi6zHg

Step 3: Awaiting search reindex
This step adds the reviewed preprint to the homepage: https://elifesciences.org
The search reindex is triggered once an hour. We need the reviewed preprint to be indexed as the search application serves the journal homepage.
Useful links:

Jenkins pipeline to reindex search can be triggered sooner or monitored here: https://alfred.elifesciences.org/job/process/job/process-reindex-reviewed-preprints/

Step 4: Published! PDF requested
Waiting for PDF to be generated
Useful links:

PDF tracking: https://docs.google.com/spreadsheets/d/106_XeDjmuBae7gexOTNzg60lapeqjl2aRn9DzupGyS8/

Step 5: Introduce PDF to data folder and git repo
Upload PDF to relevent folder in git repo https://github.com/elifesciences/enhanced-preprints-data/
Step 6: Done!

[ ] Kettle is on!

@fred-atherden Julien Ochala's ORCID goes to Sylvain Giroud's ORCID instead, otherwise fine to QC for Tuesday.

repo: elifesciences/enhanced-preprints-import


text:
RT-629-post-BP-data:BP entry form, post data on logica for BP

Overview
Add function in fhir-data.service.ts  for post data on logical for BP.

How it was tested
Tested using Run showcase and cardiovascular-patient app
Checklist

[x] The title contains a short meaningful summary
[x] I have added a link to this PR in the Jira issue
[x] I have described how this was tested
[x] I have included screen shots for changes that affect the user interface
[ ] I have updated unit tests
[x] I have run unit tests locally
[ ] I have updated documentation (including README)

If the security hotspots are all HTTP protocol used in FHIR code system identifiers, you can mark those as safe.

When running the unit tests myself, I see some errors in the console from report-bp.component.spec.ts. Looks like you missed MatCardModule in the test module imports.

authors: semicolin yashpmohod

repo: elimuinformatics/charts-on-fhir


text:
Ecto.Multi.t type is no longer opaque

Closes #2693

:heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart:

authors: josevalim wojtekmach

repo: elixir-ecto/ecto


text:
Improve handling of arrays with empty values

The primary issue here is that Ecto removes "" as empty, but doesn't filter [""] to [] as well. This PR changes that behaviour.

I agree that explicit is better. But, a list of values is just that - a list of values. If a value inside that list would be considered "empty" when not in a list, it should be considered empty if inside a list. By considering them to be different, I think we're sacrificing predictability.
Instead of doing it automatically, would you consider another API for the same functionality? Maybe an option can be passed in alongside empty_values, or another changeset function?

To clarify, this PR does not make [] an "empty value". It simply strips "empty values" from a list of values, like so ->
%{"topics" => ["", "", "", ""]} -> %{topics: []}

It is something that can be trivially handled before calling cast, so I don't see a strong reason to support it in Ecto. As mentioned, it is not a very common use case and sometimes it is simpler to handle it  upstream. Thanks.

Okay, thank you

Just to add a voice on the not-touching-it side, I really really would not like 'empty' values being stripped from an array because the empty value is a valid value in an array and it's very presence is a marker that something is there but that something is just null or "" or so.

@OvermindDL1 yeah, I understand, thanks for sharing.
I've thought about it some more, and agree with @josevalim that it's not a good idea to do automatically.

authors: OvermindDL1 alizain josevalim


text:
ISA Investigation is being submitted as a ENA Study/Project

This is not needed.

Relates to this?
https://github.com/elixir-europe/MARS/issues/3

Get rid of it for now.

Shall we try to use ISA-JSON Study title as ENA Study/Project?

I think you comment is related to #3. This is related to 2 ENA studies/projects being created, one for ISA study and one for ISA investigation.

We yesterday discussed that the ISA study is not always representative as a title for the ENA study, and it might be better to let people consciously   fill it in.

authors: bedroesb floradanna kdp-cloud

repo: elixir-europe/MARS


text:
Repo.insert! doesn't respect NOT NULL columns with fallback

I see this was discussed before in #591. I'm on Ecto 1.0.6 though, and I was bitten by this issue, so maybe it recurred?
I added a column like:
alter table(:packages) do
  add :testcol, :string, null: false, default: "somedefault"
end

And I get this unexpected behaviour:
iex(1)> %Toolbox.Package{} |> Toolbox.Package.changeset(%{name: "a", hex_updated_at: "2015-01-01T00:00:00Z"}) |> Toolbox.Repo.insert!
[debug] BEGIN [] OK query=122.0ms queue=4.1ms
[debug] INSERT INTO "packages" ("description", "hex_updated_at", "inserted_at", "name", "testcol", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [nil, {{2015, 1, 1}, {0, 0, 0, 0}}, {{2015, 11, 17}, {22, 9, 9, 0}}, "a", nil, {{2015, 11, 17}, {22, 9, 9, 0}}] ERROR query=4.9ms
[debug] ROLLBACK [] OK query=0.3ms
** (Postgrex.Error) ERROR (not_null_violation): null value in column "testcol" violates not-null constraint

I would not expect the generated query to attempt to set any unspecified columns (so not "description" nor "testcol").
The changeset indeed ignores these unspecified columns:
%Ecto.Changeset{action: nil,
 changes: %{hex_updated_at: #Ecto.DateTime<2015-01-01T00:00:00Z>, name: "a"},
 …

But they do become part of the INSERT query for whatever reason.

@henrik insert will always insert all fields known to the model exactly because it is the first insert.

@josevalim Thank you. I now see that this behaviour is documented fairly clearly – I should have checked that. I assumed it was a bug because it was not intuitive to me.
It still isn't intuitive to me – in what situations is it preferable for Ecto to attempt to insert nil values into every unspecified column, instead of respecting any column defaults? I don't doubt it's well-considered, I just can't think of a scenario for it myself.

Ah, you can set a default: "something" in the model schema (i.e. not in the migration), and that will apply in this situation. So maybe the recommendation is not to rely on DB-level defaults, but instead use model-level defaults?

I encountered this earlier today as well. The behavior I was aiming for and expecting was to use a NOT NULL constraint with a database default value.
@henrik Thanks for noting the use of default: "something", that's the answer I was looking for.
However, the default: solution doesn't work for timestamps, as noted in the documentation. Is that part of the current set of changes around removing callbacks?

@sorentwo Happy it helped. And sad that two people were bit by the same thing. I think I would like it if this behaviour was changed but I don't have the bigger picture here I guess.
Defaults in the model are a little trickier if you add a NOT NULL column to a table that already has data, as I'm noticing now. Then I suppose you either need to duplicate the default in the migration as well, or maybe add it as a NULL column, assign the model default value somehow, then make it NOT NULL.

@henrik I got bitten by it a while ago too. @josevalim gave a workaround in that thread in case you're interested: https://groups.google.com/forum/#!topic/elixir-ecto/QLiLzbWsUPE
I looked at how we could improve the docs but nothing obvious came up. I definitely think we should do something though.

@stevedomin Thank you. I guess that thread is a better place to continue the discussion – I might write something there.

Is there any way we can use database defaults now that before_insert is deprecated? I'm having a rough time trying to perform a basic insert... I keep asking around but it seems like no one knows the solution.
  @primary_key false
  schema "upvote" do
    field :account_id, Ecto.UUID, primary_key: true
    field :suggestion_id, Ecto.UUID, primary_key: true
    field :created_on, Ecto.DateTime
  end

  def insert_changeset(upvote) do
    %__MODULE__{}
    |> cast(Map.from_struct(upvote), [:account_id, :suggestion_id], [])
    |> delete_change(:created_on)
  end

In particular, I want to remove the :created_on change. This isn't working when I call Repo.insert(changeset).
** (Postgrex.Error) ERROR (not_null_violation): null value in column "created_on" violates not-null constraint

Any help would be appreciated...

I updated to Ecto 2.0.0-beta and this issue is no longer occurring.

With 1.1 the solution to this issue is callbacks, even though they are deprecated.
With 2.0 fields that are nil and that don't have a default value are not sent to the database, which solves the issue entirely.

authors: divmgl henrik josevalim michalmuskala sorentwo stevedomin

repo: elixir-lang/ecto


text:
Weird 'Content-Length: n'$'\n' directories are created.

Environment

Elixir & Erlang versions (elixir --version): Elixir 1.16.2 (compiled with Erlang/OTP 26)
Elixir Language Server version: v0.21.3
Operating system: Microsoft Windows 11 Home (10.0.22631 version 22631) running Debian GNU/Linux bookworm 12.5 x86_64 on WSL2
Editor or IDE name (e.g. Emacs/VSCode): Neovim
Editor Plugin/LSP Client name and version: Native Neovim Lspconfig and Mason

Current behavior
Since a bit ago now when im just using the Language server in a normal mix new project it gets really slow and creates these weird 'Content-Length: number'$'\n'(the single quotes are in the directory name) directories in the root of the project. After a little while (just a few minutes) the LSP doesn't react to any new changes and just stops working completely.
[WARN][2024-05-27 21:41:18] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:19] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:19] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:20] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:20] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:20] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:20] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:21] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:24] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:24] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:24] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:24] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:24] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:24] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:25] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:25] ...lsp/handlers.lua:626	'warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:\n\n    def text do\n      """\n    contents\n      """\n    end\n\nInstead make sure the contents are indented as much as the heredoc closing:\n\n    def text do\n      """\n      contents\n      """\n    end\n\nThe current heredoc line is indented too little\n└─ nofile:21:24\n'
[WARN][2024-05-27 21:41:26] ...lsp/handlers.lua:626	'    warning: variable "contents" is unused (if the variable is not meant to be used, prefix it with an underscore)\n    │\n 20 │             contents = """\n    │             ~\n    │\n    └─ lib/gonew.ex:20:13: Gonew.Main.create_project/1\n'
[WARN][2024-05-27 21:41:26] ...lsp/handlers.lua:626	'    warning: variable "proj_name" is unused (if the variable is not meant to be used, prefix it with an underscore)\n    │\n 36 │   defp print_info(proj_name) do\n    │                   ~~~~~~~~~\n    │\n    └─ lib/gonew.ex:36:19: Gonew.Main.print_info/1\n'
[WARN][2024-05-27 21:42:07] ...lsp/handlers.lua:626	'Unmatched request: %{"id" => 81, "jsonrpc" => "2.0", "method" => "workspace/executeCommand", "params" => %{"command" => "editor.action.triggerParameterHints", "title" => "Trigger Parameter Hint"}}'
[WARN][2024-05-27 21:42:47] ...lsp/handlers.lua:626	'    warning: variable "proj_name" is unused (if the variable is not meant to be used, prefix it with an underscore)\n    │\n 38 │   defp print_info(proj_name) do\n    │                   ~~~~~~~~~\n    │\n    └─ lib/gonew.ex:38:19: Gonew.Main.print_info/1\n'
[WARN][2024-05-27 21:42:55] ...lsp/handlers.lua:626	'    warning: variable "proj_name" is unused (if the variable is not meant to be used, prefix it with an underscore)\n    │\n 38 │   defp print_info(proj_name) do\n    │                   ~~~~~~~~~\n    │\n    └─ lib/gonew.ex:38:19: Gonew.Main.print_info/1\n'
[WARN][2024-05-27 21:43:40] ...lsp/handlers.lua:626	'    warning: variable "proj_name" is unused (if the variable is not meant to be used, prefix it with an underscore)\n    │\n 42 │   defp print_info(proj_name) do\n    │                   ~~~~~~~~~\n    │\n    └─ lib/gonew.ex:42:19: Gonew.Main.print_info/1\n'
[WARN][2024-05-27 21:43:53] ...lsp/handlers.lua:626	'    warning: variable "proj_name" is unused (if the variable is not meant to be used, prefix it with an underscore)\n    │\n 42 │   defp print_info(proj_name) do\n    │                   ~~~~~~~~~\n    │\n    └─ lib/gonew.ex:42:19: Gonew.Main.print_info/1\n'
[WARN][2024-05-27 21:43:59] ...lsp/handlers.lua:626	'    warning: variable "proj_name" is unused (if the variable is not meant to be used, prefix it with an underscore)\n    │\n 41 │   defp print_info(proj_name) do\n    │                   ~~~~~~~~~\n    │\n    └─ lib/gonew.ex:41:19: Gonew.Main.print_info/1\n'
[WARN][2024-05-27 21:44:01] ...lsp/handlers.lua:626	'    warning: variable "proj_name" is unused (if the variable is not meant to be used, prefix it with an underscore)\n    │\n 41 │   defp print_info(proj_name) do\n    │                   ~~~~~~~~~\n    │\n    └─ lib/gonew.ex:41:19: Gonew.Main.print_info/1\n'
[WARN][2024-05-27 21:44:07] ...lsp/handlers.lua:626	'    warning: variable "proj_name" is unused (if the variable is not meant to be used, prefix it with an underscore)\n    │\n 42 │   defp print_info(proj_name) do\n    │                   ~~~~~~~~~\n    │\n    └─ lib/gonew.ex:42:19: Gonew.Main.print_info/1\n'
[WARN][2024-05-27 21:44:08] ...lsp/handlers.lua:626	'    warning: variable "proj_name" is unused (if the variable is not meant to be used, prefix it with an underscore)\n    │\n 42 │   defp print_info(proj_name) do\n    │                   ~~~~~~~~~\n    │\n    └─ lib/gonew.ex:42:19: Gonew.Main.print_info/1\n'
[WARN][2024-05-27 21:44:10] ...lsp/handlers.lua:626	'    warning: variable "proj_name" is unused (if the variable is not meant to be used, prefix it with an underscore)\n    │\n 42 │   defp print_info(proj_name) do\n    │                   ~~~~~~~~~\n    │\n    └─ lib/gonew.ex:42:19: Gonew.Main.print_info/1\n'
[WARN][2024-05-27 21:44:12] ...lsp/handlers.lua:626	'    warning: variable "proj_name" is unused (if the variable is not meant to be used, prefix it with an underscore)\n    │\n 42 │   defp print_info(proj_name) do\n    │                   ~~~~~~~~~\n    │\n    └─ lib/gonew.ex:42:19: Gonew.Main.print_info/1\n'
[WARN][2024-05-27 21:44:27] ...lsp/handlers.lua:626	'    warning: variable "proj_name" is unused (if the variable is not meant to be used, prefix it with an underscore)\n    │\n 42 │   defp print_info(proj_name) do\n    │                   ~~~~~~~~~\n    │\n    └─ lib/gonew.ex:42:19: Gonew.Main.print_info/1\n'
[START][2024-05-27 21:46:45] LSP logging initiated
[ERROR][2024-05-27 21:46:45] .../vim/lsp/rpc.lua:770	"rpc"	"/home/caarg/.local/share/nvim/mason/packages/elixir-ls/language_server.sh"	"stderr"	"Running /home/caarg/.local/share/nvim/mason/packages/elixir-ls/launch.sh\nPreferred shell is bash, relaunching\nLooking for ASDF install\nASDF install found in /home/linuxbrew/.linuxbrew/opt/asdf/libexec/asdf.sh, sourcing\n"
[ERROR][2024-05-27 21:46:45] .../vim/lsp/rpc.lua:770	"rpc"	"/home/caarg/.local/share/nvim/mason/packages/elixir-ls/language_server.sh"	"stderr"	"Installing ElixirLS release v0.21.3\n"
[ERROR][2024-05-27 21:46:45] .../vim/lsp/rpc.lua:770	"rpc"	"/home/caarg/.local/share/nvim/mason/packages/elixir-ls/language_server.sh"	"stderr"	"Running in /home/caarg/p/elixir/gonew\n"
[ERROR][2024-05-27 21:46:46] .../vim/lsp/rpc.lua:770	"rpc"	"/home/caarg/.local/share/nvim/mason/packages/elixir-ls/language_server.sh"	"stderr"	"Install complete\n"
[WARN][2024-05-27 21:46:47] ...lsp/handlers.lua:626	'    warning: variable "proj_name" is unused (if the variable is not meant to be used, prefix it with an underscore)\n    │\n 42 │   defp print_info(proj_name) do\n    │                   ~~~~~~~~~\n    │\n    └─ lib/gonew.ex:42:19: Gonew.Main.print_info/1\n'
[WARN][2024-05-27 21:47:03] ...lsp/handlers.lua:626	'    warning: variable "proj_name" is unused (if the variable is not meant to be used, prefix it with an underscore)\n    │\n 42 │   defp print_info(proj_name) do\n    │                   ~~~~~~~~~\n    │\n    └─ lib/gonew.ex:42:19: Gonew.Main.print_info/1\n'

I don't really know how to reproduce this. Out of nowhere this started happening while I was working on a mini project to get more familiar with Elixir and using it in Neovim. I just created a new project using mix and started working in it and this started happening.
Expected behavior
It should very much not create these weird directories (looks like a web request header or JSON thing) in the root of the project and should neither slow down tremendously to a complete stop after just a few minutes. Before this I've never had any issues with the LSP and it started out of nowhere.

I've figured it out. The program I'm making is creating a file and a directory with it and when the LSP is like pre-running it to check for runtime things and that it was creating those directories and also the files inside of it that the program should create.
The reason for the weird directory names is from it getting the directory name in the program from the first element in System.argv() which I guess it it the Content-Length header when it's ran by the LSP.
This does still need to be done something with because it can't just be creating directories willy-nilly (especially with these weird names because of System.argv()) and messing up projects.

Please share a repo that reproduces it.
elixir-ls doesn't run your program. It evaluates mix.exs and then run mix compile

Ping @DJAruun

authors: DJAruun lukaszsamson

repo: elixir-lsp/elixir-ls


text:
Put package name in correct place in mix.exs

ExDoc couldn't find package name because it was specified under docs and not in the project function.

:heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart:

authors: arkgil josevalim

repo: elixir-telemetry/telemetry


text:
Broken blog images

https://twitter.com/useraddvictor/status/1442625947216273408

Looks like a few blog posts are still using the old jekyll template tags, for example: https://github.com/elixirschool/elixirschool/blob/master/posts/2020-04-24-instrumenting-phoenix-with-live-dashboard.md#ports
I will update these today which should resolve the issue.

authors: doomspork kinson


text:
Nested Elm variable when using webpack2

I tried to reproduce this with the included webpack2 example but I couldn't get that one running.
The issue is that using webpack2 seems to nest the Elm javascript variable.
Example (working code):
var Elm = require('./Main')
Elm.Elm.Main.init({node: document.getElementById('main')});

Found this while upgrading elm-select here

Same here https://github.com/sporto/elm-webpack-serve-repro/blob/master/src/app.js#L5

PRs welcome

Have confirmed this is also happening with WP4 and Elm 0.19.

For those of us using es6 modules, this did the trick for me:
import { Elm } from '../elm/src/Main.elm'

Elm.Main.init({ node: document.getElementById('elm') })

The clunkier way would be:
import Elm from '../elm/src/Main.elm'

Elm.Elm.Main.init({ node: document.getElementById('elm') })

authors: RaniSputnik eeue56 embryCODE sporto zgohr

repo: elm-community/elm-webpack-loader


text:
Fix Keyboard.presses

The issue this pull request addresses can be demonstrated with this program (pasteable into http://elm-lang.org/try):
import Graphics.Element exposing (..)
import Keyboard

main : Signal Element
main =
  Signal.map show Keyboard.presses

What is expected is that whenever a key is pressed, the corresponding code is printed. But in reality the behavior depends on the browser, and in no browser does it correspond to what the documentation says. In particular,

in Firefox keys like a don't work, but special keys like the arrows do work,
in Chrome it is the other way round.

More specifically,

in Firefox key a gives code 0, while special keys give meaningful codes,
in Chrome key a gives a meaningful code, while special keys fire no event at all.

Error reports related to this have come up again and again. See also https://github.com/elm-lang/core/issues/326, https://github.com/elm-lang/core/issues/427, https://github.com/elm-lang/core/pull/435, https://github.com/elm-lang/core/issues/462, https://github.com/elm-lang/elm-compiler/issues/1069, https://github.com/elm-lang/elm-platform/issues/123, https://github.com/elm-lang/elm-lang.org/issues/440, https://github.com/elm-lang/core/commit/016d44a851fd3bcc4f5ffeef79431ac53add5e88.
This pull request here fixes the behavior. Of necessity, it does so in a way that will require a change to the signal's documentation. Because the signal's documentation claims something that is impossible to implement across current browsers, and likely was never true.
The main data and cause for all this is that Firefox and Chrome (and other browsers that behave like Chrome, while I haven't found a browser that behaves like Firefox here) behave quite differently concerning keydown, keyup, and keypress events, as follows:

On Firefox:

pressing an arrow key fires keydown and keyup with keyCode and which set to the same non-zero value, but charCode set to zero
pressing an arrow key fires keypress with keyCode set to the same non-zero value as above, but which and charCode set to zero
pressing a character key fires keydown and keyup with keyCode and which set to the same non-zero value, but charCode set to zero
pressing a character key fires keypress with which and charCode set to the same non-zero value, but keyCode set to zero

On Chrome:

pressing an arrow key fires keydown and keyup with keyCode and which set to the same non-zero value, but charCode set to zero
pressing an arrow key does not fire keypress at all
pressing a character key fires keydown and keyup with keyCode and which set to the same non-zero value, but charCode set to zero
pressing a character key fires keypress with keyCode and which and charCode all set to the same non-zero value

As a first thing to note, it will be impossible to let Signal.keypress have an event for arrow keys in Chrome. And Chrome is in its rights here, because that's how the specification says it should be. See https://developer.mozilla.org/en-US/docs/Web/Events/keypress, which says: "... is fired when a key is pressed down and that key normally produces a character value". So the only way to get consistent behavior across browsers here is to stop (Keyboard.presses in) Firefox from giving codes like 38 for up-arrow.
As a second thing to note, using keyCode to detect which key was pressed (as is currently done) will not work in Firefox for character keys. By looking at the above analysis, it would be okay (for the two browsers above) to simply use which, because it contains the right thing in all situations. One could be concerned, though, about historical or other browsers. So, to be on the safe side, I have used what jQuery uses. That is battle tested. And whenever which is defined (which is as far as I can tell always the case), it is equivalent to simply using which right away.
I don't see any reasonable alternatives to either using which or what jQuery uses. In particular, I don't think it makes sense to strive for a solution that "does not change anything of the existing behavior". As demonstrated above, there is no well-defined "existing behavior" at the moment, and probably never was.

@evancz, I have tried hard now to bring the above post (the one and only in this pull request) into a form that meets your requirements as set out here and here. If anything is missing or amiss, please let me know. Otherwise, let's finally get this fix into a core release. :smile:

Maybe using a polyfill approach is better? Pushing cross-browser concerns to the edges of the code base?

@marreman, I'm not sure what exactly you are proposing to do differently. The native Keyboard.js file is pretty much at the edge of the code base. Is your point just to move the one line change there into a separate function that can later be replaced by some more simple projection? Or some more substantial deviation from this specific pull request? (I don't think moving the Signal.filter from Keyboard.elm to some equivalent logic on the .js side would be worth it, but do you have a concrete proposal?)

After reading more on the subject, I realize that my comment was a bit premature. It is not as easy as I thought. keyCode, which and charCode are all deprecated and key is still just part of a working draft and only implemented in Firefox and IE9+.
I was thinking of something like this in some part of the code base that is dedicated to normalizing browser behavior:
Object.defineProperty(KeyboardEvent.prototype, 'keyCode', {
  get: function () {
    // make things consistent..
  }
});

I see. If the Elm runtime/core had such a centralized place for normalizing browser behavior, it would be good to handle this case there as well. But that's not how core is structured at the moment. If there is something to polyfill (like requestAnimationFrame), it happens near the use site, not in a centralized place. So the same makes sense to do here. And the specific issue that Firefox fires keypress on non-character keys couldn't be handled with your proposed approach anyway.
So I stand by the existing pull request here.

I'm sorry for bothering with ignorant comments. Just very eager to help! +1 for your proposal! :P

Oh, no problem, and no need to apologize.

Things are going to work different in an upcoming release. I think this issue will be less, but if it's not we can pick it back up on the appropriate repo.

It turned out that elm-lang/keyboard still has this problem, the issue did not turn out to be less with that release. As said in the previous comment, it should then be picked back up on that repo.
It now has been picked up there, so anybody who happens to come by here, be directed to:

https://github.com/elm-lang/keyboard/pull/6
and, related, also: https://github.com/elm-lang/keyboard/pull/5

authors: evancz jvoigtlaender marreman

repo: elm-lang/core


text:
Native review for simonh1000/file-reader

The package provides minimal-sufficient bindings for the FileReader javascript API to enable reading of local files from an Input element or from a drop action. It uses far less native code than previous attempts at the same functionality - indeed the entire native code is simply:
    function useReader(method, fileObjectToRead) {
        return Task.asyncFunction(function(callback){

            /*
             * http://caniuse.com/#search=filereader
             * main gap is IE10 and 11 which do not support readAsBinaryFile
             * but we do not use this API either as it is deprecated
             */
            var reader = new FileReader();

            reader.onload = function(evt) {
                return callback(Task.succeed(evt.target.result))
            };

            reader.onerror = function() {
                return callback(Task.fail({ctor : 'ReadFail'}));
            };

            // Error if not passed an objectToRead or if it is not a Blob
            if (!fileObjectToRead || !(fileObjectToRead instanceof Blob)) {
                return callback(Task.fail({ctor : 'NoValidBlob'}));
            }

            return reader[method](fileObjectToRead);
        });
    }

    // readAsTextFile : Value -> Task error String
    var readAsTextFile = function(fileObjectToRead){
        return useReader("readAsText", fileObjectToRead);
    };

    // readAsArrayBuffer : Value -> Task error String
    var readAsArrayBuffer = function(fileObjectToRead){
        return useReader("readAsArrayBuffer", fileObjectToRead);
    };

    // readAsDataUrl : Value -> Task error String
    var readAsDataUrl = function(fileObjectToRead){
        return useReader("readAsDataURL", fileObjectToRead);
    };

Everything else, including 3 examples is in Elm. I'm happy to patch the shiney new documentation viewer once native review is complete
cc: @danyx23

The native review pipeline is stalled. That's probably not news to you, but I wanted to leave a note on all the open reviews. I cannot speak for everyone, but as one of the reviewers I just want to speak up and say that I will not be doing more reviews. The warning about publishing native packages has changed, and Evan has mentioned multiple times in different places that one of his priorities for 0.17 is improving this process. So I'm going to wait for that. I'm sorry we cannot move forward with publishing your library, but my experience is that even if we review and approve it, it will become stuck waiting for Evan to whitelist it.

Sorry to keep this in limbo for so long. I am moving towards the plan outlined here and discussed a bit further in the 0.17 announcement. The right thing to for now is use ports or get advice on the mailing list or on slack.

authors: Apanatshka evancz simonh1000


text:
String.repeat gives unexpected results for very large numbers

Hi!
This is very much an edge case that I found while exploring, not when building something real 😄
One would think that the following is always true for any x:
String.length (String.repeat x "a") == max 0 x

But for some numbers it isn’t. Two such numbers are 999999999999999 (15 nines) and 99999999999999 (14 nines).
I ran String.repeat x "a" |> String.length in the Elm (0.19.0) repl, as well as "a".repeat(x).length in the Node.js (12.8.0) repl for some x values. These are the results:

x
Elm
Node.js

999999999999999
1
RangeError: Invalid string length

99999999999999
276447231
RangeError: Invalid string length

9999999999999
RangeError: Invalid string length
RangeError: Invalid string length

99999999
99999999
99999999

The cases where Elm returns unexpected lengths are due to 32-bit overflows.
99999999999999 % 2**32 == 276447231. Thanks to Markus Laire on Slack for finding this.
The cases where RangeErrors are thrown are due to JavaScript having a maximum string length. You can read more about it here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length. That page says that a maximum length has been specified since ES2016, but so far browsers follow their own rules instead.
For comparison, I checked what List.repeat and Array.repeat do for very large numbers. They keep going until out of memory.
Somewhat related note: It is possible to reach the maximum string length not only by using repeat, but also through concatenation.
# Node.js
> "a".repeat(2**30).length
RangeError: Invalid string length
> "a".repeat(2**29).length
536870912
> ("a".repeat(2**29) + "a".repeat(2**29)).length
RangeError: Invalid string length
> ["a".repeat(2**29), "a".repeat(2**29)].join("").length
RangeError: Invalid string length

# Elm
> String.repeat (2^29) "a" |> String.length
RangeError: Invalid string length>
> String.repeat (2^28) "a" |> String.length
268435456 : Int
> (String.repeat (2^28) "a" ++ String.repeat (2^28) "a" ++ String.repeat (2^28) "a" ++ String.repeat (2^28) "a") |> String.length
RangeError: Invalid string length
> [String.repeat (2^28) "a", String.repeat (2^28) "a", String.repeat (2^28) "a", String.repeat (2^28) "a"] |> String.join "" |> String.length
RangeError: Invalid string length

Interestingly, Firefox (71.0b1 (64-bit)) doesn’t even attempt creating a string via repeat if it’s going to be too long:
> "a".repeat(2**30-2).length
1073741822
> "a".repeat(2**30-1).length
RangeError: repeat count must be less than infinity and not overflow maximum string size
> ("a".repeat(2**30-2) + "a").length
InternalError: allocation size overflow

This could potentially be added to #377.

Not sure what fixes are possible here. Perhaps having a documented maximum string size. I'll add to the issue you mention.

Cool! Maybe we could make repeat consistently crash instead of sometimes producing way shorter strings at least (check the table above).

authors: evancz lydell

repo: elm/core


text:
Suggestion: Lantern/streetlight on T1 pole

(Have been asked to open it here instead of ELN1)
Hello! I thought it would be nice to have a streetlight/floodlight on a pole (I don't think I need to attach a picture of it, it is still relatively common).
The lantern should have a photocell (so it will burn only at night or rainy day in Minecraft) and a transformer so it could be powered directly from the grid. In my opinion it suits villages and small towns really well, and can ease on creating street lighting

Street lights don't need a transformer on every pole, in real life they have their own dedicated line on the pole that is set to the proper voltage they run at.

Street lights don't have their own transformer on every pole, in real life they have their own dedicated 120v to 277v or even 480v line on the pole or underground that they run on.

This really depends on the jurisdiction; often around where I live they are run directly from the same 240v lines as they run to houses for metered stuff. Don't ask if/how they meter it, because I don't know nor care for Eln2. Players can figure that out for themselves if they want it.

Also we should have a gui in which we can place a photocell / shorting cap / non shorting cap into if we want the light to run from dusk to dawn (photocell) or be on all the time (shorting cap), or be off all the time (non shorting cap).

I hate GUI's. If you want something like this, you're building a circuit to control it on the pole in some kind of circuit box. I'd much rather people build their own contraptions than give them canned inflexible garbage content. I was actually just talking with the other developers about this, and we're pretty sure we're actually just going to make poles literally just a "pole" and that you attach your own wires and stuff to it as you wish.

"Street lights don't have their own transformer on every pole": yes I know, the reason I suggested it because I am not sure, if it is possible to have multiple power lines on the same pole in ELN2. It would be great of course, but I have no idea if it's hard to implement (and if it gets implemented first of all!)
"If you want something like this, you're building a circuit to control it on the pole in some kind of circuit box": sounds interesting, thanks!


text:
allow switching devices when available

This adds a button to the camera service to allow cycling through the available video devices, usually front and rear cameras on mobile. If there is only one device, the button will not be shown.

Thanks, @pegler! I'll have a look at this PR now.

An improvement could be to get the list of devices via enumerateDevices before calling getUserMedia to ensure the device loaded initially is actually the first device in the list. It would also be a logical separation of code.

Seems like the Travis CI build is just pending because of ongoing issues: https://www.traviscistatus.com/incidents/g9xm3l02dknv.
Looks good to me locally, but I'll merge it after the build has passed.

authors: AnandChowdhary pegler

repo: elninotech/uppload


text:
Linking error

Hey, I'm kinda new to C++, and I've been trying to include your .hpp file in my project and it gave me these linking errors:
I've included the file in the project and the IDE recognizes it, but It gives these linking errors when I try to build it.
Do you have any tips to fix this issue?

#pragma comment(lib, "Ws2_32.lib")

Yes, you have to link ws2_32.lib to your executable.

Thank you so much! It works! 😀😀

authors: 805436085 elnormous zsoltardai

repo: elnormous/HTTPRequest

license: Unlicense


text:
Merge authoring tools into a single command.

For historic reasons, mainadm, studentify, linearize and delinearize are separate executables. We want to merge them into a single executable, with different subcommands.
At the same time, we want to split the code in two modules: a library with purely the operations, and an SBT part that integrates the library into SBT. This allows the library to also be used outside sbt, for example by the detached mode student client.
This will also reduce duplicate code.

That's been done in CMT 2.0 (the command is now cmta which uses subcommands. @eamelink

authors: eamelink eloots

repo: eloots/course-management-tools


text:
🛑 SSO HTTPS Port is down

In abf7d05, SSO HTTPS Port ($SSO_IP) was down:

HTTP code: 0
Response time: 0 ms

Resolved: SSO HTTPS Port is back up in 32697b5 after 5 minutes.

repo: elp-th/upptime


text:
CI for Node

Adding node.js

test/game.test.js is failing

repo: elthenino/github-actions-for-ci


text:
A mechanism to trap "interrupts" would be useful

A new Elvish user recently asked this question on the IM channels:

Hi, people. Is it possible to run some commands when user interrupts script execution (presses Ctrl+C)?

That isn't possible today. The obvious solution is something like the POSIX shell trap command. That, however, is not portable to platforms like MS Windows since they don't support UNIX signals. It is also frequently abused, in my experience, by people trying to capture signals like SIGFPE and SIGSEGV which makes no sense in a command shell.
As a grey beard who has been using UNIX systems since the early 1980's I've always found the POSIX shell trap command problematic. I don't think we should model an Elvish solution on that implementation. It seems to me the question is whether handling "interrupts" (i.e.., the UNIX SIGINT and Windows equivalent) should be the responsibility of the try { ... } catch { ... } mechanism or whether a separate mechanism is preferable. One interesting question is what, if anything, to do regarding other "interrupt" type signals on UNIX systems such as SIGQUIT, SIGTERM and SIGHUP.

I think the obvious solution to this problem, which @xiaq seems to have considered a bug in the past, would be fixing #954. Then the defer command should work as expected.

repo: elves/elvish


text:
Submit notebook/script dialog validation can be improved

Describe the issue
The submit feature for notebooks and scripts does not validate its dialog input fields.

Compared to the Pipeline Editor validation:

To Reproduce
Steps to reproduce the behavior:

Open a notebook or script editor
click the submit button
Add a negative value to the CPU field
The Ok button is still enabled

Expected behavior
The Ok button should be disabled should the user type an invalid input to any field
Deployment information
Describe what you've deployed and how:

Elyra version: 2.2.1
Operating system: MacOS
Installation source: PyPI (in a conda environment)
Browser: Chrome

As a backup, the validation service does check for negative values in the resources when submitting a standalone pipeline

authors: akchinSTC karlaspuldaro

repo: elyra-ai/elyra


text:
URL pipeline catalog doesn't reflect updates on remote side

Describe the issue
URL pipeline catalog doesn't reflect updates on remote side
To Reproduce
Steps to reproduce the behavior:

provide url with kfp pipeline yaml
create url catalog using elyra ui
use component (e.g. submit to kfp)
change kfp pipeline yaml (contents of url)
changes are ignored

Workaround: Delete url component catalog and recreate
Expected behavior
Changes are reflected (e.g. new kfp yaml submitted to kfp)
Deployment information
Describe what you've deployed and how:

Elyra version: v3.11.1
Operating system:linux
Installation source: pypi
Deployment type: local

Pipeline runtime environment

Kubeflow Pipelines build version dev_local DEX_STATIC_PASSWORDS

Runtime configuration settings

I thought there was a way to force a catalog refresh - do you see such an option available within the context of the catalogs?

You are right, there is:

reload all catalog entries
reload a single catalog entry

Depending on the catalog type it might take a little bit for the changes to be reflected in the pipeline editor.

I'm guessing that you saw the functionality if you are using version version 3.7 or above, but am not completely sure whether the issue you are reporting is that the outdated component definition is rendered when you view/use if the the pipeline editor. In case it is, I created https://github.com/elyra-ai/elyra/pull/2997 to document the feature and included important disclaimers that explain why the pipeline editor might not render what you expect.
We do have an open requirement to expose the catalog load status that should remove some of the current uncertainty.

please ignore - problem sat in front of the keyboard - thanks for your help and sorry for wasting your time @ptitzler et. al.

authors: kevin-bates ptitzler romeokienzler


text:
Rename repository and package

Because of reasons; https://github.com/pugjs/jade/issues/2184, Jade is being renamed to Pug in the not so distant future. At this point jade-lint will be deprecated in favour of pug-lint.
I'll keep you posted as to when this is happening

Thanks, we'll keep an eye out.

pug-lint@2.1.1 has now been published, jade-lint will be deprecated at some point

Thanks @benedfit, I'll go around our repos with my Renamer3000 soon.

Hey @benedfit, I renamed both the repository and the package is also published under the new name. Thanks for the heads up.

authors: benedfit jzsfkzm

repo: emartech/gulp-jade-lint


text:
Idiomatic way of enabling the cpu-net core on nRF5340

In order to start the  cpu-net core on the nRF5340, the cpu-app core must clear the bit FORCEOFF of the register APPLICATION.RESET.NETWORK.
See

https://infocenter.nordicsemi.com/pdf/nRF5340_PS_v1.3.1.pdf
Currently I didn't find a way to cleanly access the RESET peripheral.
I found the generated PAC types, but not how to access them as they are not (seems not to be?) exposed in HAL Peripheral object.
Am I missing something?
Or the implementation of this register is simply missing in the HAL?
If yes, I would be happy to help. Is there some resource on how registers should be exposed in the HAL?
I was able to access the register as follow:
unsafe {
    ((0x5000_5000 + 0x614) as *mut u32).write_volatile(0);
}

...but this is hardly the idiomatic way of doing things 😝

use unsafe to get access to the registerblock.
unsafe { &*embassy_nrf::pac::RESET::PTR }.network.forceoff.write(...);

I found the generated PAC types, but not how to access them as they are not (seems not to be?) exposed in HAL Peripheral object.

the reason is embassy HALs don't use the PAC owned singletons, they create their own. See here for the reasoning.
RP2x and STM32 are using PACs generated by chiptool so you don't need unsafe, but embassy-nrf is still using the svd2rust-generated PACs from nrf-rs.

use unsafe to get access to the registerblock.
unsafe { &*embassy_nrf::pac::RESET::PTR }.network.forceoff.write(...);

I found the generated PAC types, but not how to access them as they are not (seems not to be?) exposed in HAL Peripheral object.

the reason is embassy HALs don't use the PAC owned singletons, they create their own. See here for the reasoning.
RP2x and STM32 are using PACs generated by chiptool so you don't need unsafe, but embassy-nrf is still using the svd2rust-generated PACs from nrf-rs.

Thank you for the explanation and input, definitely a cleaner way to access the register 👍
I'm still a bit confused though, why then e.g. SERIAL0 or NVMC are available in Peripherals ?
Is it because RESET is not consider to be peripheral somehow, or because embassy-hal doesn't have an "abstraction" for such kind of peripheral?
I couldn't find where a peripheral kind of implements an embassy-HAL trait, I got lost in macros :)
Thank you @Dirbaio 🙏 for your time and I hope this will be helpful to others as well :)

I'm still a bit confused though, why then e.g. SERIAL0 or NVMC are available in Peripherals ?

they are, but they're defined by the HAL, they're not the PAC ones.
The design of embassy HALs is to not use PAC owned singletons at all, for these reasons and for usability reasons. For example, the PAC has a single singleton for the whole PPI, and two singletons for GPIO port 0 and port 1. That doesn't match how you as a user want to manage ownership, you want to own individual pins or PPI channels. Using the PAC singletons forces the HAL to require useless boilerplate like "take the GPIO P0 peripheral, split it in pins, and then you can own individual pins". If the HAL defines its own singletons, everything can come pre-split nicely in Peripherals, no boilerplate.
If you look at the rp or stm32 PACs they don't have singletons at all, you can just go and do a register write, no unsafe needed. For nrf for historical reasons we're still using a PAC with singletons, just that embassy-nrf pretends they don't exist and bypasses them with unsafe. This has the unfortunate consequence that the user must also use unsafe to access registers. This will go away when we switch to a nRF PAC generated by chiptool. I've sort of started work on it here, but it needs porting the entire HAL to the new PAC which is annoying.

Can you point out to the bit that allows you to state

RESET is not there is because there's no HAL driver for it

Where can I see that for SERIAL0 there is a HAL driver available? I imagine that there is somewhere a HAL trait which is implemented, but I couldn't track it down yet...
Yes I get that, the embassy-HAL decision on not using owned singletons makes sense to me.
Maybe I could build on the work you started to port the nRF PAC from svd2rust to chiptool, it could be a good way to get deeper into some implementation details.
I would prob. need some guide to be able to effectively start with it though.

"SERIAL" is a peripheral that can do UART, SPI or TWI (i2c), master or slave, so it's usable with all 5 drivers: https://github.com/embassy-rs/embassy/blob/main/embassy-nrf/src/chips/nrf5340_app.rs#L395-L418 . It's a bit confusing because Nordic rarely refers to it as "SERIAL" in their docs, they call it "UART" or "SPIM" or whatever but if you look at the peripheral address it's the same, ie they're all actually a single peripheral that has different "modes".

Maybe I could build on the work you started to port the nRF PAC from svd2rust to chiptool, it could be a good way to get deeper into some implementation details.

There's mainly two things to do:

Make nrf-pac support all nRF chips. The PAC in the nrf-pac repo currently supports only nrf52840. The best way to do it is probably same as we did in rp-pac to support rp2040 and rp235x: generate the PACs into a subfolder and manually write a lib.rs that exports the enabled one.
Port embassy-nrf to the new PAC. This is mostly mechanical changes, the syntax for chiptool register access is slightly different than svd2rust's.

Thanks to #3498 it is now possible to do:
    pac::RESET
        .network()
        .forceoff()
        .write(|w| w.set_forceoff(reset::vals::Forceoff::RELEASE));

authors: Dirbaio igiona

repo: embassy-rs/embassy