text:
Added tzinfo to requestContext fields

Bruno,
Here are some changes which seem to correct the missing timezone behavior of the smartSummarize function.
I added the tzinfo as a value to the requestContext dictionary in app.py.
I used this tzinfo in functions.py to add tzinfo to the smartSummarize function.
I also noticed that some datapoints (usually the last one in my experience) are missing timestamp data in the smartSummarize function, so I added a quick check to ensure they are present.
This bug is discussed here:
https://github.com/brutasse/graphite-api/issues/51
I've tried to ensure that this patch passed tox testing.  Travis-CI testing still seems to fail based on DeprecatedWarning messages in the setuptools module.  I have patches to the tox.ini file if you are interested.
Thanks for your time and consideration!
--Geoff Thornton

Thanks Geoff! I made a minor comment. If you can address it (simply make a new commit and push, it'll update the pull request.
It would be great to have a test case that reproduces the issue.

I'll see if I can do a test case.  I was testing out this code with InfuxDB as the backend using a forked backend, but if you'd like me to work more on providing a specific test case / unit test, let me know and I'll work on it...

Here's a minimal addition to test_smart_summarize that triggers the error and that should pass with your patch. Feel free to integrate it directly in your pull request:
diff --git a/tests/test_functions.py b/tests/test_functions.py
index 43ed644..f9efff8 100644
--- a/tests/test_functions.py
+++ b/tests/test_functions.py
@@ -1007,6 +1007,10 @@ class FunctionsTest(TestCase):
         summ = functions.smartSummarize(ctx, series, '5s', 'min')[0]
         self.assertEqual(summ[:3], [42, 47, 52])

+        # Higher time interval should not trigger timezone errors
+        functions.smartSummarize(ctx, series, '100s', 'min')[0]
+
     def test_summarize(self):
         series = self._generate_series_list(config=[list(range(99)) + [None]])

Bruno,
I've added your additional test into the test_smart_summarize function.  I had to import pytz locally (which I normally don't like doing) as I couldn't find any established tzinfo data in the testing modules.  If you have a better suggestion, I'm all ears ;-)

Bruno,
Let me know if there is anything else you'd like to see added or modified... I'm happy to do whatever you think is best regarding this changeset.
Thanks!
--Geoff Thornton

Thanks Geoff, looks great! Why did you have to import pytz though? I already see it being imported at the top of the file.

Ah wait, it's not present in your repository but in master it's here.
Could you update your fork to include the upstream changes?
git remote add upstream https://github.com/brutasse/graphite-api.git
git fetch upstream
git merge upstream/master
git push

Ah, thanks for the catch!  I thought I was updated to the latest master, but I'll update right now and ensure I'm in sync with your code ;-)
Thanks again!!

When I ran those commands you gave me, it showed that your upstream was already added.  When I tried to push, I got a message that it was already up to date:
> git remote add upstream https://github.com/brutasse/graphite-api.git
fatal: remote upstream already exists.

> git fetch upstream
> git merge upstream/master
Already up-to-date.

> git push
Everything up-to-date

However, I was able to run this command and merge your upstream master:
git pull https://github.com/brutasse/graphite-api.git
I then pushed the changes to origin/master and it looks like I am up-to-date now ;-)
The changeset seems to reflect the proper delta and I do see the import pytz at the top of the file.
Thanks for all of you help and guidance!!

Okay looks like all of the build tests passed ;-)
I'm still learning how to collaborate with others in GitHub, so thanks again for your patience... I think the problem was that Dieterbe/graphite-api is is 106 commits behind brutasse:master.  That probably got me out of sync.  Normally I do work with git and GitHub on my own projects, so I don't have a lot of experience with forking other's code and requesting pull requests.
I am very thankful for your continued involvement and I'm sure I speak on behalf of the community that we appreciate the time and effort you've spent in creating and maintaining this project ;-)
Thanks again!
--Geoff Thornton

Great! I'm glad this project is useful. Thanks for tackling this issue!
Bruno

authors: brutasse winguru

repo: brutasse/graphite-api


text:
Slovenian translation

Helo, guys!
Since i use this card with joy, i translated it to my local language.  Since i'm not skilled in github i don't know what to do to upload new files (two of them: sl.json and sensor.sl.json from translations folder), so some guidance would be nice. I can, say, send them to someone's email, too.
Thanks!

If you want to learn how to contribute to github (could be fun), then you can find some videos or blogs describing that.
In a nutshell, you create a fork - that would basically make a snapshot of the project and make it your own repository.
Then you make the changes - typically you'd make a branch and you add or change the files and commit the changes.
And then you create a pull request to pull it back to the base repository. I'll be notified (similarly to how I got this question), I'll review that, confirm the merge and it will become part of the next release. And you'd be officially the contributor.
If this does not sound like fun, you can just upload them somewhere online (you can even create them as (GitHub Gists)[https://gist.github.com/] and send me the links, I will copy them over manually.
Thanks for your help.

Well, i did "something"...
check out if it's ok...

I see that you already did the update...thanks!
in the meantime i wonder: are language files in folder www/community/garbage-collection-card now obsolete? I've had words "today" and "tomorrow" translated there, but i think that after last update they stopped working (that's why i digged into it and translated whole thing, not just those two words). I gues that you moved language files on new location with latest update, correct?

I do not think they are. The integration does not really deal with the front-end, so the translation is for the configuration. And in case you use verbose state for the today/tomorrow state.
But if you use the garbage collection card, that one has own localization for the front end and is maintained by @amaximus. And in such case I do not think you use the verbose state anyway.

Aha... i think that i "messed up" two different things: your integration and amaximus's custom card. Currently i don't use his card, but i rather use  "custom button card".  And i use verbose mode.
Now it's all clear. Thanks!

source: gharchive/issue

license: MIT

license_type: permissive

license_source: github-api


text:
No License

This repository has no license. Am I allowed to relicense it to some FOSS license GPL/BSD (I don't really care) to fork it and base some other functionality on it?

I'm not super familiar with my options. I see MIT a lot so I'll probably go with that. Any concerns?

I think GPL and MIT/BSD are the most common ones. The main difference is that the GPL is viral in a sense that all derived works also need to be licensed under GPL, while MIT/BSD allows everybody to keep derived works proprietary.

Fixed.

authors: brycedrennan pstn

repo: brycedrennan/eulerian-magnification

license: mit

license_source: bigquery


text:
On-the-fly generation of extrae.xml configuration

Since the Extrae process is controlled from within Julia, we could programatically configure Extrae by generating a extrae.xml file at run-time.

If we want the extrae.xml configuration be transparent to the user, why don't we just use environment variables to set everything up and forget about the XML. We just should set them before initialization.

My only concern is if everything that can be configured via XML, can be configured via environment variables. If so, I'm all in.

authors: clasqui mofeing


text:
describe compatibility (provide examples) with envconfig

works great with kelseyhightower/envconfig!

but does it really

repo: bsdlp/config


text:
Add auto-login and ddev launcha, fixes #4, fixes #1, fixes #3

This spiffs this up quite a lot

#1 - Now has auto login, thanks to @wotnak in https://github.com/bserem/ddev-adminer/issues/1#issuecomment-1079435698
#4 Moved to a less-used port
#3 - adds more significant tests
Adds ddev launcha -a (or ddev launcha --adminer)

You can test this by

Checking out this PR and using ddev get /path/to/checkout/dir or
ddev get https://github.com/rfay/ddev-adminer/tarball/20220605_auto_login

Hoping for your review @bserem @wotnak.
I see tests aren't running on this @bserem - If you have turned off github actions, could. you turn it on again please?

Tests enabled again. I've been inactive for a while, several things on my shoulders atm.

Just tried this but am getting an error.

Confirmed project works OK

$ ddev start
...
Your project can be reached at https://adminer-demo.ddev.site

Add admin via PR

$ ddev get https://github.com/rfay/ddev-adminer/tarball/20220605_auto_login
...
Downloaded add-on https://github.com/rfay/ddev-adminer/tarball/20220605_auto_login, use `ddev restart` to enable.

Restart project

$ ddev restart
Failed to restart adminer-demo: container(s) failed to become healthy after 61 seconds. This may be just a problem with the healthcheck and not a functional problem. container 'adminer' exited, please use 'ddev logs -s adminer' to find out why it failed

Get error

$ ddev logs -s adminer
/usr/local/bin/entrypoint.sh: line 14: can't create plugins-enabled/001-tables-filter.php: Permission denied

OS: Ubuntu 20.04 via WSL2 on Win10
DDEV:  vHEAD-486d701
config.yaml
php_version: "7.3"
database:
  type: postgres
  version: "10"

Same error on another modern project:
$ ddev logs -s adminer
/usr/local/bin/entrypoint.sh: line 14: can't create plugins-enabled/001-tables-filter.php: Permission denied

./.ddev/config.yaml

name: dev93
type: drupal9
docroot: web
php_version: "8.0"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
database:
  type: mariadb
  version: "10.3"
nfs_mount_enabled: false
mutagen_enabled: false
use_dns_when_possible: true
composer_version: "2"
web_environment: []
nodejs_version: "16"

I saw this too, and it's what made the tests fail. Was working before, not sure what changed. Will return, thanks for trying it out!

Confirmed working

Project 1

Drupal 9.3
PHP 8.0
Maria 10.3

Project 2

Laravel 7.2
PHP 7.2
Postgre 10

It did not auto-login, but it did populate the login screen with correct credentials; I had to click login button

It displayed the UI in Japanese by default (I use Japanese OS) 👍

One "issue":

If I change the UI to English, I can't logout. I am redirected to the login screen, and it auto-login me back to the DB page.
If I change the langauge to Japanese and logout, I'm redirected back to the login screen

Perhaps this is related to the way you "auto-login" which is why it originally didn't auto-login me to begin with.
It also does this with Arabic, Thai but not German.
ddev version vHEAD-486d701

Thanks @tyler36 - Lots of languages!

@bserem Please give this a try, and let's promote this when you think it's good.

source: gharchive/pull-request

authors: bserem rfay tyler36

repo: bserem/ddev-adminer


text:
Markdown:  refLink avoid explicitly use of  homePageTitle

instead of explicitly write [${homePageTitle} - page Title]  we write  [page Title] and will be mapped to [${homePageTitle} - page Title]

fixed on feature branch issue#98 merged to develop (commit a064152a3ea72c3a27f32f65849b17473c141234)

repo: bsorrentino/maven-confluence-plugin


text:
Allowing literal values for file type OSGi configs.

I need to be able to set the necessary OSGi configs for the S3SharedDataSource, but the puppet module will change the data I provide in an unexpected way:
This is the hiera data:

org.apache.jackrabbit.oak.plugins.blob.datastore.SharedS3DataStore:
path: "%{lookup('profiles::aem::instance::home')}/datastore"
s3Bucket: "387323646340-%{facts.ec2_tag_aem_environment}-aem-datastore"
s3Region: "eu-west-1"
connectionTimeout: '120000'
maxConnections: '40'
maxErrorRetry: '10'
socketTimeout: '120000'

This is the resulting OSGi config:
service.pid="org.apache.jackrabbit.oak.plugins.blob.datastore.SharedS3DataStore"
path="/data/apps/aem/datastore"
s3Bucket="387323646340--aem-datastore"
s3Region="eu-west-1"
connectionTimeout=L"120000"
maxConnections=L"40"
maxErrorRetry=L"10"
socketTimeout=L"120000"
However, values with a 'L' prefix should be normal strings for the plugin to work.
So this pull request would allow me to specify the values in a literal way, without them being changed. The change should also be backwards compatible.

Can you write some test cases to go along with this?
Also: You should open a ticket against Jackrabbit. Properties that are numbers should accept numbers (as well as strings, if desired). Here's a link to the underlying code having the issue:
https://github.com/apache/jackrabbit-oak/blob/trunk/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/Utils.java#L198

Sorry about failed builds. I was having trouble with some of the ruby gems on my workstation.
Hopefully the tests I added are sufficient.

Hi, any updates on this issue?

authors: bstopp stevengssns

repo: bstopp/puppet-aem


text:
Support a matrix of operating system and node version images

Now that we have what appear to be reasonable Node.js images for centos7, it's time to expand our horizons a bit. I would like to restructure this project so that we can produce a full set of images (both ONBUILD and s2i) for Node 4, 5, 6, 7, etc. with each of the following operating container images:

CentOS
Fedora
RHEL
rhel7-atomic

I have created a branch where I have the rhel7-atomic image working. However to really do this correctly, we should probably rethink the structure and build process. Since each OS has different requirements, there should probably be a base Dockerfile for each OS - probably within an OS-specific directory.
During this reworking, we need to also be thinking about versioning for the repo, and what our process is so that when we have this completed we can tag the repo with 1.0 or whatever. As @lholmquist mentioned earlier, we could also perhaps tag our docker images on hub.docker.com with the commit hash for the repo.

https://github.com/bucharest-gold/origin-s2i-nodejs/commit/42baffac6a7bb56dc42759415e8bb718e62c7d9a

authors: helio-frota lance


text:
🛑 Mastodon is down

In 16388ea, Mastodon (https://mastodon.gruezi.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Mastodon is back up in 6b394c6 after 120 days, 5 hours, 20 minutes.

repo: buckbanzai/status-gruezi-net


text:
Hide functionalities from the Training module #2

AS AN NLP Model Trainer
I WANT TO see only relevant and functionally working menu tabs
SO THAT bot designing and training would be smoother
Acceptance Criteria

[ ] To-be hidden functionalities must be easily re-adopted in later stages

GUI
All those things should be hidden in Stage and PROD and remain visible in TEST

[ ] Hide tab "Teemade järeltreenimine"
[ ] Under tab "Kasutuslood" - hide "vestlusvood"
[ ] Under tab "Kasutuslood" change the title from "Vestlusvood ja reeglid" to "Reeglid"
[ ] Hide tab "Vormid"
[ ] Hide tab "Mälukohad"
[ ] Under "Teemade ülevaade" remove columns "Täpsus", "Saagis", "Soovitus"
[ ] Under "Teemade ülevaade" remove rows "accuracy", "macro avg", "weighted avg", "micro avg"

These AC's 1, 4, 5 will be handled on the environment side @KlviG

repo: buerokratt/Training-Module


text:
Update bazel and deps

This modernizes the bazel setup to support 7.x, still using the
WORKSPACE

this currently includes https://github.com/bufbuild/protoc-gen-validate/pull/1111

repo: bufbuild/protoc-gen-validate


text:
StateError fix in _createEvent method in client.dart

Goal

StateErrors were being thrown from calling .first on an empty list in the method Future<BugsnagEvent?> _createEvent(.
Design

buildID is nullable anyway. bugsnag probably expected it'd be null because it's null on the first element of error.stacktrace instead of from error.stacktrace being empty. If you all want to fix it a different way, that's fine. This PR can just help point out what's wrong.
Also, if you don't want the import for 'package:collection/collection.dart';, you can change it something else like
final String? buildID;
if (error.stacktrace.isNotEmpty)  {
  buildID = error.stacktrace.first.codeIdentifier;
}

Changeset

I used a method from collection.dart that doesn't cause StateErrors when trying to get the first element of a List. Because that method can return null, I added ? before .codeIdentifier. Also I removed import 'dart:ui'; because it was unused.
Testing

I tested throwing deliberate errors in my app locally and saw that they were successfully reported to bugsnag. Then I switched my production app to using my forked copy of the bugsnag_flutter repo.

Here's the associated issue I raised
https://github.com/bugsnag/bugsnag-flutter/issues/186

Also note that I'm hoping you all will figure out why error.stacktrace is empty in the first place and fix that on your own, assuming that it's really not supposed to be empty. If it's allowed to be empty, then you all should double check your library for places where you call things like .first and .firstWhere, since those will throw errors on empty lists.

repo: bugsnag/bugsnag-flutter


text:
Unable to resolve module @unimodules/core with Expo SDK 43 expo-constants "~11.0.1"

Describe the bug
Unable to resolve module @unimodules/core from /path-to-app/node_modules/@bugsnag/expo/node_modules/expo-constants/build/Constants.js
Constants.js tries to import from @ unimodules/core, which is deprecated from expo SDK 43 (e.g. described here, everything was moved to expo-modules-core) https://blog.expo.dev/whats-new-in- expo-modules-infrastructure-7a7cdda81ebc
The lib seems to use an older version of expo-constants, because in e expo-constants version "~ 12.1.1" it already gets imported from expo-modules-core. what options do I have here?
Steps to reproduce

Update expo sdk 43
Install bugsnag
expo install expo-constants
See error

Environment

Bugsnag version:@bugsnag/expo": "^7.13.2",  "@bugsnag/js": "^7.13.2", "@bugsnag/plugin-react": "^7.1.0",
Browser framework version (if any):

react-native: "0.64.2",

Device (e.g. iphonex): iPhone 12 simulator

Error messages:
Unable to resolve module @unimodules/core from /Users/leonie/Repos/aivy-multi-app/node_modules/@bugsnag/expo/node_modules/expo-constants/build/Constants.js: @unimodules/core could not be found within the project or in these directories:
node_modules/@bugsnag/expo/node_modules/expo-constants/node_modules
node_modules/@bugsnag/expo/node_modules
node_modules
If you are sure the module exists, try these steps:

Clear watchman watches: watchman watch-del-all
Delete node_modules and run yarn install
Reset Metro's cache: yarn start --reset-cache
Remove the cache: rm -rf /tmp/metro-*

1 | import { CodedError, NativeModulesProxy } from '@unimodules/core';
|                                                 ^
2 | import { Platform, NativeModules } from 'react-native';
3 | import { AppOwnership, ExecutionEnvironment, UserInterfaceIdiom, } from './Constants.types';
4 | import ExponentConstants from './ExponentConstants';

Thanks for opening this issue - I'm seeing the same error in Xcode Logs using Expo's EAS build system.

I am also having Expo SDK 43 build errors with Bugsnag due to a dependency on an old version of expo-crypto:
Couldn't install: EXCrypto » UMCore. Ensure the CocoaPod "UMCore" is installed in your project, then run `npx pod-install` to try again.

Issue stems from this:
https://github.com/bugsnag/bugsnag-js/blob/2503f326a6f10d014b73ac87b8173ea18edef338/packages/delivery-expo/package.json#L21

Hi @koch-aivy, as noted above we're currently working on Expo 43 support under #1556. This should be available in the next release.

Hi @koch-aivy - the fix for this was released in v7.13.3 🎉

authors: dpolivy kevinavery koch-aivy luke-belton yousif-bugsnag

repo: bugsnag/bugsnag-js


text:
Option to disable syslog() call

Description

Option to disable the syslog() call in Bugsnag\Middleware\DiscardClasses.
Describe the solution you'd like

A configuration flag to enable/disable the syslog call.
Describe alternatives you've considered

Patching vendor/ files... please no.
Additional context

Would be nice to have, not must have.

Hi @alcohol, thanks for the suggestion! Can you tell us a little more about why you think this feature would be useful? For example are you getting spammed with large numbers of these log messages?

Yeah, unfortunately. My client has a legacy application that needs a lot of patching and fixing, and this noise is making it a bit awkward to spot other issues.
We only discard the following classes in my client's codebase:
- Symfony\Component\HttpKernel\Exception\NotFoundHttpException
- Symfony\Component\Security\Core\Exception\AccessDeniedException
- Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException

But if I peek at the log of the php-fpm service on our servers using journalctl I basically just see a flood of these:
Mar 03 09:49:08 <hostname> php-fpm8.1[1442507]: ool fpm: Discarding event because error class "Symfony\Component\HttpKernel\Exception\NotFoundHttpException" matched discardClasses configuration
Mar 03 09:49:08 <hostname> php-fpm8.1[1442640]: ool fpm: Discarding event because error class "Symfony\Component\HttpKernel\Exception\NotFoundHttpException" matched discardClasses configuration
Mar 03 09:49:38 <hostname> php-fpm8.1[1443398]: ool fpm: Discarding event because error class "Symfony\Component\HttpKernel\Exception\NotFoundHttpException" matched discardClasses configuration
Mar 03 09:49:38 <hostname> php-fpm8.1[1442843]: ool fpm: Discarding event because error class "Symfony\Component\Security\Core\Exception\AccessDeniedException" matched discardClasses configuration
Mar 03 09:49:40 <hostname> php-fpm8.1[1443398]: ool fpm: Discarding event because error class "Symfony\Component\HttpKernel\Exception\NotFoundHttpException" matched discardClasses configuration
Mar 03 09:49:54 <hostname> php-fpm8.1[1443620]: ool fpm: Discarding event because error class "Symfony\Component\HttpKernel\Exception\NotFoundHttpException" matched discardClasses configuration
Mar 03 09:49:54 <hostname> php-fpm8.1[1443398]: ool fpm: Discarding event because error class "Symfony\Component\HttpKernel\Exception\NotFoundHttpException" matched discardClasses configuration
Mar 03 09:49:54 <hostname> php-fpm8.1[1442640]: ool fpm: Discarding event because error class "Symfony\Component\HttpKernel\Exception\NotFoundHttpException" matched discardClasses configuration
Mar 03 09:50:02 <hostname> php-fpm8.1[1442507]: ool fpm: Discarding event because error class "Symfony\Component\HttpKernel\Exception\NotFoundHttpException" matched discardClasses configuration
Mar 03 09:50:03 <hostname> php-fpm8.1[1442843]: ool fpm: Discarding event because error class "Symfony\Component\Security\Core\Exception\AccessDeniedException" matched discardClasses configuration
Mar 03 09:50:03 <hostname> php-fpm8.1[1442640]: ool fpm: Discarding event because error class "Symfony\Component\Security\Core\Exception\AccessDeniedException" matched discardClasses configuration
Mar 03 09:50:04 <hostname> php-fpm8.1[1442507]: ool fpm: Discarding event because error class "Symfony\Component\Security\Core\Exception\AccessDeniedException" matched discardClasses configuration
Mar 03 09:50:04 <hostname> php-fpm8.1[1443620]: ool fpm: Discarding event because error class "Symfony\Component\Security\Core\Exception\AccessDeniedException" matched discardClasses configuration
Mar 03 09:50:04 <hostname> php-fpm8.1[1443398]: ool fpm: Discarding event because error class "Symfony\Component\Security\Core\Exception\AccessDeniedException" matched discardClasses configuration
Mar 03 09:50:04 <hostname> php-fpm8.1[1442843]: ool fpm: Discarding event because error class "Symfony\Component\Security\Core\Exception\AccessDeniedException" matched discardClasses configuration
Mar 03 09:50:04 <hostname> php-fpm8.1[1443620]: ool fpm: Discarding event because error class "Symfony\Component\Security\Core\Exception\AccessDeniedException" matched discardClasses configuration
Mar 03 09:50:04 <hostname> php-fpm8.1[1442508]: ool fpm: Discarding event because error class "Symfony\Component\Security\Core\Exception\AccessDeniedException" matched discardClasses configuration
Mar 03 09:50:08 <hostname> php-fpm8.1[1442650]: ool fpm: Discarding event because error class "Symfony\Component\HttpKernel\Exception\NotFoundHttpException" matched discardClasses configuration
Mar 03 09:50:08 <hostname> php-fpm8.1[1443620]: ool fpm: Discarding event because error class "Symfony\Component\HttpKernel\Exception\NotFoundHttpException" matched discardClasses configuration
Mar 03 09:50:10 <hostname> php-fpm8.1[1442843]: ool fpm: Discarding event because error class "Symfony\Component\Security\Core\Exception\AccessDeniedException" matched discardClasses configuration
Mar 03 09:50:10 <hostname> php-fpm8.1[1442507]: ool fpm: Discarding event because error class "Symfony\Component\Security\Core\Exception\AccessDeniedException" matched discardClasses configuration
Mar 03 09:50:11 <hostname> php-fpm8.1[1443887]: ool fpm: Discarding event because error class "Symfony\Component\Security\Core\Exception\AccessDeniedException" matched discardClasses configuration
Mar 03 09:50:11 <hostname> php-fpm8.1[1442843]: ool fpm: Discarding event because error class "Symfony\Component\Security\Core\Exception\AccessDeniedException" matched discardClasses configuration

Got it, thanks for the additional details. You should be able to achieve that by removing your discardClasses configuration and instead registering your own callback to check for and discard these errors without the syslog call.
The callback gets added to the middleware pipeline and is passed a $report object so you could do something similar to the internal middleware implementation and simply return false from the callback to discard the report:
https://github.com/bugsnag/bugsnag-php/blob/ad2b40ba8a512d9b19ed0ff8fab169184d3eb775/src/Middleware/DiscardClasses.php#L31-L46

Ah, did not think of that myself. Cheers, that's an acceptable alternative.

authors: alcohol yousif-bugsnag

repo: bugsnag/bugsnag-php


text:
docs: contributors

Current behavior

Proposed changes

Checks

[x] All commits in this Pull Request are signed and Verified by Github.
[x] All commits in this Pull Request follow the Ockam commit message convention.
[x] There are no Merge commits in this Pull Request. Ockam repo maintains a linear commit history. We merge Pull Requests by rebasing them onto the develop branch. Rebasing to the latest develop branch and force pushing to your Pull Request branch is okay.
[x] I have read and accept the Ockam Community Code of Conduct.
[x] I have read and accepted the Ockam Contributor License Agreement by adding my Git/Github details in a row at the end of the CONTRIBUTORS.csv file in a separate pull request to the build-trust/ockam repository. The easiest way to do this is to edit the CONTRIBUTORS.csv file in the github web UI and create a separate Pull Request, this will mark the commit as verified.

@eddiejaoude We'll merge this shortly.
Thank you for accepting the CLA and taking time to contribute!!
@metaclips @etorreborre please merge when you get a chance.

Thank you 🎉

authors: eddiejaoude mrinalwadhwa

repo: build-trust/ockam


text:
Address allocators should be copy-able

Or any other way to copy state from other addr allocator object. Mandatory for creating fully functioning IGPUVirtualTexture from ICPUVirtualTexture.

the constructors that take an r-value reference to the address allocator and allow you to specify a new reserved space, address offset and align offset are the ones that will allow you to move an address allocator.

            AddressAllocatorBase(CRTP&& other, void* newReservedSpc) :
                    reservedSpace(nullptr), addressOffset(invalid_address), alignOffset(invalid_address),
                    maxRequestableAlignment(invalid_address), combinedOffset(invalid_address)
            {
                operator=(std::move(other));
                reservedSpace = newReservedSpc;
                #ifdef _IRR_DEBUG
                    // reserved space has to be aligned at least to SIMD
                    assert((reinterpret_cast<size_t>(reservedSpace)&(_IRR_SIMD_ALIGNMENT-1u))==0ull);
                #endif // _IRR_DEBUG
            }
            AddressAllocatorBase(CRTP&& other, void* newReservedSpc, _size_type newAddressOffset, _size_type newAlignOffset) :
                    AddressAllocatorBase(std::move(other),newReservedSpc)
            {
                addressOffset = newAddressOffset;
                alignOffset = newAlignOffset;
                combinedOffset = addressOffset+alignOffset;
            }

Not really sure why you'd need to copy an address allocator, but you could duplicate the definition of these two constructors in every address allocator (most will only do perfect forwarding) and make a version that is explicit and takes a const CRTP& instead of a CRTP&&

authors: Crisspl devshgraphicsprogramming

repo: buildaworldnet/IrrlichtBAW


text:
buildkite-agent.cfg token - file path vs integer

It would be great if we could set the token to a file path instead of the token integer.
We want to control our cfg file via chef, but this means we have to expose the token in our code repo. Having it link to a file would allow us to deploy the secret, but dynamically control the config file in chef.

Hey Erik! Interesting! With Chef, it's not possible to embed/compose configs as files? Because the agent config itself is a file, it just has the token inside of it?

If we embed the file, our token is inside of it.
We have an internal secret system that we call via chef to write out the file currently, but the limitation is chef doesn't know what the file structure of the config should look like. If we could give the config a path to a file that just contains the token, chef can obtain that secret (and doesn't need to know what the secret is) and we can make changes to our config file as needed.

Right! So you'd have to store the entire config file itself inside a "secret" in your secret store? Because there's no way to gsub/sed the config with the secret?

Yeah, exactly.

Thanks for clarifying @erikng!
@keithpitt @sj26 is this something you see as okay to add to the agent? If so, I can look at adding support. I think it also fits well with Kubernetes and Docker Swarm secrets too, as they're also files on the filesystem.

Hmm, I guess we could. This feels like a very specific use case which could have many other solutions which don't require adding such a specific new feature into the core agent. For example, the way I might do this would be to write out a systemd drop-in which sources an environment file placed somewhere by a secrets system, like:
# /etc/systemd/system/buildkite-agent.service.d/secrets.conf
[Service]
EnvironmentFile=/etc/buildkite-agent/secrets

# /etc/buildkite-agent/secrets
BUILDKITE_AGENT_TOKEN=abc123

Would something like that work?

Is using environment variables for sensitive data considered an anti-pattern these days? Same as command line args? I thought it was, and have been wondering how we can encourage people to move away from specifying the agent token as an env for cases like Docker. I thought this would be the same kind of use case. But I might have over-generalised there.

Heh, I think my answer to that is a pretty hefty "it depends."
Sorry for the brain dump, but some thoughts:
Command line arguments shouldn't contain secrets because most processes on the system can see the command line of other processes, including arguments. Most systems won't allow quite the same level of access to a process' launch environment, you need to be the same user or a super user to see the environment data. This is not necessarily the runtime environment, that's an implementation detail as the program is free to treat "environment" however it likes, 'nix only dictates an interface at process boundaries. But even if passed in a file or something else the secret is still available in said files or in process memory with the same user or super user restrictions, so it's just security theatre. But there's definitely an argument that security through obscurity is worth in some cases.
One of the other arguments is that environment is propagated to subprocesses, so secrets can be leaked. This is how memory exploits in mini-magick might compromised your payment provider credentials. But we're pretty careful about sanitizing the environment before invoking the bootstrap and command processes. They can't see the agent registration token directly in their environment. (They could still fish for it in the parent process memory, though.)
Running builds in docker containers is the best protection. This keeps the agent process and it's filesystem completely separated, and should be enough security for most. There are still exploits here, like when running within Kubernetes then containers within the same pod share execution environment, but that's probably beyond this discussion.
So, basically, I don't think in this case it's a huge deal to pass the agent token to the agent as an environment var.
All that said, I don't mind how you want to take this. I just don't want to introduce too many ways to do the same thing in the same codebase, potentially complicating things down the road.

@erikng how have you solved this for other services you manage via chef? I'm probably totally wrong, and I can't quite remember how Chef works, but don't you create template files with ERB or something and substitute values into them as they are written onto a server?
Also you mentioned:

but the limitation is chef doesn't know what the file structure of the config should look like.

Any chance we can teach it what the file structure is? :)

I did some googling for any established patterns on this, but I couldn't seem to find any (I looked at tools like Scout and the Datadog agent) - maybe there are some other tools I can look at it to see how they solve this problem?

The main issue comes down to this. If you manage a file it looks at what is essentially a hash. Chef will look at each and every line of a config file and if it doesn't match the expected values, it will correct those areas.
Because of this, we have a few options:

Store the entire config in a secret store and continually drop it down each chef run since chef cannot understand the content of the config. (this could lead into a race condition)
Store the entire config in chef and be able to change the token whenever we want.
Store the entire config and let buildkite read the token via a file/environment variable/etc. (this is what I want)

Option 3 allows us to use our tool Knox to get the secret.
I don't see another way.

Sorry I'm not super familiar with chef, but here's a chef cook book which seems to be able to build a buildkite agent config file from options in your chef config, and interpolating a token from an encrypted data bag. I presume you might be able to source this token from other tools like Knox as well? Is this kinda what you're trying to do?
https://github.com/bendrucker/buildkite-cookbook

👋 After some lengthy discussion, we've decided we want to keep these sorts of concerns out of the config file. Let us know if we can help further with ways to generate the config file with the values you want in it.

great

authors: Jircs1 erikng keithpitt lox sj26 toolmantim

repo: buildkite/agent


text:
🛑 GOTO Parking is down

In 701ba94, GOTO Parking (https://gotoparking.ro) was down:

HTTP code: 0
Response time: 0 ms

Resolved: GOTO Parking is back up in cf40e7b after 9 minutes.

repo: buligadragos/UpTime


text:
Update README to add running setup script

Closes #573

@siaw23 This is great! Thank you!


text:
Unable to close Apply popup window on small screens

A user of our site that utilizes the career portal found the following issue:
"I wanted to let you know about a design issue that is preventing me from closing a window or moving off the application pop up page.
When I click apply, this pop up on the attached image comes up.  However, there's no way to navigate from this page now.  The submit button doesn't appear on scroll, I can't tab down to choices beyond the input fields, and can't complete the application even after uploading a resume.
Perhaps on a large screen this would work.  I'm on a MacBook 13.5".
The only way off the page is to close it."
We have duplicated the issue - if your screen size isn't tall enough to show the Cancel button there's no way to close the Apply popup in the career portal. This could be fixed by allowing scrolling within the popup (preferred, so you would also get to the Send button) or making it so if you click outside the popup it closes.

Hey Dave,
This was actually changed in #70 to apply a fix for smaller resolution screens along with a an additional fix recently within #94.  These changes are tentatively going to be applied within the next release of the portal but I suggest ensuring your portal is v1.6.0 for the #70 fix.
Please let me know if you have any more questions.

We do have v1.60 installed to the best of my knowledge, but still have the
issue - the career portal is here:
https://www.scionstaffing.com/jobportal/#/jobs
On Wed, Nov 30, 2016 at 2:15 PM, Charles Barnes notifications@github.com
wrote:

Hey Dave,
This was actually changed in #70
https://github.com/bullhorn/career-portal/pull/70 to apply a fix for
smaller resolution screens along with a an additional fix recently within
#94 https://github.com/bullhorn/career-portal/pull/94. These changes
are tentatively going to be applied within the next release of the portal
but I suggest ensuring your portal is v1.6.0 for the #70
https://github.com/bullhorn/career-portal/pull/70 fix.
Please let me know if you have any more questions.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/bullhorn/career-portal/issues/101#issuecomment-264013540,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVXmFEYArTaQq205Euwij_tsi-whJeW1ks5rDfVngaJpZM4LAvxy
.

Hey Dave,
Version 2.0 was released recently that does address this issue.   I am not sure if you applied your own fix, but if you update the portal, you should see this fix from #70
Just wanted to provide an update. Please let me know if you have any questions

Thanks for the update - I appreciate it. We probably won't be able to get
around to updating the fix for a week or so, but when we do I'll let you
know if it fixes the problem for me. Cheers,
Dave Garlock
On Thu, Dec 22, 2016 at 7:23 AM, Charles Barnes notifications@github.com
wrote:

Hey Dave,
Version 2.0 was released recently that does address this issue. I am not
sure if you applied your own fix, but if you update the portal, you should
see this fix from #70 https://github.com/bullhorn/career-portal/pull/70
Just wanted to provide an update. Please let me know if you have any
questions
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/bullhorn/career-portal/issues/101#issuecomment-268821728,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVXmFFfSyFsboQNERedPRSpvsSuW4kwNks5rKpXvgaJpZM4LAvxy
.

Version 2.0 did fix this issue - thanks.

authors: DaveGarlock bulbajackel

repo: bullhorn/career-portal


text:
Tested out the Amazon endpoint link and I just get an error message.

Thank you for reading this! I am trying to implement the career portal on my Squarespace site. I am going to iFrame it in through Amazon, and I setup the Amazon bucket. I hit the endpoint link, and I get a red triangle that says Error_Has_Occured. Can someone help me figure this out?

Hello, this may be due to the configuration on your site. Do you have a link for me to take a look?

Charles - Here you go:
http://collaborativetalent-careers.s3-website.us-east-2.amazonaws.com/#/
Thanks!
Steve Leppert | Founder
*a: *Collaborative Talent | P.O. Box 2505 | Westerville, OH 43086
e: sleppert@collaborativetalent.com | w: www.collaborativetalent.com
http://www.collaborativetalent.com/
m: 614-312-7206
On Tue, Mar 2, 2021 at 10:55 AM Charles Barnes notifications@github.com
wrote:

Hello, this may be due to the configuration on your site. Do you have a
link for me to take a look?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/bullhorn/career-portal/issues/372#issuecomment-789010480,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ATBYWV6NDCM65CEGFGCVWN3TBUC5RANCNFSM4YPESU2A
.

Hello, looks like the configuration is perfect, however the endpoint needs to be enabled for you.  This can be done by reaching out to bullhorn support.
Please let me know if you have any more questions

Thank you!
Steve Leppert | Founder
*a: *Collaborative Talent | P.O. Box 2505 | Westerville, OH 43086
e: sleppert@collaborativetalent.com | w: www.collaborativetalent.com
http://www.collaborativetalent.com/
m: 614-312-7206
On Tue, Mar 2, 2021 at 11:18 AM Charles Barnes notifications@github.com
wrote:

Hello, looks like the configuration is perfect, however the endpoint needs
to be enabled for you. This can be done by reaching out to bullhorn support.
Please let me know if you have any more questions
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/bullhorn/career-portal/issues/372#issuecomment-789027423,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ATBYWV6B5XMTUJVB3YJFO33TBUFW5ANCNFSM4YPESU2A
.

authors: Sleppert charlesabarnes


text:
🛑 VODA-SA is down

In e52adba, VODA-SA ($SECRET_SITE2) was down:

HTTP code: 403
Response time: 1112 ms

Resolved: VODA-SA is back up in 6884a70.

repo: buluma/uptime


text:
Add Code of Conduct content to README template

Adds feature discussed in #5512
When the --coc flag is set or otherwise enabled when generating a new
gem, a Code of Conduct is generated. This adds an additional link to
that Code of Conduct in the README, and adds default text for the
Code of Conduct based on language used in other popular ruby open
source libraries (bundler, rails).

lgtm 👍

🚢 :shipit:  @indirect :-) Please and thank you.

@snuggs 100%. Thanks for the insanely quick response @indirect!

@colby-swandale - I updated based on your suggestions; let me know if you'd like me to rebase to clean up history/remove second commit (or implement anything else) - thanks!

@rbcole looks like travis found a rubocop check that needs fixing, after that I think this is good to go!

@colby-swandale and @indirect - Updated to fix rubocop issues and make sure the markdown renders properly. Rebased to clean up history as well - let me know if you have anything else you'd like to change. Thanks again!

Cookin @robcole 🔥

Thanks!
@bundlerbot r+

authors: indirect robcole segiddins snuggs

repo: bundler/bundler


text:
Unable to build a cluster on kubernetes with replica of 3

Hello
I am having an issue building a cluster on kubernetes. I have seen from the log that the nodes are discovered. However the cluster is not built. This is my log:

2023-08-01T05:35:59.731Z | {"level":"info","ts":1690868159.7310758,"msg":"AccountsSystem ActorSystem started..:)"}
2023-08-01T05:35:59.731Z | {"level":"info","ts":1690868159.7314508,"msg":"Starting GoAkt cluster service on (10.244.0.58:3320)....🤔"}
2023-08-01T05:35:59.732Z | 2023/08/01 05:35:59 [INFO] Olric 0.5.4 on linux/amd64 go1.20.6 => olric.go:319
2023-08-01T05:36:00.125Z | 2023/08/01 05:36:00 [DEBUG] memberlist: Initiating push/pull sync with:  10.244.0.57:3320
2023-08-01T05:36:00.125Z | 2023/08/01 05:36:00 [DEBUG] memberlist: Failed to join 10.244.0.57:3320: received invalid msgType (45), expected pushPullMsg (6) from=10.244.0.57:3320
2023-08-01T05:36:00.125Z | 2023/08/01 05:36:00 [ERROR] Join attempt returned error: 1 error occurred:
2023-08-01T05:36:00.125Z |  * Failed to join 10.244.0.57:3320: received invalid msgType (45), expected pushPullMsg (6) from=10.244.0.57:3320
2023-08-01T05:36:00.125Z |
2023-08-01T05:36:00.125Z |  => discovery.go:63
2023-08-01T05:36:00.125Z | 2023/08/01 05:36:00 [INFO] Awaits for 1s to join again (1/5) => discovery.go:69
2023-08-01T05:36:01.136Z | 2023/08/01 05:36:01 [DEBUG] memberlist: Initiating push/pull sync with:  10.244.0.58:3320
2023-08-01T05:36:01.136Z | 2023/08/01 05:36:01 [DEBUG] memberlist: Failed to join 10.244.0.58:3320: received invalid msgType (45), expected pushPullMsg (6) from=10.244.0.58:3320
2023-08-01T05:36:01.138Z | 2023/08/01 05:36:01 [DEBUG] memberlist: Initiating push/pull sync with:  10.244.0.57:3320
2023-08-01T05:36:01.140Z | 2023/08/01 05:36:01 [DEBUG] memberlist: Failed to join 10.244.0.57:3320: received invalid msgType (45), expected pushPullMsg (6) from=10.244.0.57:3320
2023-08-01T05:36:01.141Z | 2023/08/01 05:36:01 [DEBUG] memberlist: Initiating push/pull sync with:  10.244.0.56:3320
2023-08-01T05:36:01.142Z | 2023/08/01 05:36:01 [DEBUG] memberlist: Failed to join 10.244.0.56:3320: received invalid msgType (45), expected pushPullMsg (6) from=10.244.0.56:3320
2023-08-01T05:36:01.142Z | 2023/08/01 05:36:01 [ERROR] Join attempt returned error: 3 errors occurred:
2023-08-01T05:36:01.142Z |  * Failed to join 10.244.0.58:3320: received invalid msgType (45), expected pushPullMsg (6) from=10.244.0.58:3320
2023-08-01T05:36:01.142Z |  * Failed to join 10.244.0.57:3320: received invalid msgType (45), expected pushPullMsg (6) from=10.244.0.57:3320
2023-08-01T05:36:01.142Z |  * Failed to join 10.244.0.56:3320: received invalid msgType (45), expected pushPullMsg (6) from=10.244.0.56:3320
2023-08-01T05:36:01.142Z |
2023-08-01T05:36:01.142Z |  => discovery.go:63
2023-08-01T05:36:01.142Z | 2023/08/01 05:36:01 [INFO] Awaits for 1s to join again (2/5) => discovery.go:69
2023-08-01T05:36:02.324Z | 2023/08/01 05:36:02 [DEBUG] memberlist: Initiating push/pull sync with:  10.244.0.58:3320
2023-08-01T05:36:02.325Z | 2023/08/01 05:36:02 [DEBUG] memberlist: Failed to join 10.244.0.58:3320: received invalid msgType (45), expected pushPullMsg (6) from=10.244.0.58:3320
2023-08-01T05:36:02.326Z | 2023/08/01 05:36:02 [DEBUG] memberlist: Initiating push/pull sync with:  10.244.0.57:3320
2023-08-01T05:36:02.328Z | 2023/08/01 05:36:02 [DEBUG] memberlist: Failed to join 10.244.0.57:3320: received invalid msgType (45), expected pushPullMsg (6) from=10.244.0.57:3320
2023-08-01T05:36:02.330Z | 2023/08/01 05:36:02 [DEBUG] memberlist: Initiating push/pull sync with:  10.244.0.56:3320
2023-08-01T05:36:02.331Z | 2023/08/01 05:36:02 [DEBUG] memberlist: Failed to join 10.244.0.56:3320: received invalid msgType (45), expected pushPullMsg (6) from=10.244.0.56:3320
2023-08-01T05:36:02.332Z | 2023/08/01 05:36:02 [ERROR] Join attempt returned error: 3 errors occurred:
2023-08-01T05:36:02.332Z |  * Failed to join 10.244.0.58:3320: received invalid msgType (45), expected pushPullMsg (6) from=10.244.0.58:3320
2023-08-01T05:36:02.332Z |  * Failed to join 10.244.0.57:3320: received invalid msgType (45), expected pushPullMsg (6) from=10.244.0.57:3320
2023-08-01T05:36:02.332Z |  * Failed to join 10.244.0.56:3320: received invalid msgType (45), expected pushPullMsg (6) from=10.244.0.56:3320
2023-08-01T05:36:02.332Z |
2023-08-01T05:36:02.332Z |  => discovery.go:63

The system does start with a one member cluster which seems to me that it is not able to discover the other pods in the cluster. For more information:

https://github.com/Tochemey/goakt/blob/patch-1/examples/actor-cluster/k8s/k8s.yaml
https://github.com/Tochemey/goakt/blob/patch-1/cluster/cluster.go#L128-L175
https://github.com/Tochemey/goakt/blob/patch-1/cluster/discovery.go
https://github.com/Tochemey/goakt/blob/patch-1/discovery/kubernetes/discovery.go#L153-L210

@derekperkins per chance you pass here. Can you point to me what I am doing wrong?

I think I have found the issue. Thanks

repo: buraksezer/olric


text:
How to segregate cache by branch, commit or pipeline

I can't find a way to have a separate cache for each pipeline/commit or branch.
I'm running several jobs, each with one Gradle task and I need them to share the cache only within the same pipeline or commit. As far as I can see there is no way to start fresh at every pipeline and for some reason pretty much all of my jobs are not executed as they are shown as FROM-CACHE. This is weirt because it also happens when I commit changes to Java source code.
I tried using the job-id argument (using the same value ${{ github.run_id }} for all jobs in the pipeline, but nothing changes.
What am I missing here? Is there a way to achieve that? In other words, is there a way I can set the cache id?

FROM-CACHE

FROM-CACHE message comes from Gradle, and it means Gradle was able to found the relevant entry in the build cache.
Note: if you are sure FROM-CACHE causes miscompilation, then it is a severe Gradle bug.
Could you provide the pointer to the CI log where you change sources, and compileJava still becomes FROM-CACHE?

In case you wonder, the primary cache key is already segregated by PR number / branch name (see https://github.com/burrunan/gradle-cache-action/blob/9b6592b6ae7419babd09042fd26a9557a3297866/layered-cache/src/main/kotlin/com/github/burrunan/gradle/cache/ActionsTriggerExtensions.kt#L25-L30 ), however, it is done to prevent polluting the cache by different branches (e.g. when the set of dependencies significantly differs between branch-1.x and branch-2.x)

Thanks a lot Vladimir for your prompt response.
I created a test branch for you to help me out here.
It has 3 commits with their separate pipeline runs:

here is the first branch commit
here is the second commit, with a dummy change to a Java source file as you can see by the changes
here is the third commit, reverting the previous dummy change (see the changes)

For this test purposes let'c only focus on the java-assemble step (which builds the artifacts) and the java-unit-test step (that runs tests when artifacts are changed).
The first pipeline is OK, it compiles Java sources and runs tests. This means, as you said, that a new cache is started and, as expected, there is no previous cache to restore (see the Init with Gradle job).
The second pipeline is also OK. It finds the cache from the previous run but it builds Java artifacts (see the :modules:java:main:assemble task in Assemble with Gradle) and runs unit tests (see the :modules:java:main:test task in Run Java Unit Tests with Gradle).
The third pipeline doesn't work as I expect. Artifacts are rebuilt correctly, but tests are not executed as the :modules:java:main:test turns out to be restored FROM-CACHE.
I wonder if I'm missing anything here because, as you can see, it's a quite articulated build script and I could really benefit from the remote cache.
For these reasons it would be enough for me to just share the cache within the pipeline.
Thanks

but tests are not executed

By default, Gradle caches test tasks: https://docs.gradle.org/current/userguide/caching_java_projects.html#integration_test_execution
In your case, test tasks notices that its classpath is the same as the one with the first execution, so the test task assumed there's no need to execute it.
It is pretty much the same as repeated ./gradlew test --build-cache execution. After the first execution, test would be FROM-CACHE.
If you really need to re-execute tests (why?) you should consider adding inputs to the task. If the test task is for "integration tests" (== it depends on a third-party system), then you might want adding something like outputs.upToDateWhen { false }

The third pipeline doesn't work as I expect. Artifacts are rebuilt correctly, but tests are not executed

In other words, if the only thing your tests do is to verify if "2+2" equals 4, then there's no need to execute it again and again. That is why Gradle caches test tasks by default.

Thanks Vladimir, the above makes sense when java source files (and so classes) don't change but if Java source files have change I also expect tests to run again. Doesn't this make sense?

The test uses compiled java classes which just happen to be the same. The tests do not use "source files".
As you show, you change comments only, so it is expected that test are not re-executed, since the resulting bytecode becomes the same if you change the source file multiple times.

authors: flelli vlsi

repo: burrunan/gradle-cache-action


text:
Memory leak fix & more sanitization in tests

Fixes #268.
Adds a basic check for leaked Service (and thus Resource) instances to the test suite.
Enables assorted Xcode sanitization options in tests.
Fixes several unimportant but now-detected leaks & thread issues in the tests.

Hey @pcantrell!  Thanks so much for jumping on this.  I'm planning to release a new version of my app this week, and I had included 1.4.0 in it.  Would you recommend using memory_leak, or do you plan on getting a new version of Siesta released shortly (Travis issues?)?  Is there anything I can do to help?

I'm trying to setup Siesta so I can build and run the tests on my local machine, but I'm unable to get Carthage to compile Nocilla, I'm getting the following error:
User defaults from command line:
    IDEDerivedDataPathOverride = /Users/woodj/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Nocilla/bd7ec7caa0576f08c00bbbf993a9204f93be16e3

Build settings from command line:
    CARTHAGE = YES
    CODE_SIGN_IDENTITY =
    CODE_SIGNING_REQUIRED = NO
    ONLY_ACTIVE_ARCH = NO
    SDKROOT = appletvsimulator11.4

xcodebuild: error: Unable to find a destination matching the provided destination specifier:
		{ platform:tvOS Simulator, id:ECE73D0A-02FC-4B82-A5CA-FF2A9EBD7C09 }

	Ineligible destinations for the "Nocilla tvOS" scheme:
		{ platform:tvOS, id:dvtdevice-DVTiOSDevicePlaceholder-appletvos:placeholder, name:Generic tvOS Device }
		{ platform:tvOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-appletvsimulator:placeholder, name:Generic tvOS Simulator Device }
^C
Davids-Mac-mini:~ woodj$ tail /var/folders/d5/ntx8rq7n05j1_0z1hbk7y09c0000gp/T/carthage-xcodebuild.0f0cUH.log
    CODE_SIGNING_REQUIRED = NO
    ONLY_ACTIVE_ARCH = NO
    SDKROOT = appletvsimulator11.4

xcodebuild: error: Unable to find a destination matching the provided destination specifier:
		{ platform:tvOS Simulator, id:ECE73D0A-02FC-4B82-A5CA-FF2A9EBD7C09 }

	Ineligible destinations for the "Nocilla tvOS" scheme:
		{ platform:tvOS, id:dvtdevice-DVTiOSDevicePlaceholder-appletvos:placeholder, name:Generic tvOS Device }
		{ platform:tvOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-appletvsimulator:placeholder, name:Generic tvOS Simulator Device }

If I'm reading that right, it wants a tvOS simulator which is version 11.4, but since I'm not yet on Xcode 10, I only have access to devices up to 11.3.  Any suggestions on how to fix?

I'm planning to release a new version of my app this week, and I had included 1.4.0 in it. Would you recommend using memory_leak, or do you plan on getting a new version of Siesta released shortly (Travis issues?)? Is there anything I can do to help?

I expect that the memory_leak branch should be safe, but I’d love to see it pass CI before I say that with confidence. I’d happily welcome any additional detective work on this!
This PR’s new leak check in the tests is flagging leaks with the Alamofire provider. The problem is puzzling, and I haven't yet figured out whether the problem is real, or whether Alamofire just delays cleanup of its requests in a way that trips the test but is actually harmless.
If you want to take a look and puzzle over it, run the tests with the env var Siesta_TestMultipleNetworkProviders set to something nonempty. (I do this locally by manually changing the value to 1 in Edit Scheme → Test → Arguments.) You’ll know the flag is working if you see >1000 tests run instead of the usual 300-something.
You can see the AF issue in the Siesta macOS target, which runs much faster than the others because it doesn’t require a simulator.
The check that’s failing just keeps a weak ref to each test case’s Service, then checks that it’s nil at the end of the test. (This also catches Resource and Request leaks, since both of those ultimately retain their associated Service.) The interesting detail: it looks like each test case’s service gets cleaned up during the next test case. My suspicion is that AF does an additional something or other with each request that Siesta just isn’t waiting for.

I'm trying to setup Siesta so I can build and run the tests on my local machine, but I'm unable to get Carthage to compile Nocilla, I'm getting the following error: … If I'm reading that right, it wants a tvOS simulator which is version 11.4, but since I'm not yet on Xcode 10, I only have access to devices up to 11.3. Any suggestions on how to fix?

Could you open a separate issue for this? Then we can tag in the kind person who contributed the tvOS support.

Update: my current working theory is that AF is relying on autorelease for cleanup, and the autorelease pool doesn’t get drained until after my afterEach block that checks for leaks.

Yes, confirmed: at least some of the tests pass with Alamofire if each spec is wrapped in autoreleasepool { … }.
The problem now is that AFAICT, Quick doesn’t provide any sort of aroundEach facility that we could use to automatically wrap each test in an autoreleasepool { … }, and ARC doesn’t allow us to manually create and drain an autorelease pool in a way that Quick’s beforeEach and afterEach would support.
I have to dash off, and will be on other tasks most of the rest of the day. @jordanpwood, if you have some time today, you could help by investigating whether it’s possible to control autorelease pools with Quick. We need some way to make sure that each spec created during this call gets wrapped in its own pool, and that the pool is drained before the leak-checking block runs. The solution I’d want, but don’t know if Quick supports, would look like this:
aroundEach
    {
    spec in
    autoreleasepool
        { spec() } // (1)
    }

afterEach
    {
    // (2) …check for leaks here…
    }

…so that the order of execution is:
// (1) pool created
// spec runs
// (1) pool drained
// (2) leak check runs
// (1) pool created
// spec runs
// (1) pool drained
// (2) leak check runs
etc.

It's almost passing the tests, are those leaked services real, or is it more test artifacts?

Phew, passed!
It was test artifacts, it seems — though establishing that and working around them took some finagling. The general flavor of all these leak-checking issues is that between Siesta, URLSession, and Alamofire, there’s a lot of deferred cleanup, and some of it is timing-sensitive. I hacked around it by adding a very forgive progressive delay-and-retry loop before we confirm the leak.
The good news is that the wait-and-rety appears to also take care of the nasty Travis issues that the unpleasant DelayAfterEachSpec flag was working around. Appears to. Without that delay, the specs run a bit faster on CI.

authors: jordanpwood pcantrell

repo: bustoutsolutions/siesta


text:
Feature Request: Run unit tests and report coverage on pull request

Now that this has good amount of tests, should we run these tests on pull requests and report coverage using Github Actions? I can give this a try, if this is can be helpful

I was thinking about that, if you can do it it would be great so I can see your code

Sure. Please assign this to me. I'll put up something soon!

Done!

Hey, was about to work on this, saw that the github actions have been removed? What's the update here?

Hey, was about to work on this, saw that the github actions have been removed? What's the update here?

It is pending that @rugglcon do it

I think @aneeshrelan can take it, sorry I've gotten busy this last week

Creo que @aneeshrelan puede soportarlo, lo siento, estuve ocupado esta última semana

No problem, first your important things

authors: aneeshrelan buzz-js rugglcon

repo: buzz-js/lsdb


text:
Adding new items to List causes Scrollbar Jumping

Bug Report
https://codesandbox.io/s/scrollbar-jumping-6oy0kz
What is the current behavior?
In this demo project, new items are added to the list every 2 seconds. If you scoll to some item and watching the list grow you will actually see the scrollbar jump around and list items disappear from the list.
What is the expected behavior?
The scrollbar should not move at all.
Which versions of React and react-virtualized, and which browser / OS are affected by this issue? Did this work in previous versions of react-virtualized?
See repo.

Hi, I have a project which is experiencing this issue too. Though in this instance, I can only seem to consistently produce it after a fresh load, it doesn't seem to happen for consecutive list updates (though in some instances, it does happen multiple times before refreshing)
Here's the code snippet for where react-virtualisation is used to display a list of items (messages in our case)
https://github.com/widgetbot-io/embed/blob/c50ec370c6186fc755c6354d59b2cb3208d39835/src/views/Messages/Messages.tsx#L74-L158
In this example, <MessageList> is actually <AutoSizer> but wrapped through styled - though changing this to not use styled does not seem to fix the issue.
I've also attached a video of the issue too.
https://user-images.githubusercontent.com/26467584/165979216-39b24b28-4342-4ab6-9c29-496e3ff8b0a3.mp4

authors: tippfelher victiondev

repo: bvaughn/react-virtualized


text:
🛑 Trifecta Esplanade Multipurpose Hall is down

In a2d29c5, Trifecta Esplanade Multipurpose Hall (https://cloud.tymly.in/status/1169) was down:

HTTP code: 521
Response time: 20229 ms

Resolved: Trifecta Esplanade Multipurpose Hall is back up in c8d39a0.

repo: bvenkysubbu/tymlymonitor


text:
🛑 Sterling Shalom B Block is down

In a37b38f, Sterling Shalom B Block (https://cloud.tymly.in/status/1069) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Sterling Shalom B Block is back up in 1f77030.


text:
🛑 Prestige Jade Pavilion Tower 1 is down

In 4d06d0a, Prestige Jade Pavilion Tower 1 (https://cloud.tymly.in/status/1172) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Prestige Jade Pavilion Tower 1 is back up in fcb9de9.


text:
🛑 Sterling Shalom A Block is down

In edf1fca, Sterling Shalom A Block (https://cloud.tymly.in/status/1024) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Sterling Shalom A Block is back up in 0a2382b.


text:
🛑 SMR Vinay Cascade B Block is down

In 343f0ba, SMR Vinay Cascade B Block (https://cloud.tymly.in/status/1093) was down:

HTTP code: 521
Response time: 20775 ms

Resolved: SMR Vinay Cascade B Block is back up in 7fe693a.


text:
🛑 Dasta Concerto Entrance is down

In 0abaf3b, Dasta Concerto Entrance (https://cloud.tymly.in/status/1137) was down:

HTTP code: 521
Response time: 209 ms

Resolved: Dasta Concerto Entrance is back up in 8ad8c76.


text:
🛑 Mahaveer Varna A1 is down

In 0b454ce, Mahaveer Varna A1 (https://cloud.tymly.in/status/1083) was down:

HTTP code: 521
Response time: 448 ms

Resolved: Mahaveer Varna A1 is back up in 5055cdc.


text:
🛑 Brigade Cosmopolis Clubhouse Entrance is down

In 08f5cb1, Brigade Cosmopolis Clubhouse Entrance (https://cloud.tymly.in/status/1141) was down:

HTTP code: 521
Response time: 20244 ms

Resolved: Brigade Cosmopolis Clubhouse Entrance is back up in 4a7d8c6.


text:
🛑 Mahaveer Varna B3 is down

In a76e496, Mahaveer Varna B3 (https://cloud.tymly.in/status/1086) was down:

HTTP code: 521
Response time: 20234 ms

Resolved: Mahaveer Varna B3 is back up in ddf2474.


text:
🛑 Prakruthi Villas Sarjapura is down

In 4e3ec52, Prakruthi Villas Sarjapura (https://cloud.tymly.in/status/1058) was down:

HTTP code: 521
Response time: 256 ms

Resolved: Prakruthi Villas Sarjapura is back up in fdbcf8f.


text:
🛑 Mahaveer Varna B3 is down

In 24bfb63, Mahaveer Varna B3 (https://cloud.tymly.in/status/1086) was down:

HTTP code: 521
Response time: 1522 ms

Resolved: Mahaveer Varna B3 is back up in 923ff2a.


text:
🛑 SBB Touchstone A1 Block is down

In 9d9861f, SBB Touchstone A1 Block (https://cloud.tymly.in/status/1186) was down:

HTTP code: 521
Response time: 245 ms

Resolved: SBB Touchstone A1 Block is back up in e97db53.


text:
🛑 Prestige Jade Pavilion Tower 2 is down

In ed851d2, Prestige Jade Pavilion Tower 2 (https://cloud.tymly.in/status/1173) was down:

HTTP code: 502
Response time: 3932 ms

Resolved: Prestige Jade Pavilion Tower 2 is back up in f4d9e08.


text:
🛑 Sumadhura Silver Ripples Club House is down

In adb5498, Sumadhura Silver Ripples Club House (https://cloud.tymly.in/status/1090) was down:

HTTP code: 521
Response time: 20222 ms

Resolved: Sumadhura Silver Ripples Club House is back up in 9d7435f.


text:
🛑 Amrutha Sarovar Office is down

In 93b5354, Amrutha Sarovar Office (https://cloud.tymly.in/status/1140) was down:

HTTP code: 521
Response time: 249 ms

Resolved: Amrutha Sarovar Office is back up in 1577632.


text:
🛑 Nitesh Flushing Meadows Block C is down

In 323cad2, Nitesh Flushing Meadows Block C (https://cloud.tymly.in/status/1054) was down:

HTTP code: 521
Response time: 20236 ms

Resolved: Nitesh Flushing Meadows Block C is back up in 2d142d4.


text:
🛑 Amrutha Sarovar Office is down

In 197d41a, Amrutha Sarovar Office (https://cloud.tymly.in/status/1140) was down:

HTTP code: 521
Response time: 20239 ms

Resolved: Amrutha Sarovar Office is back up in b97d1c4.


text:
🛑 United Elysium is down

In e436fbc, United Elysium (https://cloud.tymly.in/status/1019) was down:

HTTP code: 521
Response time: 20216 ms

Resolved: United Elysium is back up in 14a77aa.


text:
🛑 Madhuban Brindavan A Block is down

In 038663a, Madhuban Brindavan A Block (https://cloud.tymly.in/status/1135) was down:

HTTP code: 521
Response time: 225 ms

Resolved: Madhuban Brindavan A Block is back up in 18c7c46.


text:
🛑 Trifecta Esplanade N Block is down

In 2141768, Trifecta Esplanade N Block (https://cloud.tymly.in/status/1165) was down:

HTTP code: 521
Response time: 222 ms

Resolved: Trifecta Esplanade N Block is back up in 232cc2d.


text:
🛑 SMD Altezz Block B is down

In 215056e, SMD Altezz Block B (https://cloud.tymly.in/status/1176) was down:

HTTP code: 521
Response time: 20243 ms

Resolved: SMD Altezz Block B is back up in 966f647.


text:
🛑 Sterling Shalom A Block is down

In 97100c5, Sterling Shalom A Block (https://cloud.tymly.in/status/1024) was down:

HTTP code: 521
Response time: 20246 ms

Resolved: Sterling Shalom A Block is back up in a450f33.


text:
🛑 SMD Altezz Block B is down

In 90c7516, SMD Altezz Block B (https://cloud.tymly.in/status/1176) was down:

HTTP code: 521
Response time: 20245 ms

Resolved: SMD Altezz Block B is back up in 36a9d7a.


text:
🛑 SMD Altezz Block B is down

In 72de267, SMD Altezz Block B (https://cloud.tymly.in/status/1176) was down:

HTTP code: 521
Response time: 20248 ms

Resolved: SMD Altezz Block B is back up in a1965b0.


text:
🛑 Brigade Cosmopolis Clubhouse End is down

In affb3d0, Brigade Cosmopolis Clubhouse End (https://cloud.tymly.in/status/1145) was down:

HTTP code: 521
Response time: 20228 ms

Resolved: Brigade Cosmopolis Clubhouse End is back up in 2419f18.


text:
🛑 SMD Altezz Block C Basement is down

In fd11287, SMD Altezz Block C Basement (https://cloud.tymly.in/status/1203) was down:

HTTP code: 521
Response time: 248 ms

Resolved: SMD Altezz Block C Basement is back up in 5c50222.


text:
🛑 VBHC Serene Town B Block is down

In f789f19, VBHC Serene Town B Block (https://cloud.tymly.in/status/1130) was down:

HTTP code: 521
Response time: 208 ms

Resolved: VBHC Serene Town B Block is back up in 0516c21.


text:
🛑 SMD Altezz Block B is down

In 1618061, SMD Altezz Block B (https://cloud.tymly.in/status/1176) was down:

HTTP code: 521
Response time: 255 ms

Resolved: SMD Altezz Block B is back up in 9f1c107.


text:
🛑 Nitesh Forest Hills Block B is down

In ba9a833, Nitesh Forest Hills Block B (https://cloud.tymly.in/status/1051) was down:

HTTP code: 521
Response time: 242 ms

Resolved: Nitesh Forest Hills Block B is back up in f8ba05a.


text:
🛑 Sowparnika Ananda D Block is down

In 8a01a00, Sowparnika Ananda D Block (https://cloud.tymly.in/status/1061) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Sowparnika Ananda D Block is back up in 997bafc after 890 days, 23 hours, 41 minutes.


text:
🛑 Brigade Cosmopolis Clubhouse End is down

In 783212d, Brigade Cosmopolis Clubhouse End (https://cloud.tymly.in/status/1145) was down:

HTTP code: 521
Response time: 20250 ms

Resolved: Brigade Cosmopolis Clubhouse End is back up in 2216950 after 778 days, 13 hours, 25 minutes.


text:
🛑 Prakruthi Villas Sarjapura is down

In 0d17ce9, Prakruthi Villas Sarjapura (https://cloud.tymly.in/status/1058) was down:

HTTP code: 521
Response time: 20226 ms

Resolved: Prakruthi Villas Sarjapura is back up in c4163cd.


text:
🛑 Sowparnika Swastika 1 is down

In 0214d54, Sowparnika Swastika 1 (https://cloud.tymly.in/status/1101) was down:

HTTP code: 521
Response time: 20246 ms

Resolved: Sowparnika Swastika 1 is back up in f106c4b.


text:
🛑 Sowparnika Swastika 2 is down

In cb9ce5c, Sowparnika Swastika 2 (https://cloud.tymly.in/status/1099) was down:

HTTP code: 502
Response time: 1898 ms

Resolved: Sowparnika Swastika 2 is back up in 843139d.


text:
Duplicate basepython entry to avoid conflict with envlist

Moving basepython setting into base [testenv] is causing my version of tox to complain about conflicts with the python versions declared in envlist.  Partially rolling back.

Pull Request Test Coverage Report for Build 4952515303

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 98.235%

Totals

Change from base Build 4887172767:
0.0%

Covered Lines:
1280

Relevant Lines:
1303

💛  - Coveralls

I'm trying to run tox on my machine and get the following:

The tests itself succeed:

  py38: commands succeeded
  py39: commands succeeded
  py310: commands succeeded
  py311: commands succeeded

all linters fail:

ERROR:   black: InvocationError for command py311 -c 'import sys; print('"'"'{}.{}'"'"'.format(*sys.version_info[:2]))' (exited with code 2)
ERROR:   isort: InvocationError for command py311 -c 'import sys; print('"'"'{}.{}'"'"'.format(*sys.version_info[:2]))' (exited with code 2)
ERROR:   ssort: InvocationError for command py311 -c 'import sys; print('"'"'{}.{}'"'"'.format(*sys.version_info[:2]))' (exited with code 2)
ERROR:   pyflakes: InvocationError for command py311 -c 'import sys; print('"'"'{}.{}'"'"'.format(*sys.version_info[:2]))' (exited with code 2)
ERROR:   pylint: InvocationError for command py311 -c 'import sys; print('"'"'{}.{}'"'"'.format(*sys.version_info[:2]))' (exited with code 2)
ERROR:   mypy: InvocationError for command py311 -c 'import sys; print('"'"'{}.{}'"'"'.format(*sys.version_info[:2]))' (exited with code 2)

I'm using the following versions:
python 3.11.3
tox 4.4.12

Have just merged the identical #103

authors: bwhmather cgahr coveralls

repo: bwhmather/ssort


text:
Moving hardware | Bridge control path wrong

Hi there,
Just tried moving 4.5.0 from my Pi3 to LibreELEC inside docker on a Odroid C2. Did Bridge Device DB Backup and Bridge Settings Backup and popped these into /storage/downloads/habridge/data on my Odroid. From there they could be restored and I have all of my Bridge Settings and Bridge Devices however; the information for Configuration Path and File, Device DB Path and the UPNP IP Address are all stuck from the previous hardware and do not want to update. Is there a workaround for that? Docker version is 4.5.6

FYI, I manually edited those lines in the backup file, blew out the database and restored the modded backup file and the settings are now correct. Is there a better way?

Unfortunately, there is not. It is all about how the ha-bridge is started and the paths that are used for the data directory. Something has to tell the ha-bridge where they are if they are not relative to the start location of the ha-bridge.

authors: bwssytems xbmcnut

repo: bwssytems/ha-bridge


text:
20 failed tests on alpine linux

posix_spawn api not available.
different lsof output.
ls output is colorized by default in pty.
error message text differences.

FAILED tests/test_readme.py::test_readme - Failed: result does not match pattern
FAILED tests/test_readme.py::test_run_asyncio_repl - assert ['',\n '',\n "'hello, world\\n'",\n '"cat: can\'t open \'does_not_exist\': No such file or directory\\n"'] == ['',\n '',\n "'hello, world\\n'",\n "'/usr/bin/cat: does_not_exist: No such file or directory\\n'"]
FAILED tests/unix/test_unix.py::test_stress_pty_canonical_ls_parallel - AssertionError: assert '\x1b[0;0mCHANGELOG.md\x1b[m\r\n\x1b[0;0mREADME.md\x1b[m\r\n' == 'CHANGELOG.md\r\nREADME.md\r\n'
FAILED tests/unix/test_unix.py::test_process_substitution - AssertionError: assert '--- /dev/fd/8\n+++ /dev/fd/10\n@@ -1 +1 @@\n-a\n+b\n' == '1c1\n< a\n---\n> b\n'
FAILED tests/unix/test_unix.py::test_process_substitution_with_pipe - AssertionError: assert '--- /dev/fd/8\n+++ /dev/fd/10\n@@ -1 +1 @@\n-a\n+b\n' == '1c1\n< a\n---\n> b\n'
FAILED tests/unix/test_unix.py::test_stress_pty_canonical_ls_sequence - AssertionError: assert '\x1b[0;0mCHANGELOG.md\x1b[m\r\n\x1b[0;0mREADME.md\x1b[m\r\n' == 'CHANGELOG.md\r\nREADME.md\r\n'
FAILED tests/unix/test_unix.py::test_pty_canonical_ls - AssertionError: assert '\x1b[0;0mCHANGELOG.md\x1b[m\r\n\x1b[0;0mREADME.md\x1b[m\r\n' == 'CHANGELOG.md\r\nREADME.md\r\n'
FAILED tests/unix/test_unix.py::test_pty_manual_ls - AssertionError: assert bytearray(b'\x1b[0;0mREADME.md\x1b[m\r\n') == b'README.md\r\n'
FAILED tests/unix/test_unix.py::test_exit_codes - assert False
FAILED tests/unix/test_unix.py::test_pty_raw_ls - AssertionError: assert 45 <= 40
FAILED tests/unix/test_unix.py::test_pty_compare_small_ls_output - AssertionError: assert '\x1b[0;0mREADME.md\x1b[m\n' == 'README.md\n'
FAILED tests/unix/test_unix.py::test_pty_compare_large_ls_output - AssertionError: assert ('total 34080\n'\n '-rw-r--r--    1 root     root          5656 May  9  2021 '\n '\x1b[0;0mScrt1.o\x1b[m\n'\n 'drwxr-xr-x    2 root     root          4096 Nov 18 23:15 '\n '\x1b[1...
FAILED tests/unix/test_unix.py::test_open_file_descriptors - AssertionError: assert '' == '0u unix type=STREAM\n1w FIFO pipe\n2u CHR /dev/null\n'
FAILED tests/unix/test_unix.py::test_pty_stty_all - AssertionError: assert b'stty: standard input\n' == b''
FAILED tests/unix/test_unix.py::test_open_file_descriptors_unclosed_fds - AssertionError: assert '' == '0u unix type=STREAM\n1w FIFO pipe\n2u CHR /dev/null\n'
FAILED tests/unix/test_unix.py::test_open_file_descriptors_pty_unclosed_fds - AssertionError: assert '' == '0u CHR /dev/pts/N\n1u CHR /dev/pts/N\n2u CHR /dev/pts/N\n'
FAILED tests/unix/test_unix.py::test_open_file_descriptors_pty - AssertionError: assert '' == '0u CHR /dev/pts/N\n1u CHR /dev/pts/N\n2u CHR /dev/pts/N\n'
FAILED tests/unix/test_threads.py::test_thread_pty - AssertionError: assert '\x1b[0;0mREADME.md\x1b[m\r\n' == 'README.md\r\n'
FAILED tests/test_audit.py::test_audit_posix_spawn - assert False
FAILED tests/test_audit.py::test_audit - assert False

Fixed.

repo: byllyfish/shellous


text:
CME won't launch

Describe the bug
crackmapexec won't start.
downloaded the latest version via apt, for some reason its throwing the below error.
I'm running kali and its fully updated
Steps to reproduce the behavior:
normally attempt to run the tool
Screenshots
root@kali:~/Desktop/CTF# crackmapexec
Traceback (most recent call last):
  File "/usr/local/bin/crackmapexec", line 11, in <module>
    load_entry_point('crackmapexec==5.0.1.dev0', 'console_scripts', 'crackmapexec')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.8/dist-packages/crackmapexec-5.0.1.dev0-py3.8.egg/cme/__init__.py", line 10, in <module>
    for module in os.listdir(thirdparty_modules):
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.8/dist-packages/crackmapexec-5.0.1.dev0-py3.8.egg/cme/thirdparty'

Crackmapexec info

OS: kali
Version of CME v5.0.1 dev

Additional context
Add any other context about the problem here.

Try using the lastest release https://github.com/byt3bl33d3r/CrackMapExec/releases

Closing since duplicate of #355

authors: mpgn sxplitfirex


text:
Failure on proc_exit()

edit: I was able to reduce the issue to proc_exit, see edit history for the original post.
Consider the minimal WASM core module:
(module
  (import "wasi_snapshot_preview1" "proc_exit" (func $proc_exit (param i32)))

  (memory 1)
  (export "memory" (memory 0))

  (func $main (export "_start")
    (call $proc_exit
      (i32.const 0)
    )
  )
)

successfully runs on wasmtime
componetizing with wasm-tools component new --adapt <path/to/preview-1-adapter>.command.wasm yields a component which also runs successfully
virtualizing the component with --allow-all proceeds, but running the virtualized component gives

Error: failed to run main module `wasi-min-test-comp-virt.wasm`

Caused by:
    0: failed to invoke `run` function
    1: error while executing at wasm backtrace:
           0: 0x109b6 - <unknown>!<wasm function 199>
           1:  0x1d5 - <unknown>!<wasm function 9>
           2: 0x1057 - wit-component:adapter:wasi_snapshot_preview1!wasi_snapshot_preview1::bindings::wasi::cli::exit::exit::hf9e2fc729a0e81cd
           3:  0xc4d - wit-component:adapter:wasi_snapshot_preview1!proc_exit
           4: 0x1855 - wit-component:shim!adapt-wasi_snapshot_preview1-proc_exit
           5:  0x28b - <unknown>!<wasm function 1>
           6:  0x4e7 - wit-component:adapter:wasi_snapshot_preview1!wasi:cli/run@0.2.0-rc-2023-10-18#run
    2: wasm trap: wasm `unreachable` instruction executed

wasmtime 14.0.4
wasm-tools 1.0.54
wasi-virt 0.1.0

The above succeeds when specifically passing --allow-exit. Also, running with --allow-clocks crashes WASI-Virt
assertion failed: prev.is_none() ||\n    (matches!(id, ComponentAnyTypeId :: Resource(_)) && prev == Some(value))

I think the clocks issue here is actually a separate bug. Now that WASI-Virt is on the latest bindgen would be great to know if thats still an issue or if you can share a replication further in a new issue.

authors: guybedford leon-thomm

repo: bytecodealliance/WASI-Virt


text:
lldb remote debug , can not connect to  embedders

ENV:
two linux machines, one for lldb ,one for  embedder server .
lldb remote debug, lldb can not connect to  embedder server.
embedder server tcp port is ready.  (telnet 172.24.235.192 1234)
Any advice will be appreciated.

embedder server cmakeList.txt:

cmake_minimum_required(VERSION 3.10)
project(HELLO C)
MESSAGE(STATUS  "${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR}" )
set(CMAKE_C_STANDARD 11)
set (WAMR_BUILD_PLATFORM "linux")
set (WAMR_BUILD_TARGET "X86_64")
set (WAMR_BUILD_INTERP 1)
set (WAMR_BUILD_DEBUG_INTERP 1)
set (WAMR_BUILD_AOT 0)
set (WAMR_BUILD_LIBC_BUILTIN 1)
set (WAMR_BUILD_LIBC_WASI 1)
set (WAMR_ROOT_DIR "/mnt/e/Study/C/wasm-micro-runtime-WAMR-1.2.0")
include (${PROJECT_SOURCE_DIR}/../wasm-micro-runtime-WAMR-1.2.0/build-scripts/runtime_lib.cmake)
add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
add_executable(hello   src/main.c )
target_link_libraries (hello vmlib  -lpthread -lm)

main.c
#include <stdio.h>
#include <string.h>
#include "wasm_export.h"
#include "platform_common.h"

int main()
{
    char * x = NULL;
    char *buffer, error_buf[128];
    wasm_module_t module;
    wasm_module_inst_t module_inst;
    wasm_function_inst_t func;
    wasm_exec_env_t exec_env;
    uint32 size;

    wasm_runtime_init();

    /* Open up card file */
    FILE *file = fopen("/mnt/e/Study/C/webassembly/lib/main.wasm", "r");

    if (!file) {
        fprintf(stderr, "Unable to open/create file\n");
        return 1;
    }

    /* Size of file */
    fseek(file, 0, SEEK_END);
    size = ftell(file);
    fseek(file, 0, SEEK_SET);

    if (!(buffer = malloc(size * sizeof(char)))) {
        fprintf(stderr, "Failed to allocate memory\n");
        return 1;
    }

    size_t read = fread(buffer, 1, size, file);

/* all the runtime memory allocations are retricted in the global_heap_buf array */
    static char global_heap_buf[512 * 1024*8];
    RuntimeInitArgs init_args;
    memset(&init_args, 0, sizeof(RuntimeInitArgs));
    strcpy(init_args.ip_addr, "172.24.235.192");
    init_args.instance_port = 1234;
/* configure the memory allocator for the runtime */
    init_args.mem_alloc_type = Alloc_With_Pool;
    init_args.mem_alloc_option.pool.heap_buf = global_heap_buf;
    init_args.mem_alloc_option.pool.heap_size = sizeof(global_heap_buf);

    if (!wasm_runtime_full_init(&init_args)) {
        return false;
    }

    /* parse the WASM file from buffer and create a WASM module */
    module = wasm_runtime_load(buffer, size, error_buf, sizeof(error_buf));
    uint32 stack_size = 80920*2, heap_size = 80920*2;
    /* create an instance of the WASM module (WASM linear memory is ready) */
    module_inst = wasm_runtime_instantiate(module, stack_size, heap_size,
                                           error_buf, sizeof(error_buf));

    /* creat an execution environment to execute the WASM functions */
    exec_env = wasm_runtime_create_exec_env(module_inst, stack_size);
    wasm_runtime_start_debug_instance(exec_env);

    int xz =0 ;
    scanf("%d",&xz);
    printf("good .......");
}

wasm c code from https://bytecodealliance.github.io/wamr.dev/blog/wamr-source-debugging-basic/#debugging-with-cli
main.wasm.zip
PLUS: HOW TO BUILD LLDB for windows? my previous issue
https://github.com/bytecodealliance/wasm-micro-runtime/issues/2054

Hi, I can't re-produce the problem on my machine, could you please run iwasm with -v=5 and attach the log here?

Hi, I can't re-produce the problem on my machine, could you please run iwasm with -v=5 and attach the log here?

Sorry. A bit confused here. I'm trying to embed wasm debugger  into my program ,act as a debugger server.
in client side, i want to user lldb remote conect to debugger server and debug the wasm loaded in the debugger server.
i can not connect to the  debugger server using lldb.
I've test the the same main.wasm.zip . lldb connect to  iwasm is ok.
It seems that ' run iwasm with -v=5'  does not help too much . debugger server does not need iwasm.exe

HI, thanks for your time.
this is the log info:
[06:57:10:496 - 7F0A68C8A880]: No aux stack info for this module, can't create thread
[06:57:10:612 - 7F0A68C8A880]: No aux stack info for this module, can't create thread
[06:57:10:938 - 7F0A68C89700]: control thread of debug object 0x563b446a11e8 start
[06:57:10:311 - 7F0A68C89700]: Debug server listening on 0.0.0.0:1234
[06:57:10:362 - 7F0A68C89700]: listen for gdb client
[06:57:10:402 - 7F0A68C89700]: waiting for gdb client to connect...
[06:59:18:993 - 7F0A68C89700]: accept gdb client
[06:59:18:655 - 7F0A68C89700]: receive request:Q StartNoAckMode
[06:59:18:704 - 7F0A68C89700]: send replay:OK
[06:59:18:767 - 7F0A68C89700]: receive request:q Supported:xmlRegisters=i386,arm,mips,arc;multiprocess+
[06:59:18:817 - 7F0A68C89700]: send replay:qXfer:libraries:read+;PacketSize=1000;
[06:59:18:230 - 7F0A68C89700]: receive request:Q ThreadSuffixSupported
[06:59:18:293 - 7F0A68C89700]: send replay:
[06:59:18:597 - 7F0A68C89700]: receive request:Q ListThreadsInStopReply
[06:59:18:647 - 7F0A68C89700]: send replay:
[06:59:18:338 - 7F0A68C89700]: receive request:q HostInfo
[06:59:18:391 - 7F0A68C89700]: send replay:vendor:wamr;ostype:wasi;arch:wasm32;triple:7761736d33322d77616d722d776173692d7761736d;endian:little;ptrsize:4;
[06:59:19:395 - 7F0A68C89700]: receive request:v Cont?
[06:59:19:464 - 7F0A68C89700]: send replay:vCont;c;C;s;S;
[06:59:19:039 - 7F0A68C89700]: receive request:q VAttachOrWaitSupported
[06:59:19:103 - 7F0A68C89700]: send replay:
[06:59:19:571 - 7F0A68C89700]: receive request:Q EnableErrorStrings
[06:59:19:618 - 7F0A68C89700]: send replay:OK
[06:59:19:543 - 7F0A68C89700]: receive request:q ProcessInfo
[06:59:19:593 - 7F0A68C89700]: send replay:pid:1;parent-pid:1;vendor:wamr;ostype:wasi;arch:wasm32;triple:7761736d33322d77616d722d776173692d7761736d;endian:little;ptrsize:4;
[06:59:19:977 - 7F0A68C89700]: receive request:?

Hi, seems the debug-server is hang at https://github.com/bytecodealliance/wasm-micro-runtime/blob/403ccf02b72760888b5cf7f8bab69723dad69a8e/core/iwasm/libraries/debug-engine/handler.c#L524
Are you using iwasm or your own embedder? I haven't seen such problem with iwasm, if you are using your own embedder, then could you tell me what's the status of the interpreter thread? Seems it's already running and didn't stopped after debugger connected

repo: bytecodealliance/wasm-micro-runtime


text:
Different output compared with other runtimes when running the same wasm file.

I constructed a wasm binary with an exported function called "main". I used the following command and compared the outputs of WAMR with other runtimes.
filea11469.zip
The outputs of WAMR are different from other runtimes.
The outputs are as follows:
-----------------wasmtime-----------------
warning: using `--invoke` with a function that returns values is experimental and may break in the future
273259214178669631251559286600676263891
273259214178669631251559286600676263891
273259214178669631251559286600676263891
273259214178669631251559286600676263891
273259214178669631251559286600676263891
273259214178669631251559286600676263891
273259214178669631251559286600676263891
273259214178669631251559286600676263891
273259214178669631251559286600676263891

-----------------wasmer-----------------
273259214178669631251559286600676263891 273259214178669631251559286600676263891 273259214178669631251559286600676263891 273259214178669631251559286600676263891 273259214178669631251559286600676263891 273259214178669631251559286600676263891 273259214178669631251559286600676263891 273259214178669631251559286600676263891 273259214178669631251559286600676263891

-----------------wamr-----------------
[08:57:50:589 - 7F9871368780]: warning: a module with WASI apis should be either a command or a reactor
Create AoT compiler with:
  target:        x86_64
  target cpu:    znver3
  target triple: x86_64-unknown-linux-gnu
  cpu features:
  opt level:     3
  size level:    3
  output format: AoT file
Compile success, file /home/exp/All_number_but_different/filea11469_instr.wasm.aot was generated.
<0x071b41f621de4863 0x4e14500069d76ed7>:v128,<0x071b41f621de4863 0x4e14500069d76ed7>:v128,<0x071b41f621de4863 0x4e14500069d76ed7>:v128,<0x071b41f621de4863 0x4e14500069d76ed7>:v128,<0x071b41f621de4863 0x4e14500069d76ed7>:v128,<0x071b41f621de4863 0x4e14500069d76ed7>:v128,<0x071b41f621de4863 0x4e14500069d76ed7>:v128,<0x071b41f621de4863 0x4e14500069d76ed7>:v128,<0x071b41f621de4863 0x4e14500069d76ed7>:v128

-----------------wasmedge-----------------
273259214178669631251559286600676263891
273259214178669631251559286600676263891
273259214178669631251559286600676263891
273259214178669631251559286600676263891
273259214178669631251559286600676263891
273259214178669631251559286600676263891
273259214178669631251559286600676263891
273259214178669631251559286600676263891
273259214178669631251559286600676263891

I have analyzed it and I think the error may occurred at line 104 of its wat file.

I am very sorry that there is a problem in my analysis. This error may be caused by other instructions. So close the issue.


text:
Trap's message "note" is a bit misleading

Without any env vars set, I get this:
wasm trap: out of bounds memory access
wasm backtrace:
    0: 0x4f3d - <unknown>!opa_value_length
    1: 0x2528 - <unknown>!opa_json_writer_emit_set_literal
    2: 0x22c7 - <unknown>!opa_json_writer_emit_value
    3: 0x27bc - <unknown>!opa_json_writer_write
    4: 0x28f8 - <unknown>!opa_value_dump
    5:  0x791 - <unknown>!opa_eval
note: run with `WASMTIME_BACKTRACE_DETAILS=1` environment variable to display more information

Setting WASMTIME_BACKTRACE_DETAILS=1, I get the same message without the note:
wasm trap: out of bounds memory access
wasm backtrace:
    0: 0x4f3d - <unknown>!opa_value_length
    1: 0x2528 - <unknown>!opa_json_writer_emit_set_literal
    2: 0x22c7 - <unknown>!opa_json_writer_emit_value
    3: 0x27bc - <unknown>!opa_json_writer_write
    4: 0x28f8 - <unknown>!opa_value_dump
    5:  0x791 - <unknown>!opa_eval

Another nitpick is the comment on Message,
https://github.com/bytecodealliance/wasmtime-go/blob/ef5be5d06be1b75ec67150a42d8f336d7c62c57a/trap.go#L48-L49
doesn't seem quite correct 🤔

The message about WASMTIME_BACKTRACE_DETAILS comes from wasmtime itself, and currently it's pretty naive. It basically recognizes that there are unparsed dwarf sections in a wasm module, and prints this message if that is the case. Currently there's no logic along the lines of "we know this backtrace specifically could be improved, so set the env var". Being able to deduce that would require parsing the dwarf sections in the first place which we try to not do by default!
Perhaps a better wording of the message though? Basically say that it "may" improve the backtrace?
Out of curiosity, how are you generating your wasm module? I'm curious why it has some debug information for functions but not for all functions.

It basically recognizes that there are unparsed dwarf sections in a wasm module, and prints this message if that is the case.

Ah, thanks, I wasn't aware. 💡

Basically say that it "may" improve the backtrace?

Hmm, seems a bit petty of me to request such a change -- but yeah, I suppose this would have kept my eye brows down here 😅 But really, it's not important. I've learnt something discussing this with you, thanks for indulging me.

Out of curiosity, how are you generating your wasm module? I'm curious why it has some debug information for functions but not for all functions.

I'm mostly working with wasm emitted from OPA, compiling policies into wasm modules (docs here). It's built from a portion that doesn't depend on the policy in question, C/C++ compiled to wasm via llvm-12, and a bunch of functions compiled from the policy document through a compiler written in Go. The former may contain dwarf sections (but usually doesn't); the latter will not have them.
I might be able to answer this myself digging through the code, but you probably just know -- which sections should I be on the lookout for here? The modules I've been interacting with recently never had dwarf sections in their C/C++ bits 🤔

Ah ok then it's probably the C/C++ and/or the standard library for C/C++ which has dwarf info for some unrelated functions in your case.
You can use wasm-objdump -h I think to print out section names, and dwarf debug information is in custom sections named .debug_*

Thanks for elaborating.

dwarf debug information is in custom sections named .debug_*
I thought I didn't have any of those, usually. I'll double-check this. 🔍

So, I've put together a wasm module that consists of both parts I've described above: custom-built wasm functions, and a C/C++ base.
Its sections are
     Type start=0x0000000b end=0x000000db (size=0x000000d0) count: 27
   Import start=0x000000dd end=0x0000015b (size=0x0000007e) count: 7
 Function start=0x0000015e end=0x00000409 (size=0x000002ab) count: 681
    Table start=0x0000040b end=0x00000410 (size=0x00000005) count: 1
   Global start=0x00000412 end=0x00000424 (size=0x00000012) count: 3
   Export start=0x00000427 end=0x000005b5 (size=0x0000018e) count: 21
    Start start=0x000005b7 end=0x000005b9 (size=0x00000002) start: 686
     Elem start=0x000005bc end=0x00000659 (size=0x0000009d) count: 2
     Code start=0x0000065d end=0x0000df3b (size=0x0000d8de) count: 681
     Data start=0x0000df3f end=0x0001b800 (size=0x0000d8c1) count: 5
   Custom start=0x0001b803 end=0x0001c347 (size=0x00000b44) "name"
   Custom start=0x0001c349 end=0x0001c3ad (size=0x00000064) "producers"

So, there's nothing dwarf-related in it. I've replaced our compiler to toss an unreachable in the eval function, so I can trigger this trap:
$ wasmtime run --preload env=env.wat policy.wasm --invoke eval 10
warning: using `--invoke` with a function that takes arguments is experimental and may break in the future
Error: failed to run main module `policy.wasm`

Caused by:
    0: failed to invoke `eval`
    1: wasm trap: unreachable
       wasm backtrace:
           0: 0xde9c - <unknown>!eval
       note: run with `WASMTIME_BACKTRACE_DETAILS=1` environment variable to display more information

☝ This has the "more information" message although there aren't any dwarf sections. I must be missing something 🤔
When trying to compile a MWE for this, I've noticed that when I convert the policy.wasm to .wat, the "more information" message disappears. Anyways, here's my files: https://github.com/srenatus/scratch-demo-trap

er oops, that's a bug!

Ok and with that most recent PR I think this is good to say it's fixed, thanks again for the report!

authors: alexcrichton srenatus

repo: bytecodealliance/wasmtime-go


text:
VerifierStepResult is confusing

The verifier functions have an API that could probably be simplified. Functions which return VerifierStepResult must by convention also take an out-param VerifierErrors that will contain non-fatal errors.
Moreover, the T in VerifierStepResult<T> seems to always be set to (), so it's unused.
It seems the out param is redundant with the error that's present in the Result hidden VerifierStepResult. I think slightly modifying the interface of VerifierStepResult would avoid this out param:

let the Ok type be VerifierErrors, in case we only have non-fatal errors (they could be called "warnings").
let the Err type stay the same (VerifierErrors too), and contain non-fatal and fatal errors, if there was at least one fatal error.

Then we wouldn't need the errors outparam anymore, which looks cleaner and "more Rusty". It might mean that a few users of the fatal! etc macros would need to have their own errors variable, but that seems OK.
Thoughts?

@cfallin This issue seems finished - could it be a candidate for being closed?

I don't think the core issue is actually resolved at all; and in the linked PR it mentions that it resolved a subpart of the problem only. This could still be a good starter-issue for someone wanting to do some cleanups.

I don't think the core issue is actually resolved at all; and in the linked PR it mentions that it resolved a subpart of the problem only. This could still be a good starter-issue for someone wanting to do some cleanups.

Ah neat, I see. I'll give it a read. :)

authors: aidenfoxivey bnjbvr cfallin

repo: bytecodealliance/wasmtime


text:
Introduce a new API that allows notifying that a Store has moved to a new thread

While potentially unsafe, https://docs.wasmtime.dev/examples-rust-multithreading.html#multithreading-without-send suggests that we can move over a Store and all that's attached to it to other threads. To make this a reality, a new API is required to notify the store that it's been moved over, so that it can initialize trap handling on this particular thread. I've made it an unsafe function, this should catch the eye of the users that they wouldn't need to use it in general. Also added a test that crashed before on a Mac.

I wonder if we should be invoking init_traps automatically when we're about to resume a fiber inside of the async machinery just in case the future moved threads. It would reduce the use case of this to only times when users explicitly move a Store and related components to another thread.

It's a good point, and in fact it's already done automatically by wasmtime after resuming from a suspended fiber: https://github.com/bytecodealliance/wasmtime/blob/main/crates/runtime/src/traphandlers.rs#L436
Your remark makes me notice that this new API would also create a double standard: the runtime may automatically manage switching to a different thread in one case (async import causing wasm execution resuming on a different thread) when in another case one has to explicitly call the new API. The ubiquity of multithreaded future executors makes it justified in my opinion, but that's open to discussion!

Thanks for this! I agree that it's a little odd that this might automatically happen as part of a future execution but then it doesn't automatically happen otherwise, but I agree that it's probably ok for now. Can you add documentation about this function on the multithreading page and also link the documentation on this function to the multithreading page?

Done, thanks!

authors: alexcrichton bnjbvr peterhuene


text:
error="Broken pipe [-32]" path="rtmp:

error="Broken pipe [-32]"
直播间一直黑屏，无法显示

一样的 有点视频可以有的不行

authors: Toanlele rolicon

repo: bytelang/kplayer-go


text:
What's the meaning of "readSourceHash" function?

I just wonder what is the meaning of this function? Why can it work when using "readSourceHash" to produce dummyCode and then pass them as code to "vm.script" function?
const readSourceHash = function (bytecodeBuffer) {

  if (!Buffer.isBuffer(bytecodeBuffer)) {
    throw new Error(`bytecodeBuffer must be a buffer object.`);
  }

  if (process.version.startsWith('v8.8') || process.version.startsWith('v8.9')) {
    // Node is v8.8.x or v8.9.x
    return bytecodeBuffer.slice(12, 16).reduce((sum, number, power) => sum += number * Math.pow(256, power), 0);
  } else {
    return bytecodeBuffer.slice(8, 12).reduce((sum, number, power) => sum += number * Math.pow(256, power), 0);
  }
};

Thanks in advance :)

I wrote about this before, check this article: https://medium.com/hackernoon/how-to-compile-node-js-code-using-bytenode-11dcba856fa9
Let me know if you still have a question.

I wrote about this before, check this article: https://medium.com/hackernoon/how-to-compile-node-js-code-using-bytenode-11dcba856fa9
Let me know if you still have a question.

thanks！！！helps a lot

authors: OsamaAbbas Zhxhh

repo: bytenode/bytenode


text:
🛑 www.ozpsav.sk is down

In b13ba58, www.ozpsav.sk (https://www.ozpsav.sk/sk/Odborovy-zvaz.alej) was down:

HTTP code: 403
Response time: 665 ms

Resolved: www.ozpsav.sk is back up in 3b0f598.