update Metadata data storage structure in Entity class

Metadata should also be a list as agreed on Slack

hey @TianhaoHarryZhang can remind me where this convo happened? is this via slack or email? thxx!

Excuse me. I did this mistakenly and it was supposed to happen to my own cloned version of papermage. Sorry for any trouble


Plugin doesn't work anymore on Sketch older versions

Because of the Sketch 52 update, the plugin doesn't work on previous versions such as 51. Is there any way to make it work again?
Thanks,

@FabienLaborie, @netizenwu, thank you for bringing this to my attention, apologies for the inconvenience! I was able to confirm that using Symbol Organizer with titles in versions prior to Sketch 52 was indeed broken. I just published a fix for backwards compatibility (v15.6). Please update and let me know if it resolves your issue.

I'm sincere thanks to your hotfix.


Chrome throwing warning while rendering pdf and file is not rendering(page is blank)

jax_rs-1_1-mrel-spec.pdf
I have attached the file and tested in chrome - Version 48.0.2564.97 m -  in windows 10 and it is working,
even i tested with mozilla viewer and working fine in chrome http://mozilla.github.io/pdf.js/web/viewer.html,
but when i tried to test same thing in chrome -Version 48.0.2564.109 (64-bit) OS X - 10.11.3,it is not rendering the page and throwing warning ,page is blank. (I have attached screenshot of it)

.
My code is
$scope.renderPDF = function (url, canvasContainer) {
    var options = {scale: 2};

    $scope.renderPage = function (page) {
        var viewport = page.getViewport(options.scale);
        var canvas = document.createElement("canvas");
        canvas.setAttribute("id", "canvas" + $scope.count);
        canvas.setAttribute("class", "tpam-canvas-content");
        var ctx = canvas.getContext('2d');
        var renderContext = {
            canvasContext: ctx,
            viewport: viewport
        };

        canvas.height = viewport.height;
        canvas.width = viewport.width;
        canvasContainer.appendChild(canvas);

        page.render(renderContext);
        $scope.count++;
        if($scope.count <= $scope.pdfDocObj.numPages){
            $scope.pdfDocObj.getPage($scope.count).then($scope.renderPage);
        }
        $loading.finish('pdfPageLoaded');
    };

    $scope.renderPages = function (pdfDoc) {
        $scope.pdfDocObj = pdfDoc;
        $scope.pdfTotalPages = pdfDoc.numPages;
        $scope.pdfPageLoaded = true;
        pdfDoc.getPage($scope.count).then($scope.renderPage);

};
//PDFJS.getDocument("scripts/OAUTH2.pdf").then($scope.renderPages, $scope.errorHandling);
//PDFJS.workerSrc = 'bower_components/pdfjs-dist/build/pdf.worker.js';
PDFJS.workerSrc = 'scripts/pdf.js';
PDFJS.getDocument(url).then($scope.renderPages, $scope.errorHandling);
};

Could you setup a demo online somewhere? It's difficult to find the issue from a code fragment.

No response, closing. I can only imagine that it's not liking that renderPage does not actually render one page, but multiple, leading to a large call stack it's complaining about.


Each entry uses up too much memory and clear doesn't clear memory used.

This might need to be two issue reports but both relate to memory usage.
I found that the application was eating ~300MB at 500 entries and 6.5GB of memory at 23000 entries.
To quickly reproduce, change this line in TestApp MainWindow.cs:
Observable.Interval(TimeSpan.FromMilliseconds(10)).ObserveOnDispatcher().Subscribe(l =>

Also, the Pause button stops the addition of new log entries and pauses the memory growth. However, the Clear command clears the shown log entries but does not clear the memory used thus creates a memory leak.
[Edit]I re-ran the app with just 100 entries (Take(100)) which settled at roughly 69.3MB with a start memory of 27.8MB (before any entries). This generates 41.5MB for 100 records.

I have tried the app and after pressing clear, you can see that the GC is releasing memory.

Maybe you can give some hints, how we can boost the performance

I opened a branch (https://github.com/dojo90/NLogViewer/tree/1-each-entry-uses-up-too-much-memory-and) and made some changes. Can you please test the changes? If you agree with me, I would merge it and publish a new nuget.

I merged the changes and created a new nuget package


Create a contact info block

Add links to social networks (LinkedIn, Facebook, Instagram), phone number, email, Telegram username, etc.

Add contact block styles
Add contact block html
Fill contact block own info

Looking for my best photo. Hmm, I have no any good photos


Introduce bulk transfer for GroupBy query

Map --> Object[] --> array of typed[]
About more removing of type information in JSON format (row * column bytes max)

Done


Make sure we have correct dependencies in renative wiki

Bootstrapping on a new laptop fails because of node-canvas depencencies pixman, cairo and pango from brew. Make sure they are part of the wiki

command to be used:
brew install pkg-config cairo pango libpng jpeg giflib librsvg


Adapter cannot receive attachments from incoming webhook

I'm sending an attachment to a bot user, but the bot user cannot receive the attachment.
I'm running this command from the commandline to send the message to the bot:
curl -X POST --data-urlencode 'payload={"username":"Talkative","text":"right","attachments":[{"title":"Rocket.Chat","title_link":"https://rocket.chat","text":"Rocket.Chat, the best open source chat","image_url":"https://rocket.chat/images/mockup.png","color":"#764FA5"}]}' https://example.net/hooks/2quHBXxNmethKpsNG/sDE2aKQQJF4LXY9waqm9WtF4hD7WAJEk2TyAGeq2R9YmgAXg

By adding console log, I can see that the msg.message do not have any attachments on it.
TextMessage {
  user:
   User {
     id: 'rocket.cat',
     name: 'rocket.cat',
     alias: 'Talkative',
     room: 'GENERAL' },
  text: 'right',
  id: 'cHk3CtZjPKyZbmveC',
  done: false,
  room: 'GENERAL' }

I can see from a previous commit 4011a9ed8 that we are testing the existence of attachments by if newmsg.file? and newmsg.attachments.length. I guess it is possible that the incoming message from webhook does not contain a file, so this message is treated as a normal text-only message. Maybe we should change the and in the test to or?

And I noticed another improper thing in the attachment handling. In the creation of an AttachmentMessage:
message = new AttachmentMessage user, attachment, attachment.title, newmsg._id

The title of the attachment is used, thus the message text in the original newmsg object is lost. We should instead use:
message = new AttachmentMessage user, attachment, newmsg.msg, newmsg._id


Clearing console adds an empty line before Prompt()

When using clear, PSColor adds an empty line on first row of terminal window, making the Prompt function start at the second line.
I took a look at the code and the root cause seems to be at PSColor.psm1@57:

There's a Write-Host "" that inserts the empty line.
My console with said Write-Host (original code):

My console with line 57 commented:

I'm not very skilled in PowerShell, so my Issue is basically for asking: is line 57 necessary? I removed it and nothing seemed to break.

I'd the same problem. This change could be merged?

@rafaeloledo I forked this project a while ago, and this issue is fixed on my version. Seems like this project is not maintained anymore.
Ironically though, for the last year or so, I have been using zsh on macOS. Haven't been able to give this project as much attention as I wanted, but I'm planning to go back to it soon.
https://github.com/brunovieira97/ps-color


Mixtures and pointwise mutual information: add features from TensorFlow Probability

– I have decided that mixtures, like tequila, are inherently evil and should be avoided at all costs.
Larry Wasserman
This PR adds the distributions from TensorFlow Probability (on JAX), which can be used to estimate MI using Monte Carlo integration. It supports selected transformed distributions (possible thanks to TFP bijectors) and mixture models.
:chart_with_upwards_trend: Introduced changes
:steam_locomotive:  Features added

A distribution class, based on TensorFlow Probability which is used to model a probability distribution $P_{XY}$ with known marginals $P_X$ and $P_Y$.
Implemented as main examples: multivariate normal and Student distributions.
These distributions can be arbitrarily (a) transformed using TensorFlow Probability bijectors, (b) mixed into mixture distributions.
Utilities for drawing samples from the pointwise MI distribution ("PMI profile") and estimating mutual information using Monte Carlo.

:microscope:  Experiments performed

Visualisations of PMI for several $(1+1)$-dimensional distributions. (See the cool plot below!)
PMI profiles for several distributions.

:sparkles:  Other changes

Workflows used to generate Beyond Normal paper have been moved to a subdirectory (workflows/Beyond_Normal). Note: although it seems that many files have been modified, majority of them has just been moved to another directory, so they don't need to be reviewed at all.
A new subdirectory (workflows/Pointwise_MI) has been created, which is supposed to host the workflows for the new project.
As a dependency we now require TensorFlow Probability on JAX. Requirements file (pyproject.toml) has been amended.

:no_entry: Known limitations

The transformed distributions can be somewhat unstable: can result in NaNs for PMI values and float overflow. (Perhaps using float64 could help? But see below...)
Monte Carlo Standard Error seems to be too small. I suspect that variance of PMI can perhaps be infinite (or very large) and finite samples underestimate it. Although Monte Carlo integration relies on the strong law of large numbers (and we don't need finite variance to be able to estimate the expected value, MI), the convergence can be very slow (as the guarantees for Monte Carlo Standard Error assume that the variance is finite and estimates it using the sample variance). As a simple (but more costly) alternative: we can run Monte Carlo 20 times for $N=20,000$ and use this to quantify the error in the estimates. From my experience standard error calculated this way is larger than MCSE calculated from one sample, but still small for a large number of data points.
An alternative way to estimate MI (although the overall Monte Carlo Standard Error seems trickier to control) is to estimate differential entropies via Monte Carlo sampling. Perhaps it'd be more stable numerically: it's essentially the difference between $\mathbb E\big[\log p_{XY}(x, y) -\left(\log p_X(x) + \log p_Y(y)\right) \big]$ and $\mathbb E[\log p_{XY}(x, y)] - \big(\mathbb E[\log p_X(x)]  + \mathbb E[\log p_Y(y)]\big)$.
Using 64-bit float does not seem to work. Further investigation is needed.
Currently TFP distributions are not compatible with benchmark (i.e., Sampler and Task classes). This is a third object of similar functionality, which may be somewhat confusing. We need a wrapper to make them into Sampler or Task, but can't really replace Sampler with them:

The API is quite a different as they serve slightly different purposes.
Samplers can be transformed via arbitrary continuous injective mappings implemented in JAX, while TFP supports only bijectors (to calculate PMI we need to calculate $\log p$. Samplers don't have this utility, only mutual information).
We have several custom JAX mappings (e.g., wiggly mapping, normal CDF, "bimodal") which haven't been implemented as TFP bijectors.

Unit tests and workflows are very basic.

:rock:  Tasks
This list of tasks is for me to keep track of the progress. It does not need to be read during the review.
Added features:

[x] Core object representing the distributions $P_X$, $P_Y$ and $P_Y$.
[x] Mixture distribution.
[x] Transformed distribution via product diffeomorphism $f\times g$.
[x] Sampling.
[x] PMI profile calculation.
[x] Implement multivariate normal distribution.
[x] Implement multivariate Student distribution.

Unit tests:

[x] Test whether a mixture can be formed.
[x] Test whether a transformed distribution can be defined.
[x] Check whether the MI estimate of transformed distribution is the same as of the original one.
[x] Check whether the MI estimate of multivariate normal agrees with the analytical formula.
[x] Check whether the MI estimate of multivariate Student agrees with the analytical formula.

Workflows:

[x] Visualisations of PMI for several $(1+1)$-dimensional distributions.
[x] PMI profiles for several distributions.

Nice coding! I think the new class colliding with Sampler and Task is not that big of a deal since for now we use the previous ones for the main project, and the new one for the new project. But we could think about integrating them somehow. For example, we could give Sampler and optional pdf(x) function, and automatically implement it for transformed functions (if they are tf bijectors, or just differentiable surjections written in jax)


KAFKA-15492: Enable spotbugs when building with Java 21

spotbugs 4.8.0 has a number of new warnings that are enabled by default:

CT_CONSTRUCTOR_THROW: disable due to too many false positives
PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_*: disable due to too many false positives
PA_PUBLIC_MUTABLE_OBJECT_ATTRIBUTE: disable for Scala and for a few Streams
classes, fix other instances.
RV_EXCEPTION_NOT_THROWN: disable due to too many false positives.
SS_SHOULD_BE_STATIC: disable for jmh code, fix other instances.
DM_DEFAULT_ENCODING: fix every case.

Changelog: https://github.com/spotbugs/spotbugs/blob/4.8.0/CHANGELOG.md
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

Looks like the new version is not in the Maven repo yet. Will remove draft once that's resolved.

Thanks for the review. In general, we have assumed UTF-8 since that's the default for Linux and MacOS. It has become the default for all platforms since Java 18: https://openjdk.org/jeps/400

Build is successful. Unrelated test failures:
[Build / JDK 21 and Scala 2.13 / org.apache.kafka.streams.integration.NamedTopologyIntegrationTest.shouldAddNamedTopologyToRunningApplicationWithSingleInitialNamedTopology()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-14533/4/testReport/junit/org.apache.kafka.streams.integration/NamedTopologyIntegrationTest/Build___JDK_21_and_Scala_2_13___shouldAddNamedTopologyToRunningApplicationWithSingleInitialNamedTopology__/)
[Build / JDK 21 and Scala 2.13 / org.apache.kafka.trogdor.coordinator.CoordinatorTest.testTaskRequestWithOldStartMsGetsUpdated()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-14533/4/testReport/junit/org.apache.kafka.trogdor.coordinator/CoordinatorTest/Build___JDK_21_and_Scala_2_13___testTaskRequestWithOldStartMsGetsUpdated__/)
[Build / JDK 17 and Scala 2.13 / org.apache.kafka.connect.integration.ConnectorRestartApiIntegrationTest.testMultiWorkerRestartOnlyConnector](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-14533/4/testReport/junit/org.apache.kafka.connect.integration/ConnectorRestartApiIntegrationTest/Build___JDK_17_and_Scala_2_13___testMultiWorkerRestartOnlyConnector/)
[Build / JDK 17 and Scala 2.13 / kafka.api.DelegationTokenEndToEndAuthorizationWithOwnerTest.testCreateTokenForOtherUserFails(String).quorum=kraft](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-14533/4/testReport/junit/kafka.api/DelegationTokenEndToEndAuthorizationWithOwnerTest/Build___JDK_17_and_Scala_2_13___testCreateTokenForOtherUserFails_String__quorum_kraft/)
[Build / JDK 17 and Scala 2.13 / kafka.api.SaslScramSslEndToEndAuthorizationTest.testAuthentications(String).quorum=zk](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-14533/4/testReport/junit/kafka.api/SaslScramSslEndToEndAuthorizationTest/Build___JDK_17_and_Scala_2_13___testAuthentications_String__quorum_zk/)
[Build / JDK 17 and Scala 2.13 / kafka.server.DescribeClusterRequestTest.testDescribeClusterRequestIncludingClusterAuthorizedOperations(String).quorum=kraft](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-14533/4/testReport/junit/kafka.server/DescribeClusterRequestTest/Build___JDK_17_and_Scala_2_13___testDescribeClusterRequestIncludingClusterAuthorizedOperations_String__quorum_kraft/)
[Build / JDK 17 and Scala 2.13 / org.apache.kafka.tiered.storage.integration.TransactionsWithTieredStoreTest.testBumpTransactionalEpoch(String).quorum=kraft](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-14533/4/testReport/junit/org.apache.kafka.tiered.storage.integration/TransactionsWithTieredStoreTest/Build___JDK_17_and_Scala_2_13___testBumpTransactionalEpoch_String__quorum_kraft/)
[Build / JDK 17 and Scala 2.13 / org.apache.kafka.trogdor.coordinator.CoordinatorTest.testTaskRequestWithOldStartMsGetsUpdated()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-14533/4/testReport/junit/org.apache.kafka.trogdor.coordinator/CoordinatorTest/Build___JDK_17_and_Scala_2_13___testTaskRequestWithOldStartMsGetsUpdated__/)


Cant figure out how to add time served to log-format

Could you please post, this would be very helpful:

Command line and configuration file if any of your live demo instance
CustomLog line of your httpd.conf (assuming you are showing Apache log)
One line from httpd access.log

I use goaccess 1.7
It works successfully with --log-format=COMBINED
What I'm trying to achieve : add  time served, just like in your demo instance.
I noted this instruction in your man page and added %D, now I have to use custom log format. Spent days trying to figure out.

In order to get the average, cumulative and maximum time served in GoAccess,
you will need to start logging response times in your web server.
In Nginx you can add $request_time to your log format, or %D in Apache.

This works:
cat <<EOF | goaccess --log-format=COMBINED
<IP_ADDRESS> - - [16/Feb/2023:16:27:35 -0500] "GET /path/v1/healthcheck HTTP/1.1" 200 2 "-" "Jersey/2.35 (Apache HttpClient 4.5.1)"
EOF

This doesn't work (note number between ] and GET). I tried different variations of patterns between [] :
cat <<EOF | goaccess --datetime-format='%d/%b/%Y:%H:%M:%S %z' --log-format='%h %l %u [%d:%t%^] %D "%r" %s %b "%f" "%a"'
<IP_ADDRESS> - - [16/Feb/2023:16:27:35 -0500] 115030 "GET /path/v1/healthcheck HTTP/1.1" 200 2 "-" "Jersey/2.35 (Apache HttpClient 4.5.1)"
EOF

I can put %D at the end of the log line if that makes it easier.
Would be nice to be able to say something like this (conceptually), rather than specifying everything:
--log-format=COMBINED+' %D'

Please take a look at the man page for details on the specifiers. In any event, this should do it:
goaccess access.log --datetime-format='%d/%b/%Y:%H:%M:%S %z' --log-format='%h %^[%x] %D "%r" %s %b "%R" "%u"'

Closing this. Feel free to reopen it if needed.


logdb: fixed

it has been fixed in master, thank you.
as I currently use release2.1 for further test and integration with my project, I suppose it should be fixed in release2.1

release-2.1 has been patched, v2.1.7 has been released with the leveldb memory leak fix.
please continue to provide feedback when you see anything broken or strange. thanks!


goimports: Adjust the local prefix to include the project

What this PR does / why we need it:
The current goimports local prefix covered the kubevirt organization
and not the kubevirt/kubevirt project itself.
It is useful to see in the source files the dependencies which come from
outside the project. Therefore, updating the local prefix allows
the imports to be structured correctly into blocks that exposes local
and non-local dependencies.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
This is a huge PR due to the inability to split the auto-format coverage.
Luckily, it does a simple operation with no manual intervention.
This is an alternative to #8033 .
Release note:
NONE

/test pull-kubevirt-build

For some unclear reason “make generate” fails.
/hold

change: Rebased and also added changed imports that got updated after running make generate.

For some unclear reason “make generate” fails.
/hold

make generate causes other files to be processed by the goimports. Including the effected additional files resolved it.
/unhold


Color-coded JSON output from the CLI

The current output isn't easily parseable. Would be easier to parse if it was JSONL with each line being a JSON object/array.
Something like:
["+", 312879, 3829, "hello world"]

done


Wrong Docker image suffix

Checklist

[X] I've read the contribution guidelines.
[X] I've searched other issues and no duplicate issues were found.
[X] I'm convinced that this is not my fault but a bug.

Description
Assumed Docker image name (e.g. run script) does not match. Seems it is double-dashed by mistake.
Expected behavior
Can pull image
Actual behavior
Can't pull image
Steps to reproduce
docker pull ghcr.io/autowarefoundation/autoware:universe-devel-cuda
Versions
No response
Possible causes
No response
Additional context
No response

it should be fixed now. @amadeuszsz


Refresh functionality for available devices

Related issues:
Fixes #11
Description
Using pull_to_refresh flutter package, I have added refresh functionality to Available devices in discover.dart.

@sanket143 please have a look at this.

give @ritvij14 25 points

give @ritvij14 25 points


How to use xPERIODICx scripts?

Is there an official way to use the xPERIODICx scripts? Do I just copy them to the /etc/cron.daily directory? The script refers to source_periodic_confs  function in its first statement that I could not locate. Also there is a xPREFIXx in the zfSnap command that ought to be replaced by something sane. Is the user simply expected to do:
cp /usr/share/doc/zfsnap/examples/xPERIODICx_zfSnap.sh /etc/cron.daily/daily_zfSnap.sh'
cd /etc/cron.daily/
sed -i 's/xPERIODICx/hourly/' daily_zfSnap.sh
sed -i 's/xPREFIXx/\/usr\/sbin/' daily_zfSnap.sh

Or is there an official way to use it that I can't seem to figure out. There appears to be no documentation on this.

Ok, I figured it out. It is to be used with BSD based OSes.


The Sky Is Falling For Real This Time

Your checklist for this pull request
About The Game
What is your game about?
The "Sky," or group of clouds, is falling. You, the player, must dodge the sky and get a new highscore!
How to play your game?
Use A and D to move left and right. That's it. It's that simple.
Code
Check off the items that are true.

[X ] The game was made using the Sprig editor.
[X ] The game is placed in the in the /games directory.
[X (Used a tutorial, not sure if others used the same) ] The code is significantly different from all other games in the Sprig gallery (except for games labeled "demo").
[ X] The game runs without errors.
[ X] The name of the file/game contains only alphanumeric characters, -s, or _s.
[X ] The game name is not the same as the others from gallery

Image (If an image is used)

[ ] The image is in the /games/img directory.
[ ] The name of the image matches the name of your file.

Thanks for PR!

Great game! Remember me Stumble Guys (idk why haha), just one thing, () is not allowed in the title

What do you mean Stumble Guys? I fixed the title, am I eligible for a Sprig?

What do you mean Stumble Guys?

I fixed the title, am I eligible for a Sprig?
If you're a teen, yes


Display additional media types

See the related issue SpencerPark/jupyter-jvm-basekernel#2 for richer rendering.
The trouble with the java kernel is that the evaluation always returns a string and so unfortunately we will need to double serialize the rendered data and somehow notify the kernel that the string it is receiving is in fact rich data.
This means that the serialization must happen within the shell (not the kernel) and will need some transformation like those done to support magics.

There is process made towards this in 9a5b7b1037a03dc00a033041dd5499757053f616. We need to run on the same JVM because all of the work towards rendering needs the type information as an object. This left 2 choices, run the rendering in the shell's JVM and serialize it (which wouldn't support displaying the last expression without a preprocessor) or move everything to the same JVM so that there is access to the actual evaluation result.
See also some work in jupyter-jvm-basekernel/mime-rendering which should hopefully be closer to merging with this same-jvm branch progress.

Initial support is in 347e3cf492c954223ef018b0ba22f084f95c7d26!

Functionality is now on master.


Handle organize errors

What's this PR do?
We do some frontend validation on the registration form ourselves, but Organize also does validation and can tell us things like the zip code that was provided wasn't found in the state that was provided and other things.
This PR just displays all theses errors before and asks that the user fixes them before moving on to the next step.

How should this be reviewed?
Try and submit the form with a bunch of fake data, if there are any issues our validation should force you to fix it, and if there are errors on the organize side, their validation should help to fix it.
Any background context you want to provide?
This should also solve for #6653 and #6652 ... Instead of writing more custom validations, if the SSN is not formatted correctly or the TOS field is not checked we display the Organize errors to the user.
Relevant tickets
Fixes #6653
Fixes #6652
Fixes #6670
Checklist

[x] Pinged a PM if this is a larger PR that would benefit from some additional testing love.

👍 🚀


Timeout

relates #4102
Description of the change:
Adds a timeout flag to helm operator's manager. This instructs the helm action to timeout after a set duration, default is set to 5m just like helm cli.
I updated the context passed down from reconcile. The packages being called ignore their context, so it's not currently useful for timing out those packages.
Motivation for the change:
Helm by default implements a timeout. This timeout is used when using the --wait command to have helm give up after attempting an action for a period of time. The current operator does not implement any timeout and instead returns immediately after any action.
Checklist
If the pull request includes user-facing changes, extra documentation is required:

[ ] Add a new changelog fragment in changelog/fragments (see changelog/fragments/00-template.yaml)
[ ] Add or update relevant sections of the docs website in website/content/en/docs

The current operator does not implement any timeout and instead returns immediately after any action.

This is by design based on the discussion in #4102. Though as I've researched this, I realize that we're using the default .Timeout (0s) for install/upgrade/uninstall. This translates to infinite waits when the timeout is actually used, which is to wait for hook jobs and pods to be ready. It is also used to wait for release resources to be ready when .Wait is true, but we currently never set .Wait to true.

The packages being called ignore their context, so it's not currently useful for timing out those packages.

Since Helm's kube.Interface client interface doesn't support contexts, I don't think we should use anything other than context.TODO() for now. Using contexts with timeouts in the reconciler may confuse users and contributors, who will get the impression that the underlying manager calls will be cancelled by those timeouts. Based on comments in https://github.com/helm/helm/issues/7958, it seems unlikely that this will change before Helm v4 is released.
The fact that we're using infinite waits and context.TODO() means that many client calls cannot be cancelled, which is not ideal. But since the Helm SDK doesn't honor or use contexts, there isn't a whole lot we can do. The one clear place that can be improved is the .Timeout fields used in hooks and waits.
Would you be okay with holding on this PR and opening an issue about all the cancellation concerns in the helm operator reconciler. I think given the direction of #4102, the cancellation concerns I can think of are:

waiting for hook jobs to complete and hook pods to be ready (we currently don't timeout)
cancelling helm client calls (seems unlikely before helm v4)
any other cancellable operations outside the scope of the helm action package
if any changes will be necessary to handle the fact that controller-runtime v0.7.0 will pass a context.Context in the Reconcile method signature.

Since wait is not currently supported, it’s fairly harmless to allow timeout to be specified despite it doing nothing. It can be added in helm’s half implemented way just as well here as in the binary.
I’m fine with reverting contexts back to TODO(). I think either approach TODO() or WithTimeout() is confusing as the context are not used.

Since wait is not currently supported, it’s fairly harmless to allow timeout to be specified despite it doing nothing. It can be added in helm’s half implemented way just as well here as in the binary.

Perhaps I'm missing something, but what's the value in adding a configurable timeout if it does nothing? That would lead to confusion and users rightfully opening issues asking why setting the timeout doesn't work.

I think either approach TODO() or WithTimeout() is confusing as the context are not used.

One of the stated purposes of context.TODO() is to signal that the use of a context is not yet available or when the surrounding function doesn't support it. Both of these cases apply to the helm operator's Reconcile function.
The SDK release.Manager interface has existed since helm v2 when the tiller libraries we used did accept a context. When we made the switch to Helm v3, we lost the ability to pass contexts but did not want to break the Manager interface by removing contexts from its methods.

HI @drewwells,
Thank you for your contribution. 🥇

Since wait is not currently supported, it’s fairly harmless to allow timeout to be specified despite it doing nothing.

I agree with @joelanford position as well  That would lead to confusion and users rightfully opening issues asking why setting the timeout doesn't work.
I do not think that we should add because any additional should address a need and adds real value to the project. Otherwise, it only brings confusion for end-users and maintainers as well. I mean, reduce the maintainability of the project.
In this, I hope that would be fine we close this one and we open an issue to address it as suggested by @joelanford on he comment:

opening an issue about all the cancellation concerns in the helm operator reconciler. I think given the direction of #4102, the cancellation concerns I can think of are:

waiting for hook jobs to complete and hook pods to be ready (we currently don't timeout)
cancelling helm client calls (seems unlikely before helm v4)
any other cancellable operations outside the scope of the helm action package
if any changes will be necessary to handle the fact that controller-runtime v0.7.0 will pass a context.Context in the Reconcile method signature.

WDYT? Could you please open this issue?

I am closing this one based on the previous comments see; https://github.com/operator-framework/operator-sdk/pull/4115#issuecomment-719829947, however, please feel free to ping us if you think that it should be re-opened and would be very nice get your help to track the issue.


Try to flatten file structure

Make a new branch and try moving robotserver.py and it's config files down to the root
rename  robotserver.py to robot.py

To try this you will need to ssh onto the pi ( @mr-eggleton or @mr-evans can get you started). commands needed are:
Change to the correct folder

cd ~/robot-enrichment

To create the branch

git checkout -b 23_flatten

To move the conf files

mv python/*.conf .
mv robot.py old-robot.py
mv python/robotserver.py robot.py

To try it (I wouldn't expect it to work first time)

sudo python robot.py


Uncaught TypeError: this.action.disposalAction is not a function

[Enter steps to reproduce:]

...
...

Atom: 1.58.0 x64
Electron: 9.4.4
OS: Microsoft Windows 10 Home
Thrown From: autoclose package 0.0.2
Stack Trace
Uncaught TypeError: this.action.disposalAction is not a function
At C:\Users\Spyja\.atom\packages\autoclose\lib\autoclose.coffee:39

TypeError: this.action.disposalAction is not a function
    at Object._paneItemChanged (/packages/autoclose/lib/autoclose.coffee:39:29)
    at /packages/autoclose/lib/autoclose.coffee:26:8
    at Function.simpleDispatch (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:1186925)
    at Emitter.emit (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:1188366)
    at Workspace.didChangeActivePaneItemOnPaneContainer (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:427829)
    at ~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:14:44998
    at Function.simpleDispatch (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:1186925)
    at Emitter.emit (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:1188366)
    at PaneContainer.didChangeActiveItemOnPane (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:450159)
    at Pane.setActiveItem (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:459003)
    at Pane.activateItem (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:461173)
    at TabBarView.onClick (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:1137656)

Commands
  2x -2:38.6.0 pane:close (ul.list-inline.tab-bar.inset-panel)
  2x -1:29.7.0 core:backspace (input.hidden-input)
     -1:23.7.0 emmet:expand-abbreviation-with-tab (input.hidden-input)
     -1:22.2.0 core:save (input.hidden-input)

Non-Core Packages
atom-beautify 0.33.4
atom-ternjs 0.20.0
autoclose 0.0.2
csslint 1.2.0
emmet 2.4.3
language-ejs 0.4.0
pigments 0.40.6

I keep receiving this error notification in atom each time I attempt to switch tabs. How can I fix this?

I am having this same tedious issue every-time I navigate between folders or switch tabs.

How do I fix this issue.

I yust delete my autoclose package and download anothe one. The close Atom and open it again, that work for me.

Thank you I'll try it out.
On Tue., Aug. 31, 2021, 7:53 a.m. majangusaurio, @.***>
wrote:

I yust delete my autoclose package and download anothe one. The close Atom
and open it again, that work for me.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/awaw00/autoclose/issues/70#issuecomment-909458848,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVL2W42ZSYMWX7D6MIXD3D3T7UJLFANCNFSM5CTIOGTA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

I ended up just downloading another autoclose package. Hopefully this gets resolved soon

Which autoclose package did you use?
On Tue., Aug. 31, 2021, 3:50 p.m. Shaheer, @.***> wrote:

I ended up just downloading another autoclose package. Hopefully this gets
resolved soon
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/awaw00/autoclose/issues/70#issuecomment-909796948,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVL2W47HSMQYXRNRLO2HJIDT7WBE7ANCNFSM5CTIOGTA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Try this guys
https://github.com/awaw00/autoclose/commit/4f3fe85121d6eceff49cff3cd85d19b2aa84439f
it worked for me. It's about changing a a bit lines 29 and 39 in the file autoclose.
Replace the function disposalAction with dispose. Tell me if it went ok.

It’s called autoclose-tags. Have not had any issues with it whatsoever, and it has been a great replacement for me.
On Aug 31, 2021, 8:17 PM -0600, WoaWoa22 @.***>, wrote:

Which autoclose package did you use?
On Tue., Aug. 31, 2021, 3:50 p.m. Shaheer, @.***> wrote:

I ended up just downloading another autoclose package. Hopefully this gets
resolved soon
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/awaw00/autoclose/issues/70#issuecomment-909796948,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVL2W47HSMQYXRNRLO2HJIDT7WBE7ANCNFSM5CTIOGTA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

Try this guys
4f3fe85
it worked for me. It's about changing a a bit lines 29 and 39 in the file autoclose.
Replace the function disposalAction with dispose. Tell me if it went ok.

Try this guys
4f3fe85
it worked for me. It's about changing a a bit lines 29 and 39 in the file autoclose.
Replace the function disposalAction with dispose. Tell me if it went ok.

-->Working Thanks a Lot.


Add support for converting Spanner DATE values to/from strings

This change is

I'm seeing these "leak" errors in random builds.  Given that it is unrelated to this PR, I'll merge.
google/cloud/spanner/database_admin_client_test.cc:148: ERROR: this mock object (used in test DatabaseAdminClientTest.HandleOperationDoneWithInvalidContents) should be deleted but never is. Its address is @0x22785a0.
ERROR: 1 leaked mock object found at program exit. Expectations on a mock object is verified when the object is destructed. Leaking a mock means that its expectations aren't verified, which is usually a test bug. If you really intend to leak a mock, you can suppress this error using testing::Mock::AllowLeak(mock_object), or you may use a fake or stub instead of a mock.


feat: add types for safety

This should help the consumers of this library to use the declinator functions while the project relies mostly on the legacy code of JvS.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

15 of 15 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 94.535%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1495

Relevant Lines:
1578

💛  - Coveralls


perf: remove some with instance construction patterns

According to http://speedcenter.informatik.kit.edu/mathlib4 this reduces the overall build time by 20%; despite only reducing the overall instruction count by 0.08%!
The general thought here is that
  { hf.distribMulAction f smul with
    smul := (· • ·)
    ... }

is treated roughly as
  let src := hf.distribMulAction f smul
  { toDistribMulAction :=
    { toMulAction :=
      { smul := (· • ·)
        one_smul := src.one_smul
        mul_smul := src.mul_smul}
      smul_add := src.smul_add
      smul_zero := src.smul_zero  }
    ... }

which is a much larger term (especially once the let is reduced, due to how many arguments hf.distribMulAction consumes) than
  { toDistribMulAction := hf.distribMulAction f smul
    ... }

In some places the long version is maybe still more desirable, if we want a specific syntactic equality for smul that the base structure defines differently; but none of the examples in this PR are such a case.
Co-authored-by: Eric Wieser<EMAIL_ADDRESS>

!bench

Before we merge, I'll add an explanation to the PR description of why I think this happens.

bors d+
Please check you agree with the description before merging. I added myself as a co-author since I think the explanation is almost as important as the change here!

!bench

(the previous benchmark apparently might be bogus)

So I guess it caches the runs?

Seems so; I've asked it to discard the last run

!bench

That is what I expect

I think this is probably still worth merging; do you agree?

Do you want to amend?

Oh already done.

bors merge


Automated Package Upgrade

:tada: This PR is included in version 5.0.422 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Support new type 'map' in schema definition

Category
Cedar validation features
Describe the feature you'd like to request
I would like to be able to define a 'map' type in my schema:
{
  "MyNamespace": {
    "commonTypes": {
      "MyMap": { "type": "Map", "keys": "String", "values": "String" }
    }
}

This would allow me to pass entities with values like:
...
   "foo": {
      "alice": "tall",
      "bob": "short"
   }
...

And then have policy like:
  principal.foo has "alice" && principal.foo.alice == "tall"

Describe alternatives you've considered
Converting to a Set with a record of attributes Key and Value. This doesn't allow me to use operations like has or easily find the Value.
Additional context
No response
Is this something that you'd be interested in working on?

[ ] 👋 I may be able to implement this feature request
[ ] ⚠ This feature might incur a breaking change

Current schema format supports records and nested records. For example:
"commonTypes": {
    "ReusedContext": {
        "type": "Record",
        "attributes": {
            "ip": { "type": "Extension", "name": "ipaddr" },
            "is_authenticated": { "type": "Boolean" },
            "timestamp": { "type": "Long" }
        }
    }
}

Did you try records?

In response to @anwarmamat's comment above -- today's records do not fully support the use case described above, because you cannot ascribe types to record fields without explicitly listing the record fields in the schema.  In the use-case above, the user wants to ascribe a type (String) to all fields, without explicitly listing the fields or guaranteeing their existence.

If we want to move forward with this issue, I think it would be best if we added it as an RFC. If you're still interested in adding maps to the language, would you be interested in drafting an RFC proposal? (See: https://github.com/cedar-policy/rfcs)

Closed in favor of RFC 27


Invalid arguments to find_dependency

Hello,when I run 'make -j1',I meet the error:
CMake Error at /usr/share/cmake-3.5/Modules/CMakeFindDependencyMacro.cmake:45 (message):
Invalid arguments to find_dependency
Call Stack (most recent call first):
/usr/local/lib/cmake/GTSAM/GTSAMConfig.cmake:17 (find_dependency)
LeGO-LOAM/LeGO-LOAM/CMakeLists.txt:23 (find_package)
Does anyone known  the reason and how to solve it？Thank you!

Have you installed GTSAM that is specified in readme successfully?

Yes.It is 4.0

@zuowanghanguang I met the same error and solved by improved my cmake version to 3.10, maybe you can try this solution.

@mjjdick ok.I will try.Thank you!

I also met this error and I solved this by change "find_dependency" into "find_package" in file GTSAMConfig.cmake

I also meet same error. Could you let me know more details?
I couldn't find any ..... T.T

I also meet same error. Could you let me know more details?
I couldn't find any ..... T.T
Both 'mjjdick' and 'WAT183' says are valid. The reason can be reference to 'https://github.com/pabloariasal/modern-cmake-sample/issues/5' , which says "find_dependency() does not support COMPONENTS argument before CMake 3.8.0".


Fix: Ensure response is not nil

:tada: This PR is included in version 0.2.7 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 0.2.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Create FUNDING.yml

@apatard The only reason I did not include you was due to you not having the feature enabled on your profile.

@ssbarnea which is fine. My status regarding funding is not clear to me since I'm using molecule-vagrant at work and home so I'm fixing stuff during work and free time.


Build Error in Nightly Runs

All my LDAS builds last night failed with multiple compile errors in SaltIntSplitter.F90:
/discover/nobackup/mathomp4/SystemTests/builds/LDAS_CONUS/CURRENT/GEOSldas/src/Components/GEOSldas_GridComp/@GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/mk_restarts/SaltIntSplitter.F90(105): error #6460: This is not a component name that is defined in the encompassing structure.   [GET_GLOBAL_VAR]
     global     => Incfg%get_global_var()

This is from a PR from @weiyuan-jiang (https://github.com/GEOS-ESM/GEOSgcm_GridComp/pull/623) which requires MAPL 2.25.
So the solution is...update to MAPL 2.25. I'll make a PR.
There have been other updates in the GEOSgcm as well, but I'll do those in a separate PR so that @biljanaorescanin can test more fully.

Issue solved after bringing new MAPL


CXF-8619 Prevent double URL-decoding for form parameters where the pa…

…rameters are read from HttpServletRequest.getParameter()

Thank you for the contribution, @jgallimore, I have the concerns regarding this change, looking into the issue in order to understand the decoding flaws.

Thank you so much for the very quick review, @reta. I'm very happy to work with you and the team to come to the right solution on this. Please feel free to nudge me in the right direction :).
On thing I am wondering is whether the systest does a good job of highlighting the issue. I can certainly add some tests with an embedded Tomcat if that is useful.

Thanks @jgallimore

On thing I am wondering is whether the systest does a good job of highlighting the issue. I can certainly add some tests with an embedded Tomcat if that is useful.

I think it does, we continuously enrich it with new test cases and the fact it captured the regression is a good sign

@jgallimore I think I understood the problem and I have a very simple solution to suggest, would you mind if I push the changes to your PR so you could take a look and provide the feedback? Thank you.

@reta Yes please, that would be fantastic, thank you!

@jgallimore done, please let me know what do you think, thank you!

Thanks @reta - this looks good to me, I'm not seeing a double decode happen for this case anymore. Do we want to try and figure out a way to enable @Encoded endpoints where we're reading from the HTTP parameter map? (I'm not sure its possible without re-encoding).

@jgallimore thank you

Do we want to try and figure out a way to enable @encoded endpoints where we're reading from the HTTP parameter map?

At least for me, the uncertainty here is that we either "trust" the request params as being properly decoded or not. If we do, that basically means @Encoded is noop in this flow - we don't know if the request params were encoded in first place or not - the servlet hides this from us and just provides the final value. Contrary, if we get rid of this "trust" logic (basically, drop this pull request), then by adding @Encoded annotation to form params, the double decoding is also gone (to be fair, I would prefer to use only @Encoded as means to control decoding behavior).

From my perspective, I'd keep the PR as-is. If there's a need for the original encoded data, then its best to not consume the InputStream - instead leave it alone for CXF to parse.
Is this good to merge in, or does it need anything else? I'm very happy to help in any way.

@jgallimore thank you, sounds reasonable

Is this good to merge in, or does it need anything else? I'm very happy to help in any way.

I would like to run JAX-RS TCK tests over this PR, itis a bit sensitive change and it is better to make sure we don't introduce new failures, will update you shortly

@jgallimore just finished the TCK run, no new test case failure, I think we are good to go once build checks are done, thank you!


Implement linking between Instances and authorities

https://wiki.folio.org/display/FOLIJET/Orchid+>+Subfield+9+handling


Question about the teacher model in pre-train stage.

Dear Author, thanks for your excellent research and code! I still have some questions in the pre-training stage.
The teacher model you mention in the pre-train stage, the backbone is the CLIP visual encoder, and the RPN is the pre-train RPN on base class, so could it get a reliable score with backbone (CLIP weights) + RPN (Other weights)?
I'm wondering about this because I found that the final layer in CLIP visual encoder is an attention pooling layer, from my experiments I found that the attention pooling would damage the performance location ability in the ResNet model. How do you avoid this problem, thanks! 🙏

Hi @cuiziteng, thanks for your interests iin our work.
I don't fully understand your questions. Did you mean the performance of combining CLIP + RPN together? If so, all CLIP baselines in Table1-4 of paper evaluates its performance in different settings. For attention pooling, I cannot answer your question without the context. I think the attention pooling is required to fully make use of CLIP's knowledge.


Could you please give more detail about how to host my own application for private Notion pages?

Thanks for sharing this nice work and react-notion as well.
I'm trying to host it using Cloudflare, but it is a little bit difficult for me because I don't have an experience with it.
Could you please give me some information about how to host it?

@LeeJunHyun Any update on this? You managed to make it work?
Even I'm looking for the same

@LeeJunHyun Any update on this? You managed to make it work?
Even I'm looking for the same

@Harshmakadia check out https://www.npmjs.com/package/react-notion-x and https://github.com/transitive-bullshit/nextjs-notion-starter-kit which should make what you're looking for a lot easier.

@Harshmakadia check out https://www.npmjs.com/package/react-notion-x and https://github.com/transitive-bullshit/nextjs-notion-starter-kit which should make what you're looking for a lot easier.

@LeeJunHyun Any update on this? You managed to make it work?
Even I'm looking for the same

Download / Clone / or Folk this repo to your computer.
Run npm i @cloudflare/wrangler -g
Run wrangler config. This is will ask you the Cloudflare API Token. Come to your Cloudflare API Token Page (https://dash.cloudflare.com/profile/api-tokens) and create token (only with Workers). Copy it and paste to your terminal, Enter.
Go to file wrangler.example.toml and rename to wrangler.toml
Also in wrangler.toml,  you need to add value for account_id and zone_id (2 things you can find in your domain on Cloudflare). Add value for route (subdomain you want to use, example: sub.sample.com). And also remove the line workers_dev = true because this line will send you an error like this [you must set workers_dev = true OR provide a zone_id and route/routes.]
After edit wrangler.toml, open your terminal in the same folder, run wrangler publish. And it will run to push your files to Cloudflare Workers.
Go to your Cloudflare, Domain you have choosen (the domain you use account_id and zone_id. Create A with value is sub (subdomain you use) and point to <IP_ADDRESS> with Cloudflare Gates (Orange Cloud).
Enjoy it.

Thanks for sharing this nice work and react-notion as well.
I'm trying to host it using Cloudflare, but it is a little bit difficult for me because I don't have an experience with it.
Could you please give me some information about how to host it?

CC you as well. Thank you.


ahelp relay disconnected

Description

Lizard's ahelp relay disconnected randomly during round 19432. The only other time I've seen something like this happen was months ago, a server restart fixed it.
Reproduction

I have no clue how to reproduce it, Sloth requested an issue.

Fixed by https://github.com/space-wizards/space-station-14/pull/13416


ECOS output when running GUROBI solver?

Sometimes I get the following printed output when solving a problem with ECOS, even when setting verbose to False:

ECOS 2.0.10 - (C) embotech GmbH, Zurich Switzerland, 2012-15. Web: www.embotech.com/ECOS
It     pcost       dcost      gap   pres   dres    k/t    mu     step   sigma     IR    |   BT
0  +1.300e+03  +2.760e+04  +7e+04  6e-01  3e+01  1e+00  3e+00    ---    ---    1  1  - |  -  -
etc...

I have recently started using GUROBI and even when using that solver I still get these ECOS printouts sometimes. When I set verbose to True, the GUROBI output will sometimes get interleaved with the ECOS output above. Is it running both solvers simultaneously?

To Reproduce
Not sure how to reproduce this since it seems to occur randomly. My problem is a linear program with linear constraints, represented by a constraint matrix A with >100k rows.
Version

OS: MacOS Catalina 10.15.7
CVXPY Version: 1.2.0
Python version: 3.8.13
Gurobi version: 9.5.1

Thanks.

This is very weird. We can't really help without more information. Can you please provide a script that (intermittently) has this problem? You can post on Google Colab if you prefer.
If you can't share your actual data due to privacy reasons, I encourage you to replace the data in the constraint matrix with a bunch of random data. (Do retain sparsity if the matrix is sparse, though.)

Ping @dyballa. See my comment above.

Closing due to inactivity.


Azure PostgreSQL username@hostname Not Supported

Expected Behavior
I expect to be able to configure my chef-server.rb file to use an external PostgreSQL database as outlined in Chef documentation like so:
postgresql['db_superuser'] = 'chefadmin@azurechefhost' # Postgres user you created
postgresql['db_superuser_password'] = 'somepw' # That user's password
postgresql['external'] = true # Must be set to true
postgresql['port'] = 5432 # Only required if you change the default port
postgresql['vip'] = 'azurechefhost.postgres.database.azure.com' # DNS entry from Azure

And then be able to run chef-server-ctl reconfigure on a new Chef Server installation to configure my new Chef Server instance to talk to my Azure PostgreSQL backend. This should result in a successful Chef Server configuration/deployment.
Current Behavior
The current results are not as expected however. Due to the fact that Azure PostgreSQL requires all usernames to be in the format <username@hostname>, apparently Ruby code that reads the postgresql['db_superuser'] entry doesn't interpret the @ symbol properly and thus doesn't authenticate and perform the install, here is the full error stack:
[root@centoschef opscode]# chef-server-ctl reconfigure
Starting Chef Client, version 12.21.31
resolving cookbooks for run list: ["private-chef::default"]
Synchronizing Cookbooks:
  - private-chef (0.1.1)
  - openssl (8.1.2)
  - enterprise (0.11.0)
  - runit (4.0.4)
  - yum-epel (2.1.2)
  - compat_resource (12.19.1)
  - packagecloud (0.3.0)
Installing Cookbook Gems:
Compiling Cookbooks...
/var/opt/opscode/local-mode-cache/cookbooks/packagecloud/resources/repo.rb:10: warning: constant ::Fixnum is deprecated
Recipe: private-chef::default
  * directory[/etc/opscode] action create (up to date)
  * directory[/etc/opscode/logrotate.d] action create (up to date)
[2018-08-23T14:39:36+00:00] FATAL:

-----------------------------------------------------------------------
CSPG999: FATAL:  Invalid Username specified. Please check the Username and retry connection. The Username should be in <username@hostname> format.
FATAL:  Invalid Username specified. Please check the Username and retry connection. The Username should be in <username@hostname> format.
-----------------------------------------------------------------------

Steps to Reproduce (for bugs)

Start with a fresh Azure PostgreSQL DB and fresh Centos 7.4 VM.
Edit your chef-server.rb file as shown in the example above to match your AzurePostgreSQL settings.
Run chef-server-ctl reconfigure to setup your Chef Server, and you will get the shown results.

Your Environment

Chef Server Version: 12.21.31
Total/free RAM and disk space: 8GB/20GB (Test Server)
Operating System and Version: Centos 7.4 w/Updates
If upgrading, previous Chef Server version: N/A
Running in a container? No (Azure)

I also want to note that I have used PGBouncer to attempt and proxy the username information and I was successfully able to run the install. However I'm not sure this is a good long-term solution as the way it works is it maps all users from the Chef-side to a singe user in PostgreSQL. If that's seen as an acceptable workaround then I'll post my config, otherwise I don't want to muddy the waters with a workaround that isn't extensively tested.

We just hit this ourselves. Commenting here to follow the issue.

Most likely we're not handling the error case correctly in the connectivity check here: https://github.com/chef/chef-server/blob/5c7c988cba529c4794b21faa9c6bd135f37f47c8/omnibus/files/private-chef-cookbooks/private-chef/libraries/preflight_postgres_validator.rb#L110
We test for an invalid user with the symbol :invalid_user, and I suspect azure pgsql is flagging the format of the username, and  we're not set up to handle the error properly.  Adding an extra clause to handle this would be easy enough I think. Probably need to do some unit tests to cover for the fact that we don't currently don't test this particular configuration in the pipeline.

We've been working with @markan on this and there's a lot of non-obvious stuff going on with this.
To sum it up, Azure Database for PostgreSQL has a gateway in front of the actual database servers that forwards connections from username@hostname to hostname as username.
This means that once the connection is established, you will actually be connected as username, not username@hostname, and any database queries involving users should just use username (e.g. granting permissions).
The private-chef cookbook assumes the same username for both purposes (connections and queries), but once it configures the services, they only use the username for connections, they don't seem to perform any queries with them.
In order to support Azure PostgreSQL, the cookbook will have to be modified to allow overriding the connection username separately from the database username, but defaulting them to be the same for backwards compatibility. This will probably require a new attribute for each database user to be added (something like node['private-chef']['opscode-erchef']['db_sql_user']), possibly renaming the existing attributes to clarify their usage, and replacing all uses of the existing attributes in database queries with the new attributes. Not sure how to fully test the scenario this supports though.
This isn't quite enough, as Postgres queries involving an @ in the username will fail with invalid syntax errors unless the username is surrounded by double quotes, and not all such queries in the private-chef cookbook do so. Adding tests for this should be relatively straightforward.
Finally, Azure Postgres enforces SSL by default. This can be disabled, but that's less than ideal. epgsql, the database library used by the Chef Erlang services, does seem to support SSL connections, and sqerl, the abstraction layer that wraps it, added support for setting additional connection options via the sys.config. We should probably add an attribute that allows for overriding the ssl mode for each service (or maybe just one for all of them) and pass that down to the sqerl.db_options.ssl key in each service's sys.config.
So the changes needed in private-chef to support Azure Database for PostgreSQL will be at least:

Correct username quoting in queries
Separate connection usernames from db usernames
Add attributes to override only connection usernames

And ideally also:

Add support for overriding the sslmode with an attribute

@danielcbright This issue is currently being worked on and is close to getting merged. It should be available in the next release of Chef-Infra-Server. Thank you for your patience on this!

@PrajaktaPurohit just to confirm, are we currently waiting for test cases to be built out for this so it can be tested and merged?

@danielcbright yes that is correct. #1728 has the changes. We are currently working on testing it with the different scenarios. (Description is updated with the scenarios currently tested with) We can merge it as soon as all of the scenarios pass. We have a release coming up the month and another one in December.

Looks like this issue might be closed, do we have a release that this has been added to yet? @PrajaktaPurohit ?

Indeed, this change has shipped as a part of 13.2.0 release of the Chef Infra Server. I will include the version shipped before closing henceforth. Sorry for the trouble!


Add a way to shortcut evaluation

Just an idea for dealing with situations where a selector function should be conditional.
Here's a contrived example: Imagine you have a huge list and a toggle button to do some complex filter calculations on the list. Your base selectors look like this.
const hugeList$ = state => state.hugeList;
const shouldFilter$ = state => state.shouldFilter;

One way to handle this is by making a filteredList$ selector that depends on hugeList$.
// Method #1

const filteredList$ = createSelector(
  [hugeList$],
  (hugeList) => {
    /* do expensive computation here */
    return filteredList;
  }
);

const finalList$ = createSelector(
    shouldFilter$, filteredList$, hugeList$],
    (shouldFilter, filteredList, hugeList) => {
        return shouldFilter ? filteredList : hugeList;
    }
);

The issue is that filteredList is computed even if shouldFilter is false. If hugeList changed very often but shouldFilter was usually false, you'd be doing a lot of unnecessary re-calculation.
To avoid that you could move the shouldFilter check into filteredList$;
// Method #2

const filteredList$ = createSelector(
  [shouldFilter$, hugeList$],
  (shouldFilter, hugeList) => {
    if (!shouldFilter) { return null; }
    /* do expensive computation here */
    return filteredList;
  }
);

const finalList$ = createSelector(
    [filteredList$, hugeList$],
    (filteredList, hugeList) => {
        return filteredList === null ? hugeList : filteredList;
    }
);

But now the problem is that you recompute every time shouldFilter is toggled. If someone repeatedly clicks the toggle button the UI is going to start lagging hard.
The crux of the issue is that we have no way to conditionally execute a selector. We want to compute a value under certain circumstances only, but using memoize we can't shortcut the function without expiring our cached value.
Some potential solutions:

A Symbol that can be returned to shortcut execution directly. The wrapping function would check the return value and return the cached value if it was the symbol. In the example you could just take the second method and return the special symbol instead of null.
Something like shouldSelectorUpdate that passes the last used dependency values and the current dependency values and lets the user decide if they wanted to recompute.

The only issue I see now is the need for a default value. As this situation only comes up times that you don't actually want to use the value, it seems safe to just default to null and let the user override if they need to.

This is great, thanks for the detailed and clear write up. I agree this would be useful and should probably be in the library. What do you think @faassen?

It would break compatibility, but a very easy solution is to replace the valueEquals function with a shouldSelectorUpdate function, and call it directly instead of using argsEquals. The current functionality could be implemented by just defaulting shouldSelectorUpdate to a shallow list equality check (like argsEquals is now).

Thanks for that writeup! I wondered what would happen if you combine both solutions, but that won't help; expensive and quite possibly needless computation could still be triggered if someone changes shouldFilter.
I think we should do our research: what do NuclearJS and re-frame do about this? If they happen to do nothing about it, we have to think about why not, too.
I am curious to see both your suggested alternatives in code; I'm having trouble understanding the symbol alternative, and I'm curious where you'd pass in shouldSelectorUpdate  for the second suggestion you make.

@faassen Haven't looked into anyone else's solution, but I'll try and look around tonight. Right now I prefer the shouldUpdate option as it's really just a more flexible version of the current code.
These are rough, but should give you an idea of what I'm thinking.
The symbol method:
export const ShouldNotUpdate = Symbol();

function memoize(func, valueEquals) {
    let lastArgs = null;
    let lastResult = null;
    return (...args) => {
        if (lastArgs !== null && argsEquals(args, lastArgs, valueEquals)) {
            return lastResult;
        }
        let result = func(...args);
        if (result === ShouldNotUpdate) {
            return lastResult;
        }
        lastArgs = args;
        lastResult = result;
        return lastResult;
    }
}

// end-user code

import { createSelector, ShouldNotUpdate } from 'reselect';

const filteredList$ = createSelector(
  [shouldFilter$, hugeList$],
  (shouldFilter, hugeList) => {
    if (!shouldFilter) { return ShouldNotUpdate; }
    /* do expensive computation here */
    return filteredList;
  }
);

The shouldUpdate method:
function memoize(func, shouldUpdate, initialValue = null) {
    let lastArgs = null;
    let lastResult = initialValue;
    return (...args) => {
        if (!shouldUpdate(args, lastArgs)) {
            return lastResult;
        }
        lastArgs = args;
        lastResult = func(...args);
        return lastResult;
    }
}

function defaultShouldUpdate(args, lastArgs) {
    if (args === null) {
        return true;
    }
    return args.some((arg, index) => arg !== lastArgs[index]);
}

// end-user code

import { createSelector } from 'reselect';

const filteredList$ = createSelector(
  [shouldFilter$, hugeList$],
  (shouldFilter, hugeList) => {
    /* do expensive computation here */
    return filteredList;
  },
  ([shouldFilter, hugeList], lastArgs) => {
    return shouldFilter && hugeList !== lastArgs[1];
  }
);

Another way to deal with it is to give a selector access to state as an additional argument.
const filteredList$ = createSelector(
  [hugeList$],
  (hugeList, {shouldFilter}) => {
    if (!shouldFilter) return;
    /* do expensive computation here */
    return filteredList;
  }
);

I do something similar in react-derive but maybe it makes more sense with props than with state.

Yet another idea: turn the selector into a thunk if we want to conditionally execute it. The following is not a smart way to implement it (a new thunk gets created on every update) but it should give an idea of what it could look like.
import { createSelector, makeLazy } from './src/index';

const shouldFilter$ = state => state.shouldFilter;
const hugeList$ = state => state.hugeList;
const keyword$ = state => state.keyword;

const filteredList$ = createSelector(
  [hugeList$, keyword$],
  (hugeList, keyword) => {
    /* do expensive computation here */
    return filteredList;
  }
);

const list$ = createSelector(
  [shouldFilter$, hugeList$, makeLazy(FilteredList$)],
  (shouldFilter, hugeList, lazyFilteredList) => {
    return shouldFilter ? lazyFilteredList() : hugeList;
  }
);

makeLazy:
export function makeLazy(selector) {
    return state => () => selector(state);
}

I was traveling last week, now sitting down again to try to think this through again. Please bare with me as I'm rusty. :)
@HeyImAlex Thanks for working them out! That lets us evaluate them better. I'm a bit wary of the arguments approach, as it needs so much dealing with argument lists and is in part dependent on the order.
I like how the approach by @gilbox makes things simple, but it appears to break abstraction -- we only pass in state because we want to bypass the selector caching mechanism. I think.
@ellbee's approach is very interesting. We express in the selector that we want to make the calculation of the sub-selector under the control of the function itself.
But before we proceed I still think we should do the research: what do other frameworks do about this?

NuclearJS adds the result to a cache every time the arguments change so toggling shouldFilter back and forth does not cause the expensive recalculation. As far as I am aware re-frame does not do anything to address the problem.
I've just been looking more closely at the approach by @gilbox. In the example is { shouldFilter } one of the arguments taken into account for memoization? It looks to me that if { shouldFilter } is part of the memoization then it will perform the expensive calculation every time shouldFilter changes from false to true, but if the { shouldFilter } is not part of the memoization then changes to shouldFilter will have no effect unless hugeList also changes.

Another option that hasn't been suggested yet is adding a cache for the memoization like NuclearJS.

@ellbee, { shouldFilter } is simply destructuring of the component's state object. It's not a memoized value and there is no evaluation at all.

Thanks @gilbox. So the overall example looks something like this:

const shouldFilter$ = state => state.shouldFilter;
const hugeList$ = state => state.hugeList;

const filteredList$ = createSelector(
  [hugeList$],
  (hugeList, {shouldFilter}) => {
    if (!shouldFilter) return hugeList;
    /* do expensive computation here */
    return filteredList;
  }
);

const list$ = createSelector(
  [shouldFilter$, filteredList$],
  (shouldFilter, filteredList) =>  filteredList
);

Or maybe this:
const shouldFilter$ = state => state.shouldFilter;
const hugeList$ = state => state.hugeList;

const filteredList$ = createSelector(
  [shouldFilter$, hugeList$],
  (shouldFilter, hugeList, {shouldFilter}) => {
    if (!shouldFilter) return hugeList;
    /* do expensive computation here */
    return filteredList;
  }
);

Giving the user access to the state as an additional parameter is tempting but i vote against it as it will result in quite unpredictable selectors. (e.g. the result depending on a parameter which was not memoized. therefore updates could be lost as the memoized parameters did not change)
@gilbox I would suggest another approach which should give you the desired behavior. If the "memoize" function used in reselect is explicitly exported as an additional symbol (@faasen would this be possible).
The filter function could be memoized (and hence would only be recomputed if the input list actually changes).
Hence the resulting code for the filteredListSelector would be:
let filterList = memoize(inputList => { expensive filter operation... });

let filteredListSelector = createSelector([hugeList, shouldFilter], (hugeList, shouldFilter) => {
     return (shouldFilter) ? filterList(hugeList) : hugeList;
});

Imho this would make the conditional code as well as the memoization of the filter operation explicit.  In addition the function solely depends on the list and whether it sould be filtered. @HeyImAlex By memoizing the filterList operation itself frequent toggeling of shouldFilter will not result in a lagging ui.

@faassen @speedskater I like this idea.

Honestly I don't use redux or reselect, I just follow reselect as inspiration for react-derive so maybe I misunderstand how selectors are used... Do you only ever use components with selectors 1 time (as in "container" components)? If not then you are using the same filterList memoized function for multiple instances of the same component. It will work in many cases but it's not a general solution.

@gilbox The idea behind selectors is to provide accessor functions on the global state. Which in case of redux is composed by using multiple reducers. So the filteredListSelector used in this example extracts and filters a specific list in your store (the global state). This selector is independent of the context in which it can be used, it can be another selector or it can be one or many components.
If you want to reuse the selector for different lists in your store you can create a factory function which allows you to create different selectors bound to different lists and therefore having different memoized versions of filterList (but actually only one implementation of filterList).
Does this explanation make it clearer or you?

@speedskater I like it because:

It doesn't break anything
This is an optimization anyways, and most of the other solutions don't make life any easier for the end user. Ultimately reselect is <50 lines so if anyone ever runs in to perf problems they can read the lib and solve it themselves.

However, to export memoize we'd have to undo some changes I made in #9 :smile:

@HeyImAlex I see ;). So should we rename memoize to internalMemoize and export the following function for explicit usage?
export function function memoize(func, valueEquals = valueEquals) {
   let memoizedFunction = internalMemoize(funk, valueEquals);
   return (...args) => memoizedFunction(args);
}

@faassen @ellbee If we solve this issue with the export of memoize i think we should add advanced examples to the documentation. So users have examples how to solve advanced use cases.

@faassen, @HeyImAlex, @speedskater
So, shall we do this with an exportable memoize then?
Also, I agree with @speedskater that the docs should have an advanced use cases section so I'll  open an issue for that.

:+1:

:+1:
This week I have no time. But I think i could create a PR till the end of next week.

Hey @speedskater, I already have a PR open for this that I created yesterday as no-one had done it yet. If you like I'll change it to make you the commit author as it was your idea and I used the code from your comments!

@ellbee No its okay for me. Great that your are working on it.

The default memoize function is an export in version 1.0.0

I'm obviously very late to the party here, but I'm curious what you think about the following solution to the original problem:
So, the idea is that selectors are just functions, right? So why not make a "higher order" selector - a selector that returns a selector:
const finalListSelector$ = createSelector(
    shouldFilter$,
    (shouldFilter) => shouldFilter ? filteredList$ : hugeList$
)

// wrapper function for convenience
const finalList$ = state => finalListSelector$(state)(state)

Do you see any problems with this solution? It should memoize correctly, shouldn't it?

@ropez I like that solution as well. I wrote a quick selector creator to leverage it:
https://gist.github.com/CGamesPlay/e3cb9d62e95be13a364100c707f46dbf

	Reselect.buildBypassSelector = Reselect.buildSelectorBuilder(
		function(func, equalityCheck) {
			return Reselect.defaultMemoize(function() {

				var args = _.map(arguments, (arg) => _.has(arg, '$bypass') ? arg.select : arg);
				return func.apply(null, args);

			}, equalityCheck);
		},
		function(previous, current, index) {
		  	return (current && current.$bypass) || (previous === current);
		}
	)

	const selectDependentChanges = (state) => { return { select: state.constantlyChanging, $bypass: true } };
	const selectIndependentChanges = ( state ) => state.importantState;
	const selectDependentWhenIndependentChanges = Reselect.buildBypassSelector(
		[selectIndependentChanges, selectDependentChanges],
		//Ignores and bypasses the dependentChanges and only runs when independentChanges actually change.
		(independentChanges, dependentChanges) => dependentChanges
	);

https://github.com/reduxjs/reselect/issues/129


Improvement: Document how to add Fluent to an extension

Assuming I have a DataObject like so:
class Player extends DataObject
{
    private static $db = [
        'PlayerName' => 'Varchar(255)',
        'IrrelevantField' => 'Text'
    ];
}

...and I have an extension for it like so:
class PlayerExtension extends DataExtension
{
    public function updateCMSFields(FieldList $fields)
    {
        $fields->removeByName('IrrelevantField');
    }
}

It would be great if the documentation could explain how you could add the Fluent extension to Player. At this point it seems that the FluentExtension conflicts with the PlayerExtension because they both use the updateCMSFields() method.
The docs currently say that it is necessary to ensure that the updateCMSFields extension method is called once (and only once) on each FieldList object, but doesn't explain how to use (or modify for Fluent use) code like the above.

For example, I can modify my extension to extend FluentExtension, then call parent::updateCMSFields($fields) and it appears to work:
class PlayerExtension extends FluentExtension
{
    public function updateCMSFields(FieldList $fields)
    {
        $fields->removeByName('IrrelevantField');
        parent::updateCMSFields($fields);
    }
}

Another thing I noticed is that I'm having a lot of trouble with a custom FormField type that I've added - it's an extension of a TextareaField, and if I add it to data_includes then it will display the localisation icon, and the values are saved to the DB in the right place, but it always puts the default locale's value into the field when I load the CMS page.

Yep your second comment is pretty much the best way to do it.

Another thing I noticed is that I'm having a lot of trouble with a custom FormField type that I've added - it's an extension of a TextareaField, and if I add it to data_includes then it will display the localisation icon, and the values are saved to the DB in the right place, but it always puts the default locale's value into the field when I load the CMS page.

I suggest debugging the queries with showqueries=1 in your querystring to check how that field is being queried.

Thanks @tractorcow - regarding the custom form field, I'll do that. I've put the task off until the end of the week to try again with a fresh mind, but that time has come around now :)
I'll make a PR to your docs shortly for the extension example

Hi again @tractorcow
I've done a bit of testing so far on this and can report the following:

Markdown field added directly to a DataObject using getCMSFields(), and being added with $this->beforeUpdateCMSFields() works fine  :white_check_mark:
As above, without using beforeUpdateCMSFields() doesn't work (expected, I read the docs ;))
Markdown field added using an extension to a DataObject using updateCMSFields or using $db with no updateCMSFields

I'm getting a little closer with debugging. I've taken a look at the SQL queries that are run to get the data for each of the DataObjects where the first one isn't showing the correct locale value (field is added via extension) and the second one is (field is owned directly by the DataObject), and the differences are:
Not working
CASE
   WHEN `Widget`.`ClassName` IN ('MyContent', 'MyRecipe') THEN `MyContent`.`Markdown`
   WHEN `Widget`.`ClassName` IN ('MyRecipe') THEN `MyRecipe`.`Markdown`
   ELSE NULL
END AS `Markdown`,
CASE
   WHEN `Widget`.`ClassName` IN ('MyContent', 'MyRecipe') THEN `MyContent`.`TestStandardTextField`
   WHEN `Widget`.`ClassName` IN ('MyRecipe') THEN `MyRecipe`.`TestStandardTextField`
   ELSE NULL
END AS `TestStandardTextField`,

Working
CASE COALESCE(CAST(`MyVideo`.`VideoURL_en_GB` AS CHAR), '')
    WHEN '' THEN `MyVideo`.`VideoURL`
    WHEN '0' THEN `MyVideo`.`VideoURL`
    ELSE `MyVideo`.`VideoURL_en_GB`
END AS `VideoURL`,
CASE COALESCE(CAST(`MyVideo`.`VideoDescription_en_GB` AS CHAR), '')
    WHEN '' THEN `MyVideo`.`VideoDescription`
    WHEN '0' THEN `MyVideo`.`VideoDescription`
    ELSE `MyVideo`.`VideoDescription_en_GB`
END AS `VideoDescription`,

Obviously the working example is a product of FluentExtension::localiseSelect - do you have any idea why the other example is behaving differently?

Gah!!  Here's the issue:

MyContent extends Widget
MyRecipe extends MyContent
If I change MyRecipe to extend Widget instead, everything is fine

Silver lining: I'll finish off that PR :)

Oh, one more thing.
If you're translating a dataobject, you MUST add the fluent extension to the base class, not the subclass.
E.g., in your above example, you have two classes that extend Widget. You need to add FluentExtension to Widget, not your custom classes. :D

I really need to add a sanity check into FluentExtension to throw exceptions if applied at the wrong level. :P

Yes please!
On Thursday, 28 April 2016, Damian Mooyman<EMAIL_ADDRESS>wrote:

I really need to add a sanity check into FluentExtension to throw
exceptions if applied at the wrong level. :P
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/tractorcow/silverstripe-fluent/issues/196#issuecomment-215326656

--
Robbie Averill
LA PETITE MANOUCHE - NZ Gypsy Jazz Guitar Duo
Phone: +64 27 321 4758
<EMAIL_ADDRESS>www.lapetitemanouche.com

Good call - I've adjusted my configuration so that I have:
---
Name: mycontentextensions
---
MyContent:
  extensions:
    - MyContentExtension
MyRecipt:
  extensions:
    - MyContentExtensions

Then:
---
Name: myfluentextensions
After:
  - '#mycontentextensions'
---
Widget:
  extensions:
    - FluentExtension

It's working well. I'm not sure whether the "after" part is the reason for the order or not, but it's working :) Want me to update the PR to mention that somewhere?

you're fine. :D
Closing since https://github.com/tractorcow/silverstripe-fluent/pull/197 is merged.


Alternative to LYHM

Thanks for the great work! I can't get my hands on the Liverpool-York Head Model (the owner didn't respond to the mail), is there any alternative to it?
Edit: I got a response from Dr. Nick Pears. They do not have the authority to release the model to a non-faculty in academics, and they are not distributing a license for commercial use. Still looking for an alternative.

Have you got the LYHM model?
Or there are alternatives.

Have you got the LYHM model?
Or there are alternatives.


Fix Javadoc error.

Removed a link to a nonexisting method from the Javadoc.

@armiol, PTAL.
Maybe we should add Javadoc generation to the CI build script?
There are some other older errors when running ./gradlew javadoc.


Error on relation broken due to accessing relation data

I got an error when the kafka -> zookeeper relation was broken. See logs below:
unit-zookeeper-0: 13:42:19 ERROR unit.zookeeper/0.juju-log zookeeper:4: Uncaught exception while in charm code:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-zookeeper-0/charm/./src/charm.py", line 409, in <module>
    main(ZooKeeperCharm)
  File "/var/lib/juju/agents/unit-zookeeper-0/charm/venv/ops/main.py", line 436, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-zookeeper-0/charm/venv/ops/main.py", line 144, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-zookeeper-0/charm/venv/ops/framework.py", line 354, in emit
    framework._emit(event)
  File "/var/lib/juju/agents/unit-zookeeper-0/charm/venv/ops/framework.py", line 830, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-zookeeper-0/charm/venv/ops/framework.py", line 919, in _reemit
    custom_handler(event)
  File "/var/lib/juju/agents/unit-zookeeper-0/charm/src/provider.py", line 317, in _on_client_relation_broken
    self._on_client_relation_updated(event=event)
  File "/var/lib/juju/agents/unit-zookeeper-0/charm/src/provider.py", line 290, in _on_client_relation_updated
    relation_config = self.relation_config(relation=event.relation)
  File "/var/lib/juju/agents/unit-zookeeper-0/charm/src/provider.py", line 83, in relation_config
    acl = relation.data[relation.app].get("chroot-acl", "cdrwa")
  File "/var/lib/juju/agents/unit-zookeeper-0/charm/venv/ops/model.py", line 1345, in __getitem__
    raise KeyError(
KeyError: 'Cannot index relation data with "None". Are you trying to access remote app data during a relation-broken event? This is not allowed.'
unit-zookeeper-0: 13:42:20 ERROR juju.worker.uniter.operation hook "zookeeper-relation-broken" (via hook dispatching script: dispatch) failed: exit status 1

@dstathis Thanks for raising this.
I think I have a fix but haven't been able to reproduce locally, can you provide steps to reproduce the issue so that we can add to our tests?

I saw a different error on relation-broken:
unit-zk-0: 14:42:52.844 DEBUG unit.zk/0.juju-log zookeeper:16: Emitting Juju event zookeeper_relation_broken.
unit-zk-0: 14:42:52.855 ERROR unit.zk/0.juju-log zookeeper:16: Uncaught exception while in charm code:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-zk-0/charm/./src/charm.py", line 395, in <module>
    main(ZooKeeperCharm)
  File "/var/lib/juju/agents/unit-zk-0/charm/venv/ops/main.py", line 435, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-zk-0/charm/venv/ops/main.py", line 144, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-zk-0/charm/venv/ops/framework.py", line 355, in emit
    framework._emit(event)  # noqa
  File "/var/lib/juju/agents/unit-zk-0/charm/venv/ops/framework.py", line 824, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-zk-0/charm/venv/ops/framework.py", line 899, in _reemit
    custom_handler(event)
  File "/var/lib/juju/agents/unit-zk-0/charm/src/provider.py", line 302, in _on_client_relation_broken
    if username in self.charm.cluster.relation.data[self.charm.app]:

To reproduce:

snap list shows zk is disabled (probably after a reboot?)
ran juju remove-application


Add doc to direct developers to enable features for iced::time::every

Online document of Iced has the function iced::time::every. However, this function cannot be called when using thread-pool backend.
This PR adds doc to explicitly direct developers to enable appropriate features. This does not change any compiled code.

This comment provides a more detailed explanation of the PR.
The online document has a function named iced::time::every. As outlined in the document, there are no constraints on using this function, particularly requiring any specific features. However, when calling the function as shown below:
struct MyApp;

impl iced::Application for MyApp {
    type Executor = iced::executor::Default;
    type Message = iced::time::Instant;
    type Theme = iced::Theme;
    type Flags = ();

    fn new(_flags: Self::Flags) -> (Self, iced::Command<Self::Message>) {
        (Self, iced::Command::none())
    }

    fn title(&self) -> String {
        "".into()
    }

    fn update(&mut self, _message: Self::Message) -> iced::Command<Self::Message> {
        iced::Command::none()
    }

    fn view(&self) -> iced::Element<'_, Self::Message, iced::Renderer<Self::Theme>> {
        "".into()
    }

    fn subscription(&self) -> iced::Subscription<Self::Message> {
        iced::time::every(std::time::Duration::from_secs(1))
    }
}

and including the following dependencies in the Cargo.toml file:
[dependencies]
iced = "0.10.0"

it leads to a compiler error:
error[E0425]: cannot find function `every` in module `iced::time`

To address this issue, the simplest solution is to enable one of the following features: tokio, async-std, or smol.
This PR includes documentation for the function, explicitly instructing developers to enable the mentioned features.
While this may potentially be a cargo doc issue, it proved to be quite confusing for me, requiring a significant amount of time to identify the source of the error. I hope this PR can assist other developers facing the same problem.
(If you believe the problem is not significant, please inform me, and I will close the PR.)


Server address is no longer copyable

We can no longer select and copy the IP address and port number on the server card. This makes it harder to debug, since we need to manually type the address.
@daniellacosse this is a regression, it did not use to be like that. I imagine it's an easy fix?

I think I already fixed this - current master (not released yet):

This should be the version we're currently QAing

Ah, I thought you had fixed it. Thanks!


Specify properties when inline publishing

The Server.Publish API does not allow to specify MQTT 5 properties.
The obvious workaround would be to use Server.InjectPacket instead. However, the server's inline client Server.inlineClient is not exported.
Is there a simple way to inject a publishing with properties?

Duplicate of #428.


Contact

Hi, sorry for opening a new 'issue' but I would like to communicate with you privately. Is there somewhere that I could reach you? Thank you.
T.

Check discord server on closed issue


[BUG] Rancher causes high cpu load on kube-apiserver of local cluster

Rancher Server Setup

Rancher version: v2.7.4
Installation option (Docker install/Helm Chart): Helm

If Helm Chart, Kubernetes Cluster and version (RKE1, RKE2, k3s, EKS, etc): v1.25.10+rke2r1

Information about the Cluster

Kubernetes version: v1.25.10+rke2r1
Cluster Type (Local/Downstream): Local (3 master  (2CPU 6Gig RAM), 3 worker nodes (3 CPU, 12Gig RAM))
We have a total of 12 downstream clusters.

Describe the bug
Rancher is running in HA mode with 3 replicas. When at least one replica is running, the CPU load on the current kube-apiserver leader is very high.

Rancher itself logs nothing helpful in that regard:

Logs of the apiserver:  kube-apiserver.txt
Maybe this is related to https://github.com/rancher/rancher/issues/21025

We are having this exact issue, specifically looks identical to this line spamming the API server:
2023-06-19T11:34:25+02:00	Trace[875393783]: "List(recursive=true) etcd3" audit-id:c29f132d-1ec3-48e9-a432-3867bb76cef2,key:/apiextensions.k8s.io/customresourcedefinitions,resourceVersion:,resourceVersionMatch:,limit:0,continue: (19-Jun-2023 09:34:24.037) (total time: 1054ms):
So far this seems to consume any amount of CPU we have on the API server...


Use fixed seed for some random failed tests

Related to #10147 #10233 #10719 #10738 #10234 #10388 #10641
This PR sets fixed seeds for those tests that have datagen_seed issues, so they will not break CI.

build

build


(WIP do not merge) Return current error from status pollers.

This is a quick spike to see how easy it is to get error messages from status endpoint to users/teamcity logs. It may turn into the actual solution for that if all goes well.

Diff method of Startup now diffs value of SkipCheck.
Singularity DTO round-trips nil SingularityDeployment.Healthcheck as Startup.SkipCheck = true.

          1 Error

:no_entry_sign:
Please include a CHANGELOG entry.

  Generated by :no_entry_sign: Danger

Codecov Report

Merging #483 into master will not change coverage.
The diff coverage is 72.22%.

@@          Coverage Diff           @@
##           master    #483   +/-   ##
======================================
  Coverage    68.6%   68.6%
======================================
  Files         181     181
  Lines       10104   10104
======================================
  Hits         6932    6932
- Misses       2643    2644    +1
+ Partials      529     528    -1

Impacted Files
Coverage Δ

lib/status_poller.go
79.13% <72.22%> (ø)
:arrow_up:

util/restful/putbackjson.go
58.33% <0%> (-2.78%)
:arrow_down:

lib/auto_resolver.go
89.39% <0%> (+1.51%)
:arrow_up:

Continue to review full report at Codecov.

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


STool for making no-build brushes

The work for pathways are already done, it's just that there's currently no way to specify regions where building towers is not allowed outside of Hammer.

Duplicate of #115.


Page templates cannot use Nunjucks in Markdown pages, and vice versa

Cause
We only render pages using Markdown or Nunjucks, not both.
Consequence
We can't use Nunjucks macros or includes in Markdown pages, which makes writing them harder, as we don't get benefits of reusability and centralisation.
Impact of debt
Medium
Makes some things a lot harder, but for most pages it's fine
Effort to pay down
Medium/High
Would be straightforward to do with Express, although would probably require a lot more code. Alternatively migrating the backend that supported multiple renderers out of the box would solve the problem in a better way, but be much more effort.

I think it's worth redesigning the docs on a proper production stack like Eleventy, that would also tackle this issue and #93

I think this was fixed in #126


Issues Planeks

Not urgent, whenever you have time:

[ ] fix url when back from dashboard - https://github.com/stanfordnmbl/opencap-viewer/issues/131
[ ] remove trial permanently - https://github.com/stanfordnmbl/opencap-viewer/issues/74
[ ] replace age by birth year - https://github.com/stanfordnmbl/opencap-viewer/issues/106

Stanford needs to clean these up and do some things first

[ ] advanced analyses - https://github.com/stanfordnmbl/opencap-api/issues/43
[ ] scaling rule - https://github.com/stanfordnmbl/opencap-api/issues/56

@antoinefalisse Tasks estimation:

Losing session_id in url ~ 2-3h
Change age to birth year ~3-4h
Permanently delete trial in Step5 ~ 2-3h


Delay computation of Definition visibility

Summary
The AST checker has a concept of "definitions", defined as parts of the AST that can be documented with a docstring. In practice, this overlaps with scopes, since everything that can be documented also creates a new scope -- but in my opinion, it's helpful to treat them as separate concepts given that (1) not all constructs that create scopes can be documented (like comprehensions and lambdas), and (2) there are in theory other things that can be documented (like class attributes) that don't create scopes.
Anyway, in order to determine whether a definition is missing a docstring, we need to assess the definition's visibility: is it a public or private function/class/module? Visibility is a concept that relies on parent-child relationships (nested classes within private classes are private; nested classes within public classes can be public). Historically, we tracked these visibility rules as we iterated over the AST.
However, we now need to adjust our visibility rules to respect __all__ -- if a module defines __all__, and a definition is excluded from __all__, it should be considered private. Since __all__ can be modified throughout the program, it's no longer possible to track visibility as we go.
This PR refactors the "definitions" concept such that we now track definitions as we go, and then compute visibility after we've traversed the entire program. In the process, I also removed a few abstractions and refactored the Definition struct hierarchy to better reflect the layout of the data (i.e., we have separate enums for modules vs. members).
Note that we're not yet respecting __all__ -- that will come in a separate PR. But this PR makes it "trivial" to add that behavior.
Test Plan
Can rely entirely on our automated tests here. There should be no behavioral changes.

(Draft as I need to break this into a few PRs.)

One thing that we could do here that I haven't thought about before: Keep the logic as is but don't emit the Diagnostics right away. Instead, store them in a temporary Vec with, potentially some metadata. When we encounter an all_, go through all emitted Diagnostics and remove the Diagnostics for the private symbols.

This still requires most of the changes I made here, because you need to be able to retroactively check visibility up the parent tree, which our current abstractions don't allow. (We don't store parent-child relationships for definitions right now, so there'd be no way to know whether a child definition is now private.)

Thanks, took all suggestion :)


No attributes in rocksdb module

Hi guys,
I just tried to install the python-rocksdb lib and facing this problem. It seemed like everything worked just fine but when I try to run a basic script I get the following error:
python3 rocksdb.py
Traceback (most recent call last):
  File "rocksdb.py", line 1, in <module>
    import rocksdb
  File "/Users/eeepmb/workspace/rocksdb.py", line 3, in <module>
    db = rocksdb.DB("test.db", rocksdb.Options(create_if_missing=True))
AttributeError: module 'rocksdb' has no attribute 'DB'

Unfortunately I don't have the original logging anymore but when I rerun the commands I get the following output.
brew install rocksdb
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (homebrew/core, homebrew/cask and caskroom/cask).
==> New Formulae
anime-downloader
==> Updated Formulae
corectl vamp-plugin-sdk
Warning: rocksdb 6.1.2 is already installed and up-to-date
To reinstall 6.1.2, run brew reinstall rocksdb

pip3 install python-rocksdb
Requirement already satisfied: python-rocksdb in /usr/local/lib/python3.7/site-packages (0.7.0)
Requirement already satisfied: setuptools>=25 in /usr/local/lib/python3.7/site-packages (from python-rocksdb) (41.0.1)

I'm using Python 3.7.3 (.. but had the same issue with Python 3.6.5) on macOS Mojave v.10.14.5.
I already  googled a lot but couldn't find much on this. It's also weird because in my IDE (Visual Studio Code) the modules are listed when I type rocksdb..
Any help on this would be highly appreciated.

I just found the solution myself but for everyone else it is as simple as it gets:
The problem was that my .pyscript file was named rocksdb as well ...


feat:[HDH-320]: Canonical url addition in HDH

Thanks for contributing to the Harness Developer Hub! Our code owners will review your submission.
Description

Please describe your changes: __________________________________
Jira/GitHub Issue numbers (if any): ______________________________
Preview links/images (Internal contributors only): __________________

PR lifecycle
We aim to merge PRs within one week or less, but delays happen sometimes.
If your PR is open longer than two weeks without any human activity, please tag a code owner in a comment.
PRs must meet these requirements to be merged:

[ ] Successful preview build.
[ ] Code owner review.
[ ] No merge conflicts.
[ ] Release notes/new features docs: Feature/version released to at least one prod environment.

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

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://66e330aadfff050784ea9cf4--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://66e441ef555ff50095f07009--harness-developer.netlify.app