feat: OLED dark theme

Pull Request Checklist

[x] Description: Briefly describe the changes in this pull request.
[x] Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.

[x] Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?

Description
Add a true black background theme for low-light environments and improved usage with OLED screens. Closes #1110

Changelog Entry
Added

True black background theme (OLED Dark)

Changed

tailwind.config.js dark mode color palette to use a dynamic variable to toggle between regular dark mode and OLED dark

Looks great! Thanks as always!


Feature Request: Setup Prometheus for TSG's

Prometheus is a monitoring and learning platform on Kubernetes. The goal is that a set of notebooks will be configured as Promtheus monitors, which will always check if the clusters are working. If a notebook fails, there will be a hint to make the cluster work.

@yualan I'm closing this unless we think this is something we're actually going to be implementing


Additional Python source reorganization

Sets the stage for python-based documentation build.

@metasim
One point of order.
Travis build passes but it never actually runs the Python tests. It dies on trying to import pathlib. which I suspect means it is actually running python 2.7, but not sure.
So two issues there

make the python tests correctly return as failed.
more travis tweaking to run on python 3 if that's what we want.

https://travis-ci.org/locationtech/rasterframes/builds/541817162#L4430-L4434


Additional query support part1

As requested by @Incarnation-p-lee
First of set of 4 pull requests to introduce additional query method support

@Incarnation-p-lee
Seems to be getting the same error when trying to merge to this branch as was seen when merging to master??

@Xeinn
Sorry for misleading here, I mean you can just clone this repo(not the forked one). And then create new branch with your code. Then send the PR by this repo instead of the forked one. Sorry for inconvenience.

Ahh, ok :) sorry misunderstood.  Will give that a go.
Regards
Chris
On 25 Jul 2018 1:55 am, Pan Li<EMAIL_ADDRESS>wrote:
@Xeinnhttps://github.com/Xeinn
Sorry for misleading here, I mean you can just clone this repo(not the forked one). And then create new branch with your code. Then send the PR by this repo instead of the forked one. Sorry for inconvenience.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/spring-data-cosmosdb/pull/142#issuecomment-407598163, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AU9yfEmfH9CwD0xIoTukcGFweJXMHiI1ks5uJ8HxgaJpZM4VdF3P.

Closed as feature has been merged in other PRs.


[Bug Report] Bug in el-table sort-method

Element UI version
2.1.0
OS/Browsers version
Chrome 71.0.3578.98
Vue version
2.5.20
Reproduction Link
https://jsfiddle.net/Holybasil/pqkn05s6/4/
Steps to reproduce
See jsfiddle and try to release comments in methods[test]
What is Expected?
Same to https://jsfiddle.net/2mjjx3n8/3/
Refer https://github.com/ElemeFE/element/issues/5117
What is actually happening?
Not work and just reverse the list

I've discovered the same issue and found that this was broken in element-ui v2.0.2. I use the same fiddle with v2.0.1 and it works perfectly.
I have two fields - date in text and the sortable date in format YYYY-MM. Sorting should work the same on both columns - it uses one sort function. In v2.0.2 sorting looks random but was working fine previously.
You can check:
v2.0.2 doesn't work properly - https://jsfiddle.net/q3soynb0/
v2.0.1 works properly - https://jsfiddle.net/q3soynb0/1/

fell on this same issue, solved it by using the sort-change attribute as follows:
1)Add a @sort-change="FunctionName" on the el-table tag
2)Add the sortable attribute on the column you wish to sort
3)Write a function that sorts and returns the table's datasource,
e.x. public FunctionName(){return this.tableData.sort(...);}
note: according to the documentation, you can pass the column to the function, in order to adapt your sorting needs accordingly.
I know that this is not a fix per se, but it is a decent workaround for now.


Ensure PACKAGE_VERSION is defined, even without config.h

If we aren't using config.h, then PACKAGE_VERSION is not
defined. Spot this, and include tess_version.h to get
TESSERACT_VERSION_STR instead.

Tesseract uses config_auto.h, not config.h. Why do you want to compile without config_auto.h?

"Tesseract uses config_auto.h, not config.h."
Yes, indeed, that's a typo. If you set the HAVE_CONFIG_H define, then tesseract does indeed look for a config_auto.h file.
Given that tesseract requires you to set HAVE_CONFIG_H to use config_auto.h, it seems reasonable that it should compile without HAVE_CONFIG_H being set (otherwise, why check that define at all?)
"Why do you want to compile without config_auto.h?"
Because for various reasons I'm not using the autoconf based build.
Now, it's entirely reasonable that this fix isn't right. Possibly we should ALWAYS be including tess_version.h and always using TESSERACT_VERSION_STR. That'd seem neater to me. I'm happy to prepare a patch like that if that's what it takes to get a fix committed.

I suggest to drop this pull request and add a config_auto.h to your code.

Actually, there is a nicer way to do this. Let me have one last go at getting your approval :)

There you go, this version seems much nicer.


sort directives

Follow-up from: https://github.com/flutter/flutter/issues/81219
Note that these changes are required to unblock the failing flutter analyze try-bot:
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8848446021182711936/+/u/analyze_flutter_flutter/stdout?format=raw
/fyi @goderbauer @bwilkerson @devoncarew
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[x] I listed at least one issue that this PR fixes in the description above.
[ ] I updated/added relevant documentation (doc comments with ///).
[ ] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
[ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Why weren't these errors found during the presubmit?

Why weren't these errors found during the presubmit?

It's a good question.  I thought they should and was careful to wait to land to https://github.com/flutter/flutter/issues/81219 re-enabling directives_ordering until I saw that the current engine roll had included the Dart SDK with the updated lint.  Either I was mistaken?  It was reverted?  Or some other cause of Dart SDK skew?
Sorry for the noise.  Really, I was trying to avoid this!
/fyi @athomas

There are more coming in on the current engine roll that have been caught by the presubmit check: https://ci.chromium.org/ui/p/flutter/builders/try/Linux analyze/15040/overview

I also filed https://github.com/dart-lang/sdk/issues/45892


Fix how processes are killed on Linux

I'm seeing hangs when tests use deployers. We need to kill the process itself and not just its children. Tested this change with Entropy on Linux.
cc @moozzyk

/cc @victorhurdugaci  @kichalla

Does it kill an entire process tree? Does it work on mac?

Verified this approach on Linux and Mac. Maybe we should check this in to stop hangs on Travis and look for a more elegant solution?

@JunTaoLuo - If it stops hangs :ship::it:


Certificate of infeasibility for unconstrained convex problems

For what appears to be a modest dynamic range in an l-1 regularized least-squares problem, cvxpy declares the convex unconstrained problem to be infeasible. It does so, for multiple solvers. In this case, it can be resolved by simple scaling.  However, it is not clear either from the documentation or from the messages that the user needs to do so.  Of course, it would be friendlier if cvxpy reduction process took care of the scaling for the user to maintain feasibility.  At the very least, it should not declare an unconstrained convex problem infeasible.
For version 0.4.11, attached file testSolvers4.11.html,  shows the problem.
For version 1.0.3, attached file testSolvers1.0.html, shows the problem.
For version 1.0.3 there is an additional problem with CVXOPT solver as seen in the notebook cell output.
testSolvers4.11.html.zip
testSolvers1.0.html.zip

Hi Akshay,
Any thoughts on looking at automatic scaling of variables or tolerances to preserve properties like feasibility through the reductions?  To me, the main attraction of convex optimization is to get some guarantee on the results.
Should I file a separate issue for problem with CVXOPT solver in version 1.0.3 that did not exist in version 0.4.11?
Thanks!

Did you try it with OSQP as well? It should not report infeasibility.

Hi @bstellato
Yes!  It does not report infeasibility and it is chosen by cvxpy 1.0.3 automatically for the problem.

@sunilshah sadly the problem of automatic scaling is deep and not something we can solve easily. If you have issues with particular solvers, you should post issues for those solvers. You should not say "cvxpy cannot solve the problem". It is fair to say that the solution of rescaling the problem is not featured prominently. I've changed the solver error message to mention rescaling.

@SteveDiamond
Yes, I agree it is deeper- future research.
The second issue in the original post needs a bit more elaboration.
For the scaled problem in cvx 1.0.3,

resCVX=prob2.solve(solver='CVXOPT',verbose=True)

results python traceback:
        TypeError: incompatible dimensions

     at line 417    cvxpy/problems/solvers/cvxopt_intf.py in format_results(self, results_dict, data, cached_data)

This occurs after CVXOPT message: "Optimal solution found"
This traceback does not occur in 0.4.11 for the same problem.  See the attachments in the OP.
Do you think this is a problem with CVXOPT solver to be posted on cvxopt/cvxopt ?
Thanks!


Fix flaky TestAddCertsToWatch_remove_ca test

Signed-off-by: albertteoh<EMAIL_ADDRESS>
Which problem is this PR solving?

Fixes #2586

Short description of the changes

Explicitly wait for at least two matching log events, since the test asserts on the existence of these two log entries.

nice!


feat: Adds publishing to npm via travis

Addresses #84 and #198
The only possibly controversial thing is that I've namespaced the package into @fragaria organization on NPM. Also, Travis is enabled and should publish automatically to NPM on every pushed tag.

That means everybody who already installed it should reinstall? I would prefer to not use @fragaria prefix.


TryFrom for Int, Logical, Real

Closes #252

Not sure how this relates to #251 after most recent conversations. We need to figure out some coherent approach to handling numeric vectors that does appropriate type conversions and checking, like we are doing with scalars.

Not sure how this relates to #251 after most recent conversations.

Do you mean #252, which this closes? Or is the suggestion that the NA handling issue should be addressed before this one?

We need to figure out some coherent approach to handling numeric vectors that does appropriate type conversions and checking, like we are doing with scalars.

Agreed. I see this PR as plugging a hole for now, following the behavior of similar implementations, but of course it should be to be changed as part of a move to better conversions in general.

I meant #251, and specifically, I meant we need to have a coherent framework of how these things should work before continuing to implement.
@Ilia-Kosenkov suggested we should write a whitepaper outlining our data conversion model. This suggestion is on discord. I'll file an issue now here.

See #259.

I see this PR as plugging a hole for now as with #247, using the behavior of similar implementations.

Yeah, I thought the same at the time of adding "good first issue" label. Sorry for the confusion...

How about something like the following. Instead of this conversion:
robj.as_integer_iter()
            .ok_or_else(|| Error::ExpectedInteger(robj))

could we implement something like this:
if let Ok(v) = robj.as_integer_iter() {
    v
} else {
    let rreal:Real = robj.try_into()?;
    let rint = Int::from_real(rreal);
    Ok(rint)
}

where Int::from_real() takes a Real and converts it into an Int, making a copy of the data in the process.

We could implement a "Cow" for numeric types.
A Cow<[type]> is either a slice or a vector depending on whether
a conversion has been done.
So Cow<[i32]> is as_integer_slice for and INTSXP and
a vector conversion for a REALSXP.
So Cow<[f64]> is as_real_slice for and REALSXP and
a vector conversion for a INTSXP.

I may re-work Int, Logical and Real to be just Robj wrappers and pull
out the iterator as a separate object.
We can implement GET_REGION for ALTREP objects which
would be faster.

But essentially, the logic will be the same.

I'm happy to approve this for now if @clauswilke is ok so that @brendanrbrown gets a contribution.
We can either implement Cow types for int/real mismatches or improve the iterators
to accept Altrep types and do the conversions as a separate step.

Before merging, can we at least stub out an alternative path for now so we have a marker in the code that this isn't completed?
Something like so maybe?
if let Ok(v) = robj.as_integer_iter() {
    Ok(v)
} else {
    // TODO: check if robj is another type (e.g. Real) that can be converted
    // into integer, and do the conversion
    Error::ExpectedInteger(robj)
}

Also, @andy-thomason, I'd suggest we wait with reworking how Int, Real, and Logical work until we have a bit more progress on an architecture whitepaper, #259. Let's think through all the problems first and then pick an implementation that is appropriate. To me, the question of whether we need types that can stand in for R's equivalent of i32 and f64 is unresolved. (We have something like it for Logical with Bool.)

I added the todo comment for possible merging, should that be what makes sense here.

could we implement something like this ... where Int::from_real() takes a Real and converts it into an Int

Yes, this seems reasonable, would not be difficult, and would be a step closer to being consistent (probably) with whatever future coherent conversion scheme, based on the conversation. If having it would make this hole-patching PR a better fit, I would be glad to add it.

We could implement a "Cow" for numeric types.

Cow does seem a good choice for the as_ conversions, for exactly the kind of 'maybe integer' conversions discussed above.

I'm happy to approve this for now if @clauswilke is ok so that @brendanrbrown gets a contribution.

@andy-thomason: thanks for the thoughtfulness.

Don't understand the CI failure here. Since the most recent passing tests I only moved text, but the isn't cargo-fmt related. Someone who knows more able to shed some light?

Don't understand the CI failure here.
It may be a probabilistic failure (i.e., works most of the time but breaks sometimes, randomly). I'll restart the tests to see if that fixes it.

If having it would make this hole-patching PR a better fit, I would be glad to add it.

If you don't mind I'd appreciate it. We could also break it into two separate PRs though.
I have a few more documentation requests, though:

Could you add the same kind of TODO comment to the implementation for Real?
In the test function, could you add a TODO comment that we will have to add tests for reals that can be converted to integers, reals that can't, integers converted to reals, and vectors containing NAs when reals get converted to ints and vice versa?

Thanks!

@clauswilke My preference would be to address the additional conversions, e.g. using an Int::from_real method, in a separate PR. It'll be easier to review and comment on I think. Should be able to submit an initial PR for that this week.

It was the same failure as the previous case, in one of the windows builds, which appears inconsistently. I'm not quite sure what to make of it.

Thanks!


Unable to import module 'now__launcher'

Bug report
Describe the bug
When trying to build and deploy to now, everything seems to build fine but at the end of the build process I get the following error:
Unable to import module 'now__launcher': Error
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/var/task/next.config.js:2:51)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:

Clone this repo https://github.com/lorenseanstewart/next-blog-starter
npm i from the root
now
To see the error, check logs with now logs <url-provided-by-deploy>

Expected behavior
This project to deploy without errors.
System information

macOS
Version of Next.js: 7.0.2
Version of Now: 2
Version of now-cli: 12.1.6

Moving this issue to the now-cli repo.

Because this is the first result in google, and there is no link to the other issue, I will leave the fix I found here:
The issue comes due to trying to run bundling work during the production serving phase of next (details here), such as @zeit/next-css, @zeit/next-sass, or @zeit/next-typescript.
The fix is to only run those during the build phase of running next:
next.config.js
const { PHASE_PRODUCTION_SERVER } =
  process.env.NODE_ENV === 'development'
    ? {}
    : require('next-server/constants');

module.exports = (phase, { defaultConfig }) => {
  if (phase === PHASE_PRODUCTION_SERVER) {
    // Config used to run in production.
    return {};
  }

  const withCSS = require('@zeit/next-css');

  return withCSS();
};

For anyone stumbling into this, the issue is not necessarily related to next-css.
I got the same problem having withBundleAnalyzer(...) returned from next.config.js.
Wrapping it the same way as described above helped.

@jesstelford  thanks but I am still getting the error
by the way it should be next/constants

+1 Same probem as efleurine

Thank you very much @jesstelford for your help!

@efleurine Just for info, apparently next-compose-plugins package + next-sass doesn't work with this pattern suggested by jesstelford : https://github.com/cyrilwanner/next-compose-plugins/issues/13

Here is the content of the next.config.js file which is working for a complex example with several plugins like dotenv, next-images, next-sass, ... .
@jesstelford, Just to make sure can you confirm that this is the correct syntax to use:
  process.env.NODE_ENV === "development"
    ? {}
    : require("next-server/constants");

module.exports = (phase, { defaultConfig }) => {
  if (phase === PHASE_PRODUCTION_SERVER) {
    // Config used to run in production.
    return {};
  }

  const sass = require("@zeit/next-sass");
  const images = require("next-images");
  require("dotenv").config();
  const path = require("path");
  const Dotenv = require("dotenv-webpack");
  const withBundleAnalyzer = require("@zeit/next-bundle-analyzer");
  const {
    WebpackBundleSizeAnalyzerPlugin
  } = require("webpack-bundle-size-analyzer");
  const withTM = require("next-plugin-transpile-modules");
  const { ANALYZE } = process.env;

  return withBundleAnalyzer(
    images(
      sass(
        withTM({
          analyzeServer: ["server", "both"].includes(
            process.env.BUNDLE_ANALYZE
          ),
          analyzeBrowser: ["browser", "both"].includes(
            process.env.BUNDLE_ANALYZE
          ),
          bundleAnalyzerConfig: {
            server: {
              analyzerMode: "static",
              reportFilename: "../bundles/server.html"
            },
            browser: {
              analyzerMode: "static",
              reportFilename: "./bundles/client.html"
            }
          },
          transpileModules: ["lodash-es"],
          webpack: config => {
            config.plugins = config.plugins || [];
            config.plugins = [
              ...config.plugins,
              new Dotenv({
                path: path.join(__dirname, ".env"),
                systemvars: true
              })
            ];
            if (ANALYZE) {
              config.plugins.push(
                new WebpackBundleSizeAnalyzerPlugin("stats.txt")
              );
            }
            config.externals = Array.isArray(config.externals)
              ? config.externals.map(fn =>
                  typeof fn === "function"
                    ? (context, request, callback) => {
                        if (request === "lodash-es") {
                          return callback(null, "commonjs lodash");
                        }
                        return fn(context, request, callback);
                      }
                    : fn
                )
              : config.externals;
            return config;
          }
        })
      )
    )
  );
};

It looks good to me, and if it works, then I'd say you're good to go 🎉

@humet Be sure to use require('next-server/constants'), not require('next/constants').

@jesstelford, I'm getting this error at building:

Cannot find module 'next-server/constants'

Ah, looks like that module doesn't exist locally.
I guess there should be a check for of its running on now's servers or not. I think there's NOW env var we could use?
Does this work both locally and when deploying for you?
const { PHASE_PRODUCTION_SERVER } =
  process.env.NODE_ENV === 'development'
    ? {}
    : !!process.env.NOW
        ? require('next/constants')
        : require('next-server/constants');

Hi
Unfortunately, I still get that error.
My config is:
`require('dotenv').config();
const { PHASE_PRODUCTION_SERVER } =
process.env.NODE_ENV === 'development'
? {}
: !process.env.NOW
? require('next/constants')
: require('next-server/constants');
const config = {
publicRuntimeConfig: {
endpoint: process.env.ENDPOINT,
username: process.env.USERNAME,
password: process.env.PASSWORD
}
};
module.exports = (phase, { defaultConfig }) => {
if (phase === PHASE_PRODUCTION_SERVER) {
return config;
}
const withCSS = require('@zeit/next-css');
return withCSS(config);
};`

@alexedev what's in your .env file? I have a hunch NODE_ENV is being overwritten. It should be development locally, and production for deployment to now.

@alexedev  Your code has problem in this line
return withCSS(config);

The config is undefined.

@jesstelford The problem on local build is resolved but I still get a 502 in Now.
My config
const { PHASE_PRODUCTION_SERVER } =
  process.env.NODE_ENV === 'development'
    ? {}
    : !process.env.NOW
      ? require('next/constants')
      : require('next-server/constants');

module.exports = (phase, { defaultConfig }) => {
  if (phase === PHASE_PRODUCTION_SERVER) {
    // Config used to run in production.
    return {};
  }

  // ✅ Put the require call here.
  const withCSS = require('@zeit/next-css');

  return withC

Now logs
Unable to import module 'now__launcher': Error
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/var/task/next.config.js:5:9)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

😱 My apologies, I gave you a bum steer; the env var we should be checking against is NOW_REGION (not NOW). I've updated the examples above, and copied here for posterity:
const { PHASE_PRODUCTION_SERVER } =
  process.env.NODE_ENV === 'development'
    ? {}
    : !process.env.NOW_REGION // ℹ Must be `NOW_REGION`, not `NOW` (my bad)
      ? require('next/constants')
      : require('next-server/constants');

module.exports = (phase, { defaultConfig }) => {
  if (phase === PHASE_PRODUCTION_SERVER) {
    // Config used to run in production.
    return {};
  }

  const withCSS = require('@zeit/next-css');

  return withCSS();
};

The only change is:
     ? {}
-    : !process.env.NOW
+    : !process.env.NOW_REGION
       ? require('next/constants')

Just opened #5846 to address this issue

@revskill10 it is defined in the upper scope

@jesstelford that change:
     ? {}
-    : !process.env.NOW
+    : !process.env.NOW_REGION
       ? require('next/constants')

fixed my problem with deploying to now v2. Thanks!

And, err, in case anyone thinks otherwise; I don't work for @zeit, or on the now platform. I'm just someone who came up against this issue and wanted to share my knowledge on how to get past it.
Thank you everyone who has been thoughtful and helpful while we worked it out together ❤
Hopefully a more official fix will come from @timneutkens in #5846 👍

@timneutkens Will it ever be possible to run @zeit/next-sass with now 2? How can lambda support binary module?

Afaik it already works, you just have to change next.config.js as outlined by https://github.com/zeit/next.js/issues/5750#issuecomment-445575468

well, I finally resolved my problem...
lambda failed because I relied on dotenv package to take env values from .env
but two things went wrong:

.env is ignored by now
deployment is broken if require('dotenv').config(); is called in now environment (I did not understand the reason yet).

Instead, env values should be referenced in now.json
see https://zeit.co/docs/v2/deployments/environment-variables-and-secrets/
So here is how the fixed config looks like:
if (!process.env.NOW_REGION) {
  // for now-ci deployment env values are taken not from .env but from now.json
  // https://zeit.co/docs/v2/deployments/environment-variables-and-secrets/
  // now deployment breaks if dotenv used
  require('dotenv').config();
}

const { PHASE_PRODUCTION_SERVER } =
  process.env.NODE_ENV === 'development'
    ? {}
    : !process.env.NOW_REGION
    ? require('next/constants')
    : require('next-server/constants');

const config = {
  publicRuntimeConfig: {
    endpoint: process.env.ENDPOINT,
    username: process.env.USERNAME,
    password: process.env.PASSWORD
  }
};

module.exports = (phase, { defaultConfig }) => {
  if (phase === PHASE_PRODUCTION_SERVER) {
    // Config used to run in production
    return config;
  }

  const withCSS = require('@zeit/next-css');

  return withCSS(config);
};

this can get a bit more readable by assigning process.env.NOW_REGION to a constant but I wanted to be explicit
If you have any other suggestions for more eloquent fix, please let me know
PS my now.json looks like
{
  "version": 2,
  "builds": [{ "src": "next.config.js", "use": "@now/next" }],
  "env": {
    "ENDPOINT": "@endpoint",
    "USERNAME": "@username",
    "PASSWORD": "@password"
  }
}

An alternative to dotenv as @alexedev describes is dotenv-webpack:
const { PHASE_PRODUCTION_SERVER } =
  process.env.NODE_ENV === 'development'
    ? {}
    : !process.env.NOW_REGION
    ? require('next/constants')
    : require('next-server/constants');

module.exports = phase => {
  if (phase === PHASE_PRODUCTION_SERVER) {
    return {};
  }

  const DotEnv = require('dotenv-webpack');

  return {
    webpack: config => {
      config.plugins.push(new DotEnv());
      return config;
    }
  };
};

Then you can use process.env.* directly as it will be read from .env and replaced during build.

@alexedev, @carlesandres, @MaksKoseda:
😱 My apologies, I gave you a bum steer; the env var we should be checking against is NOW_REGION (not NOW). I've updated the examples above, and copied here for posterity:
const { PHASE_PRODUCTION_SERVER } =
  process.env.NODE_ENV === 'development'
    ? {}
    : !process.env.NOW_REGION // ℹ Must be `NOW_REGION`, not `NOW` (my bad)
      ? require('next/constants')
      : require('next-server/constants');

module.exports = (phase, { defaultConfig }) => {
  if (phase === PHASE_PRODUCTION_SERVER) {
    // Config used to run in production.
    return {};
  }

  const withCSS = require('@zeit/next-css');

  return withCSS();
};

The only change is:
     ? {}
-    : !process.env.NOW
+    : !process.env.NOW_REGION
       ? require('next/constants')

This fixed the issue for me! Thanks @jesstelford

@jesstelford  OMG I finally got this to work thanks to you!. Thanks a lot man!
@TLevesque Btw, I got mine to work with next-compose-plugins with:
const {PHASE_PRODUCTION_SERVER} =
    process.env.NODE_ENV === "development"
        ? {} // We're never in "production server" phase when in development mode
        : !process.env.NOW_REGION
        ? require("next/constants") // Get values from `next` package when building locally
        : require("next-server/constants"); // Get values from `next-server` package when building on now v2

const nextConfig = {
    webpack: config => {
        // Fixes npm packages that depend on `fs` module
        config.node = {
            fs: "empty"
        };

        config.module.rules = config.module.rules.map(rule => {
            if (rule.loader === "babel-loader") {
                rule.options.cacheDirectory = false;
            }
            return rule;
        });
        return config;
    }
};

module.exports = (phase, {defaultConfig}) => {
    if (phase === PHASE_PRODUCTION_SERVER) {
        return {};
    }

    //const withImages = require("next-images");
    const withSass = require("@zeit/next-sass");
    const {withPlugins} = require("next-compose-plugins");

    return withPlugins([[withSass]], nextConfig)(phase, defaultConfig);
};

Worth noting, that considering this issue, the documentation here is incorrect then:
https://www.npmjs.com/package/@zeit/next-typescript

An alternative to dotenv as @alexedev describes is dotenv-webpack:
const { PHASE_PRODUCTION_SERVER } =
  process.env.NODE_ENV === 'development'
    ? {}
    : !process.env.NOW_REGION
    ? require('next/constants')
    : require('next-server/constants');

module.exports = phase => {
  if (phase === PHASE_PRODUCTION_SERVER) {
    return {};
  }

  const DotEnv = require('dotenv-webpack');

  return {
    webpack: config => {
      config.plugins.push(new DotEnv());
      return config;
    }
  };
};

Then you can use process.env.* directly as it will be read from .env and replaced during build.

This is the exact same problem I had when trying to directly implement with-dotenv from the Next.JS examples.
Thank you @webpro and @jesstelford  !!! It worked perfectly. You don't know how many hours I've wasted in this and how many more I would've wasted without you guys. Thanks!

Nothing on this thread seems to be working out.
I can run locally, but @webpro 's solution to use Webpack dotenv doesn't seem to get my Now deployment working:
const { PHASE_PRODUCTION_SERVER } =
  process.env.NODE_ENV === 'development'
    ? {}
    : !process.env.NOW_REGION
    ? require('next/constants')
    : require('next-server/constants');

module.exports = phase => {
  if (phase === PHASE_PRODUCTION_SERVER) {
    return {};
  }

  const DotEnv = require('dotenv-webpack');

  return {
    webpack: config => {
      config.plugins.push(new DotEnv());
      return config;
    }
  };
};

@jesstelford 's original solution does not work either.
The problem seems to be that I can't access my environment variables with process.env.VARIABLE_NAME when in production. Has anyone else had success with a now-deployed app that uses process.env with secrets successfully?
My small repo that I'm struggling with is here: https://github.com/mulholio/onboard

@mulholio I'm using it in https://github.com/webpro/bookstore

@webpro do you have any secret variables? I'm starting to think that might be some of my problem.

@webpro No

Everyone in this issue will want to upgrade their application to this: https://github.com/zeit/now-examples/pull/214

Much smaller lambdas
Reproducible result
No "custom" environment, just what you provide, we don't override package.json + don't drop yarn.lock/package-lock.json anymore. We don't add next-server anymore etc.

More details here: https://github.com/zeit/now-builders/pull/150

@timneutkens can you provide details on how to use that with with-typescript and with-css, as most people in this issue ran into problems because of a mandatory useage of one of the with-* helpers. Are such helpers no longer necessary?

I'm not sure what the issue is 🤔 As per zeit/now-examples#214:

Add now.json

{
  "version": 2,
  "builds": [
    {"src": "package.json", "use": "@now/next"}
  ]
}

Upgrade to Next.js 8 canary

yarn add next@canary

Enable serverless target in next.config.js:

module.exports = {
  target: 'serverless'
}

Or when you're using plugins:
const withTypescript = require('@zeit/next-typescript')
module.exports = withTypescript({
  target: 'serverless'
})

You can read more about the serverless target here: https://github.com/zeit/now-builders/pull/150
And here: https://github.com/zeit/next.js/pull/5927

@timneutkens ok great, so none of the workarounds above that we had to do are necessary anymore! Fantastic! Thanks you for your hard work

Exactly 🙏 No workarounds and a lot of benefits 👍

@timneutkens
After adding the changes you suggested I see:
Error: Cannot find module '<path>/src/.next/server/static/OJLfDlRyija6wxm_8Ywn4/pages/_document'

And it turns out that is really missing OJLfDlRyija6wxm_8Ywn4 folder in static.

but it's missing _document
file in that path

Are you deploying to Now or your own hosting?

AWS lambda

Please read https://github.com/zeit/next.js/pull/5927. It sounds like you're deploying a Next.js server, instead you should deploy the standalone functions that come out of the Next.js serverless target build.


A solution folder whose name starts with a period ('.') will also trigger this error.

I have found that when I add a solution folder to my solution where the name starts with a period (in an attempt to make it sort out as the topmost folder) it also triggers this problem, which wasn't in the list of possible causes.  Removing the leading period from the folder name clears up the problem.  Please add this to the list of possible causes in the page.  Even better, have them fix the problem in Visual Studio 2019.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 62af3ec3-7d59-7b4a-b9a1-413b8956bab7
Version Independent ID: 31e0311a-8823-1d30-8f38-ac0c37ca07d9
Content: NETSDK1004: Assets file not found - .NET CLI
Content Source: docs/core/tools/sdk-errors/netsdk1004.md
Product: dotnet-fundamentals
Technology: dotnet-cli
GitHub Login: @tdykstra
Microsoft Alias: tdykstra

Thanks for reporting that.  I'll add that to the list of possible causes, or you're welcome to submit a PR to add it if you prefer.

@tdykstra Is it possible this is a product bug? Could you please confirm with the product team if this is the expected behavior?

@TerryGLee  Can you help with this question (regarding allowable naming patterns for solution folders)?

[Response from Terry:]
It looks like this is product-specific feedback that should be brought to the attention to the engineering team. The venue in which we ask customers to do this is by using the Report a Problem tool.
Otherwise, the documentation we have on solution files can be found via this search string from our Visual Studio IDE documentation: https://docs.microsoft.com/en-us/search/?scope=VS IDE&view=vs-2019&terms=solution file
As well, here are other resources you might consider using:

Visual Studio on Q&A
https://social.msdn.microsoft.com/Forums/vstudio
https://www.stackoverflow.com
https://www.reddit.com/r/VisualStudio/


Better documentation/API

This is not an urgent issue, but I log it here to keep it in mind.
I got around the TSERS API and idea relatively quick (and yet not that quick) because I usually wire my cycles by hand and I have a similar API (conceptually similar but the API is quite different), so it was not so hard to see the abstraction. However, it would really help to define explain TSERS not in function of cycle (which would assume it is destined to people who know cycle), but in function of functional reactive programming, and your app as a circuit. Rxjs operators are basic signal transformers, components are composite signal transformers made from basic signal transformers, and you add the feedback loop with a function (run, is it? but that would more be sth like connect or wire?), and you switch on the circuit with execute (I'd rather use a verb than a noun, that would be the real run in my understanding).
I approached this in my case as:

specification
runtime

In the specification part, you have three concepts:

signals
signal transformers
feedback loop

from which you derive :

component (logic controller? integrated circuit? they are distinguished from the lower-level entities because they can feature feedback loop)
application

through composition.
In the runtime part, you have:

parametrization of initialization order
orderly subscription of signals/component/application
orderly disposal of signals/component/application

And the API should in my opinion relate to that conceptual map rather than looking for brevity.

Yeah I agree. The current documentation has way too many references to Cycle and my intention is make a complete refactoring of docs. The model you proposed looks nice, although I'm not sure what you mean with "component" and "application". I'd just focusing on saying all UI functions as "applications" because there are already pretty much cognitive load with "signals", "transformers" and "execute". The biggest challenge is trying to keep the text as simple as possible so that less experienced developers could understand it too.
For API surface, some methods are gonna changes (#6). I'm planning to rename also run because it doesn't describe the actual behaviour and is just an unnecessary backreference to Cycle. Before the release, the name of run was actually loop which describes the behaviour IMO much better, but I decided to use run because I though it was easier for Cyclist to understand. Bad decision to say - and going to be fixed.
I'm gonna create a branch for this and post references to commits so that that we can discuss the changes before merging them into master.

Great. Yes, the distinction between components and applications is to be refined, as they essentially have the same operational semantics (taking signals, outputing signals, and performing side-effects in the process). In my understanding this, taking the metaphor of a tree data structure, this is just like the root node, and the other nodes : they are all nodes, but only one node stands at the top. So you could imagine application as being the top level component or something like that; and instead of saying top-level component all the time, you say application.
The difference between signal transformer and component in my mind are :

signal transformers do not perform side-effects and do not have feedback loop. Think about a regular rxjs operator. Signal transformers would then be pure functions (of signals).
components MAY have feedback loop and MAY perform side-effects. In a way you can think about that as higher-powered signal transformers. They would be the impure side-effectful functions. As a matter of fact, I can't think how a pure component would be useful. If you take a signal and returns a signal and do nothing else, for me, it is just like the map operator.

I see the components as being built from input signals, signal transformers (for the pure processing), and drivers (for the side-effects). It is intended to be a reusable unit, which comes tested out of the box by the component maker.

New docs added in 1.0.0 release

Core concepts in the core repository
Tutorial in the examples repository

I'd happily hear some comments and improvement suggestions :smile:

I'll come back to that over the week-end


Add exclude option

Add exclude input parameter for tar option --exclude.
Assuming a project using npm, we do not want to include node_modules files in the tar.
This change make it possible by the followings
- name: Install dependencies
  run: npm ci

- name: Build
  run: npm run build

- name: Upload artifacts
  uses: actions/upload-pages-artifact
  with:
    path: .
    exclude: node_modules

I came up with a simple workaround after submitting this pull request. It worked as expected, although it was a little weird to have it be like an injection...
- uses: actions/upload-pages-artifact@v1
  with:
    path: '. --exclude=node_modules'

Path escaping has been fixed in https://github.com/actions/upload-pages-artifact/pull/19 so your workaround should not work anymore.
Why are you using . as your path? Most (all?) static site generators place static (and built) assets in a dedicated folder. Otherwise you would also include all your source files and package.json in your site...

I planed that my site generator places static assets in root folder for simplification. I assumed that few folders makes it easy for beginner developers and it would not be a problem to publish files that are not needed as long as they are not too large.
But I have now reconsidered that the files to be made public should be explicit and separated in a single folder. The build script is also set to path: public/ now. Thank you.


⚠ Bofrost.at has degraded performance

In d789ac6, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 971 ms

Resolved: Bofrost.at performance has improved in 98f93e4 after 8 minutes.


看了下你的源码，原理比较简单，但是还是有不准确的情况

看了下你的源码，原理比较简单，但是还是有不准确的情况，因为你靠的就是UiHandler来实现你的目标代码是否响应了，来判断当前UI是否卡顿，表面上看是可信，只是粗略上的数据。实际上，这样做不仅多起了一个线程去Dispatch 一个消息，性能消耗了，而且不能准确的判断到底是那个函数耗时了（通过消息队列来判断，实际上有时间差，不够精准）！
我觉得ANR监测的正确姿势还是要需要做AOP，这样才能准确的监控到每一个函数的调用时间，然后做精准的定位。
目前aspectJ已经做的很好，做这个完全是一个非常方便的事情，可以慎重考虑一下~~

Sorry, I don't speak Chinese.
我不会说中文.
Sent from my Google Pixel XL using FastHub

My English is not good~~
I had saw your source code, the principle is simple and useful , but there are still not accurate enough. because you achieve your test code by Ui handler,   with your test code response to judge it whether has ANR.  it look like reliable, but it is  not accurate enoug. In the other hand, you take a thread to dispatch a message, performance is used, and using message queue has a time lag, it is not accurate enough.
I think you can use AOP, you can monitor to each function call time, and find the problem what it is.
AspectJ has been doing very well at present, you can think about it


temporary error wrapping

It seems there is a convention in Go for temporary errors:
interface {
    Temporary() bool
}

However there is no "recommended" way to know if an error is temporary (or not) if it's wrapped.
In my application, I'm using this helper function:
// IsTemporary returns true if an error is temporary, false otherwise.
// By default, an error is temporary.
func IsTemporary(err error) bool {
	var werr interface {
		Temporary() bool
	}
	ok := As(err, &werr)
	if ok {
		return werr.Temporary()
	}
	return true
}

It looks for the first error in the chain that implements the interface, and return the result of the method call
If no error implement the interface, it returns true, which means that all errors are temporary by default (which seems a good default from my point of view)

I encountered a very strange issue related to this.
In my application, I'm doing an outgoing HTTP request, which may result in a i/o timeout error.
Usually, the chain of error types is:

*net.timeoutError => always return true
net.*OpError => in this case it returns the same result as the wrapped error
*url.Error => returns the same result as the wrapped error

In *url.Error, the logic is implemented like this:
func (e *Error) Temporary() bool {
	t, ok := e.Err.(interface {
		Temporary() bool
	})
	return ok && t.Temporary()
}

So, if the wrapped error doesn't implement the interface, it returns false.
But in my application, I've got a custom "transport", which wraps the error between net.*OpError and *url.Error.
My custom error type implements the Unwrap() error interface, however it doesn't implement the Temporary() bool interface.
So, even if net.*OpError.Temporary() returns true, *url.Error.Temporary() will return false, because my custom error type doesn't implement Temporary() bool.
What is the correct way of managing temporary errors ?
Does my helper function IsTemporary() make sense ? Is it OK to consider that all errors are temporary by default ?
Personally I think that error types like *url.Error shouldn't implement Temporary() bool at all, and we should simply use errors.As()as I did  (but I guess it's too late to change it).
What should I do in my application ?

not wrap the error  between net.*OpError and *url.Error ?
implement Temporary() bool in my custom error type, in the same way as  *url.Error ? (which implies that I should do the same in all custom error types across all my projects) ?

Please see https://github.com/golang/go/wiki/Questions. Closing.

That wasn't really a question.

However there is no "recommended" way to know if an error is temporary (or not) if it's wrapped.

url.Error.Temporary() assumes that the wrapped error implements the Temporary() bool interface. (e.g. net.OpError)
However if a custom transport/round tripper wraps the error, the value returned by url.Error.Temporary() is wrong.


tsp, loadExamples

link https://github.com/Azure/autorest.java/issues/1682
currently codegen only output examples for prototype APIs (as example generation for convenience API not ready)
test with AnomalyDetector
https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cognitiveservices/AnomalyDetector

follow up issue https://github.com/Azure/autorest.java/issues/2068


Write timestamps from Javascript in a format that the Sheet can parse into a real timestamp

This will make it easier to validate and verify data flow.

This is happening in the "Confirmed Matches" sheet.

Shifting to Airtable


Text "[object Object]" found on the Learning Map

Hi I have found this on my Learning Map... Hope this can help you all in solving bugs... :)

Note: it seems to appear only on the section of lessons that I have completed.

This was fixed in #1843 and can be closed.

@ahstro after reloading the page, I still get this - has the fix not been pushed to the server yet?

It got pushed just there folks!


Fix Rails 5 deprecation warning

Getting a deprecation warning when running HireFire with Rails 5.
There might be more things to do for full Rails 5 compatibility (I haven't tried it in production yet) but this at least fixes the deprecation warning.
DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change
them to actual class references.  For example:

  "HireFire::Middleware" => HireFire::Middleware

 (called from <top (required)> at /Users/philtr/src/.../config/environment.rb:5)

Thanks! Released v0.3.12


BHI360 Sensor Support

Any chance this library could also be used for the BHI360 module by Bosch?

I don't have BHI360, this is based on BHY2_SensorAPI, so it should be possible, but I can't help

@lewisxhe I'm trying to do that, but I'm wondering, in your project are you using a GPIO extender? I see the read through spi being references to XL9555
 // Read 16-bit gpio input status
    uint16_t read()
    {
        uint16_t val = 0x0;
        readRegister(XL9555_CTRL_INP0, (uint8_t *)&val, 2);
        return val;
    }

No extensions


[OOF] Can not access Out Of Facility data of another user : Access is denied. Check credentials and try again.

Hello,
I would like to get data about Out Of Facility. So I looked at the EWS API Docs and I written the code in Java.
When I tested using my credential and by passing my email address, the code works fine and the API returns what I need, but when I have sat the email of someone else, I got an Exception with this message : Access is denied. Check credentials and try again.
I would know if is there any other way to deal with this? I checked the EWS Docs and the associated methods are used to get only data for the identified user.
Here's the code :
...
OofSettings myOOF = new OofSettings();
OofSettings myOOFSettings = service.getUserOofSettings("un.ul@comp.com");
OofExternalAudience myAllowedExternalAudience = myOOF.getAllowExternalOof();
TimeWindow myOOFDuration = myOOF.getDuration();
 System.out.println(myOOFDuration.getStartTime());
 OofExternalAudience myExternalAudience = myOOF.getExternalAudience();
 OofReply myExternalReply = myOOF.getExternalReply();
 OofReply myInternalReply = myOOF.getInternalReply();
 OofState myOofState = myOOF.getState();

And the error full trace :
Exception in thread "main" microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: Access is denied. Check credentials and try again.
	at microsoft.exchange.webservices.data.core.response.ServiceResponse.internalThrowIfNecessary(ServiceResponse.java:278)
	at microsoft.exchange.webservices.data.core.response.ServiceResponse.throwIfNecessary(ServiceResponse.java:267)
	at microsoft.exchange.webservices.data.core.request.GetUserOofSettingsRequest.execute(GetUserOofSettingsRequest.java:154)
	at microsoft.exchange.webservices.data.core.ExchangeService.getUserOofSettings(ExchangeService.java:2592)
	at com.soprahr.hrlab.tests.OutOfOffice.main(OutOfOffice.java:39)

Thanks in advance.

Hi Ali,
I am facing the same issue as well, please let me know if you found a solution for it.
Regards,
Rohit

Hello,
I found a solution to deal with this issue. But it's not an official faeture of the API.
The trick is to use mail tips to send SOAP message to the Server.
And you have to put your mail and the destination mail to get the OOF automatic response and the the period of use.
This class and the code is in attachment, the trace below demonstrate a sample call and the response :
--- exec-maven-plugin:1.2.1:exec (default-cli) @ calnd.x01.ws ---
NoErrorNoErrorphilippe.royant@soprahr.comSMTP

Bonjour,

Je ne suis actuellement pas Ã  mon poste de travail.

Je vous rÃ©pondrais Ã  mon retour, le lundi 10 aoÃ»t 2015.

Cordialement,

Philippe Royant

Hello,

I'm currently out of office. Back on Monday the 10th of August 2015.

Best Regards,

Philippe Royant

</t:Message></t:ReplyBody><t:Duration><t:StartTime>2015-07-22T14:30:00Z</t:StartTime><t:EndTime>2015-08-10T07:00:00Z</t:EndTime></t:Duration></t:OutOfOffice></m:MailTips></s:Body></s:Envelope>
BUILD SUCCESS
Good luck!
Regards,
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class OutOfOffice {
public static void main(String[] args) throws Exception {

	URL url = new URL("ewsurl");
	HttpURLConnection rc = (HttpURLConnection) url.openConnection();

	rc.setRequestMethod("POST");
	rc.setDoOutput(true);
	rc.setDoInput(true);
	rc.setRequestProperty("Content-Type", "text/xml; charset=utf-8");

	String reqStr =
		"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
		+ " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" "
		+ "xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" "
		+ "xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\"><soap:Header>"
		+ " <t:RequestServerVersion Version=\"Exchange2010\"/></soap:Header><soap:Body>"
		+ "<GetMailTips xmlns=\"http://schemas.microsoft.com/exchange/services/2006/messages\">"
		+ "<SendingAs>"
		+ "<t:EmailAddress>mail1@co.fr</t:EmailAddress>"
		+ "<t:RoutingType>SMTP</t:RoutingType></SendingAs>"
		+ "<Recipients><t:Mailbox>"
		+ "<t:EmailAddress>philippe.royant@co.fr</t:EmailAddress>"
		+ "<t:RoutingType>SMTP</t:RoutingType></t:Mailbox></Recipients>"
		+ "<MailTipsRequested>OutOfOfficeMessage</MailTipsRequested></GetMailTips>"
		+ "</soap:Body></soap:Envelope>";

	int len = reqStr.length();
	//rc.setRequestProperty("SOAPAction:", "\"document/http://someurl.com/OfflineBatchSync/Order:CreateOrderHeader\"");
	rc.setRequestProperty("Content-Length", Integer.toString(len));
	rc.setRequestProperty("Connection:", "Keep-Alive");
	rc.connect();

	OutputStreamWriter outStr = new OutputStreamWriter(rc.getOutputStream());
	outStr.write(reqStr, 0, len);
	outStr.flush();

	InputStreamReader read;

	try {
		read = new InputStreamReader(rc.getInputStream());
	} catch (Exception exception) {
		read = new InputStreamReader(rc.getErrorStream());
	}

	// read server response
	StringBuilder sb = new StringBuilder();
	int ch = read.read();
	while (ch != -1) {
		sb.append((char) ch);
		ch = read.read();
	}

	String responseTr = sb.toString();

	System.out.println(responseTr);

	//  http://blogs.msdn.com/b/devmsg/archive/2014/06/03/ews-how-to-retrieve-the-oof-out-of-facility-settings-message-using-ews-for-an-exchange-user.aspx

}

}


Request / Discussion: Select-Object with one property causes many problems for beginners and has few legitimate use cases for anyone. Can that experience be improved for beginners?

I see novices posting variations of this over and over on the internet:

I have this code: get-thing | select name but why are there @{} in my output and how do I get rid of them? Why doesn't the output equal -eq 'user1' ? Why doesn't my string split/replace work on it?

And they're too novice to understand the object pipeline well and know what it means to have an object with one property. They want the name, that looks like the way to do it, it looks like it works, but it doesn't actually do what they want.
There's lots of people tripping over this basically-useless edge-case, over and over and over on their way to learning PowerShell well.
Can we come up with a way to smooth that for beginners before they know enough to avoid it? (i.e. putting a rule in PSScriptAnalyzer would be too late to help).
It's my suspicion that selecting one thing, select-object -property OnePropertyHere , is an anti-pattern, and has so few legitimate use cases that they would have to be contrived to show what it does.
Ideas:

Selecting one thing should throw an exception "you probably don't want to do that, go read a tutorial on the object pipeline".
Selecting one thing should output a warning to the verbose stream.
Select Name should acted as if you specified -ExpandProperty Name and output a value, not an object. This would be a breaking change, but..

Then it would be useful for people who do know about the object pipeline as well, who still (I speculate) have few real uses for selecting an object with one property. Where the alternatives are currently the laborious -ExpandProperty, the convenient but ugly |% name or the awkward (  ).Name, then simply select-object -property name would do what you most likely actually want it to do. (Downside, how would you then specify if you do want an object with one property?)

There should be another cmdlet for this use case which is clearly named to show that it won't output an object, because even "select an object and expand a property so the output is not necessarily an object" is a bit awkward when you stare at it for a while. e.g. select-value or select-propertyvalue or get-objectproperty or etc.

I wonder why a beginner don't read a cmdlet description and examples.

I think changing select-object would just move the problem you are trying to address to another cmdlet. The reason why this trips novices up is that the language is object-centric. At some point a novice is going to need to learn that. They just happen to experience it with select-object first because i is a common cmdletd.

It's my suspicion that selecting one thing, select-object -property OnePropertyHere , is an anti-pattern,

It's not, really. You may have an object where only one of the properties is useful. The objects generated by this may be used as seed objects where other properties are added in the pipeline. Or you may be passing an object to a command that takes more than one of your source objects' properties as a ValueFromPipelineByPropertyName but only one is correct in the context. or you may simpley need to create a single column CSV with a header to import into an external system (Yammer takes a few single column CSV's, for example)

Selecting one thing should throw an exception "you probably don't want to do that, go read a tutorial on the object pipeline".

Definitely not for the reason mentioned above.

Selecting one thing should output a warning to the verbose stream.

I don't think this one is a good idea either.

Select Name should acted as if you specified -ExpandProperty Name

That would get confusing with a difference in operation between Select-Object Porp1 and Select-Object Prop1, Prop2.

There should be another cmdlet for this use case

I don't think it's worth adding a completely other cmdlet for this.

select an object and expand a property so the output is not necessarily an object

Where do you see that?
This is probably something that is better fixed with documentation. Perhaps adding an example of this as  common gotcha would be a good start. The Export-Csv cmdlet has an example of avoiding the mangling of objects caused by passing objects to Format-Table first. i suspect any "fix" done in Select-Object would just push that initial exposure to objects on to another cmdlet.

I can think of a number of reasons for selecting a single property that are extremely valid and don't see any reason to change the current behaviour of select-object

@RichardSiddaway I cite your own blog post where you say "One thing that seems to keep causing confusion is using Select-Object to pick off one or more properties from a set of objects", and you blog that it "keeps" causing confusion 9 years after you started blogging about PowerShell.
You don't see any reason to try and do anything to improve it?

It's not a problem that technology can fix. Its an education problem. I've seen many people jump into using PowerShell, and other technologies, and make assumptions about how they work or just don't bother to discover how they work. This is where many of the problem you cite come from.
Changing the behaviour of select-object in the way you advocate isn't going to solve those problems as you'll just be moving the problem area to another cmdlet - probably one of more of  sort-object, where-object or foreach-object

Is our docs well or we need add anything in the cmdlet help to address the Issue?

@iSazonov The docs could be improved with an example to calls out the common gotcha.

I can see adding a rule to ScriptAnalyzer, but I'm not sure the behavior should be changed.
I will say most places I see this pattern, it is not necessary.
Consistency is important here. For example, if the properties are dynamically selected, selecting one or more properties shouldn't cause weird problems downstream.

@markekraus "where do you see that?" - imagine you want to write lines of text to a plain text file, and the accepted way was to use Export-Csv but tag on the parameter -ExpandProperty to tell it not to write a CSV. Is that something you'd expect to be within Export-Csv's remit? Would you be looking there for that feature, or think that was an odd place to put it? With that comparison, would you say Select-Object with a parameter is the best place to select non-PSObject output?

I'll note that the question was really "Can that experience be improved for beginners?" instead of just "change select-object yes/no". The consideration of dynamic (wildcard) property selection is another convincing dealbreaker against that.
@lzy "I will say most places I see this pattern, it is not necessary." - most places you see ExpandProperty is not necessary, or most places you see selecting one property is not necessary?
As another idea for an approach, what if the default output formatter included a line of type information, or other type marker in the output? So when you do Get-ChildItem c:\path | select-object name and see a screen full of names, and the header scrolled off, there's still some indication that you have not-text.
StackOverflow has ~400 comments relating to '%expandproperty%' and picking some to see either code suggestions to use ExpandProperty, or people giving thanks for suggesting it, e.g.
PostId	Text
42003324	Thanks, included -expandproperty
36187162	`|Select -ExpandProperty HomeDrivePath`
44873829	`Select-Object -ExpandProperty UserName`
36658641	I always forget about `-ExpandProperty`!
45428798	`| select -ExpandProperty SAMAccountName |`
17870097	Thank-you the, -ExpandProperty Node, did it :)
42003324	or select -expandproperty to just get the value
29017197	Thank you for that. `-ExpandProperty`...who knew.
33171965	@DaveSexton `Select  -ExpandProperty Measurements`
39231089	Try `select-object -ExpandProperty DisplayVersion`
38185398	Get-AzureRmLocation | Select -ExpandProperty Location
27942669	Nice. Didn't know about expandProperty. Thanks Duncan.
33017054	Should not it be `Select-Object -ExpandProperty Index`?
33507224	I think it should be select count -ExpandProperty Count.
40345578	`Select-Object mail` ? `Select-Object -ExpandProperty mail`
6375323	You're just emulating a `select -expandproperty size` there.
38338320	try changing that last part to `select -expandproperty ipaddress`
23139592	See my edit and tell me if -ExpandProperty shows the entire value.
25261455	cheers, both options worked. I'll go and read up on -expandproperty
21394652	Alternatively you could do `Select-Object -ExpandProperty identity`.
14139818	Thanks @Kayasax, was spot on !! ( I didn't knew about ExpandProperty)
30718643	Thanks!  `Select-Object -ExpandProperty FullName`  is working for me.
39268354	Use `Select-Object -ExpandProperty` instead of `Select-Object -Property`
18145840	I used -ExpandProperty name to get exactly value named "Administratoren".
29973404	Change `select SAMAccountName` to `select -ExpandProperty SAMAccountName`
43764032	What if you change Select-Object Name to Select-Object -ExpandProperty Name
25395736	Also: `measure-command { ... } | select-object -expandproperty TotalSeconds`
29067832	Have you tried `Select -ExpandProperty Servername` instead of `Format-Table`?
40331593	Hi, try `$listoflogs = Get-EventLog -List | Select-Object -ExpandProperty Log`.
25566906	Do it work with Select-Object -ExpandProperty instead of Select-Object -Property?
33021473	Ah I thought its good for storing as well. Thank you!  -ExpandProperty works good.
17581252	Thanks @jbsmith! The `-ExpandProperty` parameter to `Select-Object` did the trick.
[etc.]

and imagining that's the forever-future as one by one, people fall into that trap and have to be helped past it.
Help.
Use -expandproperty
Thanks.
Help.
Use -expandproperty
Thanks.
Help.
Use -expandproperty
Thanks.
Help.
Use -expandproperty
Thanks.
In a world where that is not happening anymore, and Select-Object is not broken, what else could have changed to smooth over that annoyance?

What else could have changed to smooth over that annoyance?

Forced education camps, maybe? /s
I mean.. this is more about a fundamental difference between PowerShell and other languages and just about every novice (even those experienced in other languages, maybe even especially so) is going to run into this. It's like return and "leaky" functions. These are core paradigm differences about the language that can only be learned about either by actually studying the language before coding it, or through trial and error.
Documentation may help, but only if users read it. A warning would be annoying for a non-novice who knows what they're doing. PSScriptAnalyzer rule would be nice.... if a novice knew about those, they probably already know better.

@HumanEquivalentUnit - most uses of Select-Object actually - with or without -ExpandProperty, with one or more property names. But my experience could be highly skewed, so fee free to ignore if you think I'm way off. ;)

:-) Looking on StackOverflow has ~400 comments "I didn't knew about ExpandProperty" I think we must install PowerShell in "Beginner Mode" with only available Get-Help cmdlet and unlock rest cmdlets only after the beginner pass an exam for 1000 points.

@iSazonov Like a tutorial level in games.
Though, on a more serious note... Maybe if pwsh had a -Tutorial switch with a guided REPL that would maybe help.

powershell /? already show PowerShell Online Help https://aka.ms/pscore6-docs.

@iSazonov Yup. but there is a massive difference between static documentation and an interactive tutorial. There was something similar with learnpython.com and I cen't remember the name but there was one you could run right from the command line. This is more "food for thought" than a serious suggestion.

I think you should open new Issue for the good suggestion.

I mean.. this is more about a fundamental difference between PowerShell and other languages and just about every novice [..] is going to run into this.

Just about everyone, huh? Can some insightful enough change make it a ramp to run up, instead of a wall to run into?
Have you heard the meme that "Vi/Vim is impossible for novices to quit" ? Did that go away because vimtutor exists? Not to say documentation and tutors are a bad idea, but what is it that's leading people to think that the text or number they see, is exactly what they have, or to not get to -ExpandProperty during the process of typing and using, rather than having to turn to a reference?
With PSReadLine and the changes to conhost , is there any way the default output formatting could change color or style (underline?) to distinguish between when the text you see is representing PSObjects vs strings/value types ?
I don't think this is quite the right problem for documentation - it's one thing to say "I need to login, let me look for a cmdlet option relating to authentication", but if you don't know that you need just one property of an object, you won't go looking for anything like that in the documentation, and if you read past it, you won't recognise the terminology to know that was describing the solution to your problem.

I think we must install PowerShell in "Beginner Mode" with only available Get-Help cmdlet and unlock rest cmdlets only after the beginner pass an exam for 1000 points.

Are you trying to make it Oracle PowerShell now? 😆 Unlock the PowerShell 2 engine for free, PowerShell 5.1 by entering your $10k certification exam code. Cmdlets, $100/month/10 cmdlets, objects in the pipeline, $10/property, $15/method...

At what point do you propose we stop trying to make things as simple as possible for new users. Any technology has a learning curve. This is one step on the PowerShell learning curve

@HumanEquivalentUnit I will reiterate: if you make this easier on Select-Object you will just be passing the buck on to another cmdlet. This isn't about Select-Object but about a fundamental paradigm of PowerShell that needs to be learned one way or another. Select-Object is just the first place many users encounter the need to learn this paradigm. This is something that should be addressed with documentation and possibly a tutorial as any technical solution will likely lead to a slippery slope of cascading requests to make changes to the language until this paradigm is either lost or buried and the language no longer PowerShell.

@markekraus I agree it's a fundamental paradigm change, I disagree about the passing-the-buck or the panic of losing the core of the language. The point is not to hide the paradigm in select-object and pretend it doesn't exist, pushing the discovery elsewhere, so that people ignore it for longer and run into the exact same problem somewhere else. The point of any change would be to reveal the paradigm earlier, to make it so that the paradigm couldn't be ignored that long at all, to always have it visible, to have an interactive lead-in clues to the paradigm and to where to look and what to do about it, helping people learn it rather than not helping. e.g. people who convert to string post messages like why do I have @{name='file.txt'} and how do I get rid of it but people who look at the output and it looks like text, don't even know they have a problem that reading the documentation would help with.
Like, how this GitHub reply window supports MarkDown formatting, but it has WYSIWYG controls and a preview tab, but Reddit posts support MarkDown formatting, has no indication that it does, and people continually can't format code, and apologise for not knowing how.
That doesn't mean people no longer have to learn about MarkDown, or that it's too-simple, it means the interface is helpful rather than hidden. Even if you know nothing about it, you can see the buttons are there always on screen as a very big hint that it's not just a plain textbox.
@RichardSiddaway .. at the point where new users aren't suffering in ways that can be ameliorated? At the point where everyone on the planet uses PowerShell so there are no new users? When nobody on the planet has any new suggestions for possible improvements?  When there are no remaining humans with enough interest to discuss any ideas? Why would you assume the time to stop is "roughly now" instead of "in twenty or fifty years"?

I wonder if would be useful to have a mechanism that displays tips for interactive users kind of like PSSA supplies tips for scripters.  Well, except that interactive use analysis would be forgiving of using aliases and other wrist-saving techniques.
Perhaps this is something that could be prototyped as a PSReadline function and bound to a keyboard shortcut.  Press Ctrl+i to invoke a function that analyzes the current command and provides tips.  That could be interesting.

Interactive suggestions are easy to extend in the console host - start here

@HumanEquivalentUnit

The point of any change would be to reveal the paradigm earlier, to make it so that the paradigm couldn't be ignored that long at all,

And you and I are not disagreeing there. But the question is how? Because, changing select-object is pretty much a waste of effort, because (as I am repeating myself) it will just move the problem elsewhere not address the root cause. But you mocked our attempts at an interactive solution. So, what is your solution, if any, when a change to select-object is off the table?

@HumanEquivalentUnit
It sounds like this issue thread is an extension of these:

Why does Export-CSV return System.Object in my spreadsheets?
Why does using Export-CSV after Format-Table in a pipeline mess all the output up?
Why doesn't get-process | select 'CPU(s)' show anything?
How come "Found process: $Process" outputs Found process: System.Diagnostics.Process ((sd-pam)) ???
What's the point of Get-Member? Properties and Methods? Wha?
What is measure actually counting?
What is the pipeline even doing in PowerShell?

In the end, absolutely all of these questions are about objects and how they are being handled in PowerShell, and how it is not just text output manipulation. You can't answer any of these without bringing the object into play in an explanation. Even a String is an object in PowerShell! As has been explained in this thread, the issue is in understanding objects. Look at the cmdlet name of Select-Object -- it has Object in the name!
You've also rephrased your question for the most part when you said:

If the type matters and you need to know it - can it be made visible?

Get-Member would need to be used. PowerShell gives the best default output it can based on what it believes needs to be presented as value. "If...you need to know it" is a relative/subjective statement in this case. Select-Object isn't the problem of what you see on StackOverflow, it is often part of the solution in their use cases by helping them drill down into the values they are looking for in that specific situation. Those specific objects, perhaps, could be debated on how the default formatted output is shown?
Running help about_Format.ps1xml will explain a lot about how default formatting to the console is happening as it is, and how it can be customized.
Get-Process default console output throws many people off when first starting out with PowerShell. It's not Select-Object that needs to be fixed right?
If the issue has to do with nested objects and how they are displayed, the reason they are displayed as they are is based on default values that should be shown -- not the type. An quick example that may not look complex at first is simply:
PS > $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.0.0-beta.9
PSEdition                      Core
GitCommitId                    v6.0.0-beta.9
OS                             Linux 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Which is just a hashtable of multiple objects that differ when it comes to object types. We see summarized values. PSCompatibleVersions is a list of System.Version object types, displayed in a summarized/truncated fashion. The objects themselves look entirely different in output when called directly:
PS > $PSVersionTable.PSCompatibleVersions

Major  Minor  Build  Revision
-----  -----  -----  --------
1      0      -1     -1
2      0      -1     -1
3      0      -1     -1
4      0      -1     -1
5      0      -1     -1
5      1      10032  0
6      0      0      -1

Even in this case, the console is showing a reduced list of properties:
PS > $PSVersionTable.PSCompatibleVersions | select -First 1

Major  Minor  Build  Revision
-----  -----  -----  --------
1      0      -1     -1

PS > $PSVersionTable.PSCompatibleVersions | select -First 1 | Get-Member                                                                                TypeName: System.Version
Name          MemberType Definition
----          ---------- ----------
Clone         Method     System.Object Clone(), System.Object ICloneable.Clone()
CompareTo     Method     int CompareTo(System.Object version), int CompareTo(version value), int IComparable.CompareTo(System.Object obj), int IComparable[version].CompareTo(version other)
Equals        Method     bool Equals(System.Object obj), bool Equals(version obj), bool IEquatable[version].Equals(version other)
GetHashCode   Method     int GetHashCode()
GetType       Method     type GetType()
ToString      Method     string ToString(), string ToString(int fieldCount)
Build         Property   int Build {get;}
Major         Property   int Major {get;}
MajorRevision Property   int16 MajorRevision {get;}
Minor         Property   int Minor {get;}
MinorRevision Property   int16 MinorRevision {get;}
Revision      Property   int Revision {get;}

PS > $PSVersionTable.PSCompatibleVersions | select -First 1 | select *

Major         : 1
Minor         : 0
Build         : -1
Revision      : -1
MajorRevision : -1
MinorRevision : -1

The solution to "wait, there's more, I'm not just a string, int32, or double and I even have properties that don't output to console by default..." would be learning the value of Get-Member to learn more. $PSVersionTable is a mixed bag of stuff when it comes to types:
$PSVersionTable.values | get-member | select TypeName -Unique

TypeName
--------
System.Management.Automation.SemanticVersion
System.String
System.Version[]
System.Version

There are video courses, technical books, docs/learning-powershell in this same repository, interactive free on-demand virtual labs, and other places that explain (how objects work in) PowerShell.
The Monad Manifesto explains the reasoning behind why PowerShell isn't just another shell with a text manipulation pipeline.
@markekraus If there were a hypothetical interactive tutorial for the local console, wouldn't it be better for someone to make a PowerShell Module as opposed to a modification/add to PowerShell itself as a feature? Otherwise, you just pushed a tutorial to systems where people aren't even going to need it. Update-Help exists to avoid carrying the help documentation everywhere by default, too, and makes it so that PowerShell itself doesn't need to update when help documentation is updated for a single module.
Should this issue be closed?

If there were a hypothetical interactive tutorial for the local console, wouldn't it be better for someone to make a PowerShell Module as opposed to a modification/add to PowerShell itself as a feature?

That is where I would start, but, there is some merit in it being a native part of the system. The problem is that someone new to the language who just runs pwsh in their console for the first time probably has no clue what modules are or how to install them (and even as a veteran user, I have to say that PowerShellGallery is not the most user friendly tool once you know about it). They have several hurdles of knowledge and acclamation to jump first. If the underlying goal of @HumanEquivalentUnit's request was to make this easier for the novie user, then including an interactive tutorial with PowerShell and not apart from it makes perfect sense.
The part about the tutorial being forced was only a jest. @iSazonov recently had #5275 merged which adds a small banner on how to get help. That banner could just be expanded slightly to include something like or 'Start-Tuorial' for an interactive tutorial. The interactive tutorial could very well be a separate module and only loaded when called. It could even be just a stub that begins by walking the user through installing the actual module from the the gallery, that way the initial footprint could be small.
In any case, this is all just brain storming.

Should this issue be closed?
I have changed the label to be a discussion. I'll leave this open for a few more days to see if there is any more feed back and then close it. The consensus appears to be that select-object shouldn't be changed, but the discussion as started to hit at solutions for the root cause.

@markekraus Okay, cool. That makes sense.
I noticed the new small banner for help, which looks great. Reminds me of ipython's initial banner:
Python 3.6.2 (default, Sep 10 2017, 19:48:49)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]:

I like the idea of it being a stub for installing the tutorial, perhaps walking the user through basic commands and diving into them as objects via the pipeline. The idea sort of reminds me of the Start-Demo module, if perhaps there was a default demo maybe. I haven't tested that module out in a good while, but it may be a starting point?

I like the idea of Start-Tutorial (perhaps a community driven module...), although not keen on having it in the core package.  Would prefer we add the feature https://github.com/PowerShell/PowerShell/issues/5523 so perhaps the first time they run pwsh, we can suggest they try Start-Tutorial if this is their first time.

We should probably note somewhere (select-object docs?) that if you just want to get the value of a single property, you should do
ls | foreach name
instead of
ls | select name

@BrucePay you should probably submit a PR to fix Select-Object doc which is where people might see this

Could we get new built-in commandlets to make this easy?
Select-PropertyExpanded which would work the same as Select-Object -ExpandProperty except the default parameter would be -ExpandProperty and the Property member wouldn't exist?
With a nice alias of expandprop?
So we can just say ls | expandprop Name


Fixes for following formats: vtk, medit, med

VTK

saving call data was not correctly implemented, tags CELL_DATA and FIELD FieldData should be in VTK file only once
limit to FeildData dimension has no reasons

MEDIT

"medit:ref" for cells must be a list of arrays containing group ids

MED

FAS object  can be located in the mesh object, not only in the root

The fix for vtk should solve #643.

Oh, I thought the bug #643 was in reading MSH 2.2 rather than the subsequent write to VTK.

Yes, I see, there is another issue. In the MSH input file in #643, the points are not numbered in a continuous range.


Explicitly type the CloseEvent passed to WebSocket.onclose event handler

This aligns the externs with the current WebIDL
https://html.spec.whatwg.org/multipage/web-sockets.html#the-closeevent-interface

Created internal issue http://b/128352373

Thanks!


Version 1.9.1 not available on npm anymore?

Our travis builds started failing because npm cannot install<EMAIL_ADDRESS>anymore since a couple of hours ago.
Since 1.9.1 was published more than 24 hours ago, unpublishing it from npm would have required an action taken by npm. I'm not sure 1.9.1 was really unpublished but it's impossible for me or for travis to install it:
$ npm show gulp-sourcemaps versions | grep 1.9
  '1.9.0',
  '1.9.2',

Do you happen to know why this happened?

1.9.1 has been unpublished use 1.9.2

I'll try and republish it, it's a buggy release. But I should have left it on npm.

👍  Thanks!
We'll upgrade to 1.9.2 when we get the chance to review the changelog.

I'll have to contact an admin at npm directly. I cant repub 1.9.1 or 2.2.1 see http://blog.npmjs.org/post/77758351673/no-more-npm-publish-f

I contacted them and I am waiting.

I'm curious, how was this unpublished? Based on npm's stated policy I didn't think unpublishing a module after 24 hours was possible.

That is a question for npm.

We are looking into how this was possible. We have a support ticket from @nmccready and will reply there.

Npm put it back


Implement wNAF-based MSM derived from Gemini

Description

closes: #450

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

[ ] Targeted PR against correct branch (master)
[ ] Linked to GitHub issue with discussion and accepted design OR have an explanation in the PR that describes this work.
[ ] Wrote unit tests
[ ] Updated relevant documentation in the code
[ ] Added a relevant changelog entry to the Pending section in CHANGELOG.md
[ ] Re-reviewed Files changed in the GitHub PR explorer

Hm this is giving an incorrect result. Any ideas @mmaker?

Hey! Thank you so much for bringing this into algebra. I'm unlikely to help review and fix this properly before the 20th December. Skimming though it, I didn't find any blatant error --   In Gemini this was still giving the same result  last time I tried?

No worries! I think I've fixed the bug; I had updated how buckets are accessed when the digit was negative, and had done so incorrectly. It's fixed now, I believe.


Migrate from HTTP to HTTPS

Using HTTPS gives users a secure experience, but also allows interactives to use the user's microphone and webcam.

Probably can get a free SSL cert from https://letsencrypt.org/ - Would need some config on the web host.

This can be easily enforced (with redirection) in the upcoming Django system.

Completed in 0660b19


[CARBONDATA-3881] Fix concurrent main table compaction and SI load issue

Why is this PR needed?
Consider a scenario, where segmentX has loaded to main table but failed to load to SI table. So, while loading another segmentY, we reload failed SI segmentX. this time if the segmentX is compacted in main table and clean files executed on it. SI load will fail and segment id will not be found in segmentMap of SI and it throws exception.
What changes were proposed in this PR?
just before reloading the failed SI segment. check if it is valid segment in main table.
Does this PR introduce any user interface change?

No

Is any new testcase added?

No

Build Success with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.3/3226/

Build Success with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbon_PR_Builder_2.4.5/1498/

@akashrn5 : please check

retest this please

Build Success with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.3/3290/

Build Success with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbon_PR_Builder_2.4.5/1553/

LGTM

@ajantha-bhat You have 2 more PR related to compationa and SI. Please make them under a unified PR.

If other 2 you mean,
3829 - just main table (segment lock) load and compaction concurrent issue
3810 - SI missing and wrong table status locks
And this PR is nothing to do with locks, it is a functional problem. so, I separated it out for better maintenance.

All are similar issues(concurrent scenarios), so better the fix should also be in one PR for easy identification and maintenance.

yeah, better to combine all to one, because all are found in concurrent executions with SI, so In PR description you can list the issue for better understanding and maintainannce

@kunal642 , @akashrn5 : combined all 3 in #3810


Post handshake messages break s2n_recv

Problem:
When a post handshake message is received on an established connection, poll() will alert an application that data is available to read. s2n_recv will attempt to read data, and block in s2n_read_full_record if there are no follow up records. This affects the way integration tests send data through s2nc.
We should also think about how we handle post handshake messages in general. Right now the story is we wait for the customer to call s2n_recv(). That will be the only time we know a handshake record is waiting to be read.
Solution:
Read one handshake record at a time
After reading a non APPLICATION_DATA record, we could return 0 bytes read from s2n_recv. Today, 0 bytes read indicates a "peer closed connection". This condition should actually return -1, and set the S2N_ERR_T_CLOSED type.
Pro

Does not affect large pieces of the code, or add significant changes to code paths
Returns more descriptive errors

Con

May be less efficient when still negotiating the handshake
Changes the meaning of API return codes.

Add an s2n_poll function
S2N_RESULT s2n_poll(struct s2n_connection *conn, struct pollfd *fds, nfds_t nfds, int timeout);
This function would accept an S2N connection, and an additional list of file descriptors to poll. The s2n_connection would be added to the list, and poll() would be called. This would allow s2n to determine if there is actually data available for s2n_recv to read.
Pro

Does not change existing APIs
Give user more control

Con

s2n_poll would have to decrypt data, analyze it, and make APPLICATION_DATA available to s2n_recv. This is a pretty large change with unknown performance implications.

New function s2n_recv2()
Would be recommended for TLS13, but works the same regardless of protocol version.
Pro

Existing customers are not impacted.
Could return -1 with S2N_ERR_T_CLOSED when a peer has closed the connection
Could return 0 when post handshake message is received, because there is no application data, so this would be treated as a 0 sized read.

Con

Customer would have to migrate to this new function.

Requirements / Acceptance Criteria:

s2n_recv can't block on post-handshake messages.
existing customer applications can not break with the fix.

Out of scope:
Is there anything the solution will intentionally NOT address?

How about returning -1 from s2n_recv with S2N_ERR_IO_BLOCKED and S2N_BLOCKED_READ for non-blocking mode and for blocking mode just keep reading until we get the application data? The only downside I can see is that in non-blocking mode s2n_recv might return that it is blocked when fd-poll notified about new data on the socket, but it is no different from receiving a partial record today.

How about returning -1 from s2n_recv with S2N_ERR_IO_BLOCKED and S2N_BLOCKED_READ for non-blocking mode and for blocking mode just keep reading until we get the application data? The only downside I can see is that in non-blocking mode s2n_recv might return that it is blocked when fd-poll notified about new data on the socket, but it is no different from receiving a partial record today.

This could be a good work around. With proper documentation, we could alert customers to this behavior.

Sample test case - s2nc should be able to send application data to server without waiting for server to send application data.
Server: openssl s_server -accept localhost:8029 -debug -tlsextdebug -state -cert ../pems/rsa_1024_sha256_client_cert.pem -key ../pems/rsa_1024_sha256_client_key.pem

Client: S2N_INTEG_TEST=1 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib/ ./bin/s2nc -e -T --insecure -c test_all localhost 8029 --tls13

How about returning -1 from s2n_recv with S2N_ERR_IO_BLOCKED and S2N_BLOCKED_READ for non-blocking mode and for blocking mode just keep reading until we get the application data? The only downside I can see is that in non-blocking mode s2n_recv might return that it is blocked when fd-poll notified about new data on the socket, but it is no different from receiving a partial record today.

This could be a good work around. With proper documentation, we could alert customers to this behavior.

@zz85 pointed to one drawback - if app uses a blocking mode, but still uses some polling mechanism where it does s2n_recv whenever socket is read-ready, the app might deadlock if it is expected to write first before peer sends any data. In this case the post handshake messages may trigger s2n_recv through poll mechanism, before app has done any s2n_send, so s2n_recv will never complete as peer won't send any application data until our app writes first, which will never happen as the app is stuck in s2n_recv.

To work around the s2nc client bug, this recommendation from the "[TLS] TLS 1.3 and TCP interactions" email to ietf tls mailing list could also be used.

Recommendation: We switched to deferring NewSessionTicket to the first application write by default. Server callers which wish to flush them earlier may, but they should not block normal I/O on it. TLS implementations which can drive transport I/O themselves may be able to instead write them in the background after the handshake. Note, however, the discussion on “Client-write-only protocols” below.

Separately, in case the server does not do this, TLS 1.3 client implementations should eagerly read from the socket after the handshake, even if the caller isn’t expecting application data. However, this is only possible at a layer which can drive I/O itself. We implement this in Chromium’s abstractions over BoringSSL, but cannot do so in BoringSSL itself.

Likewise, while they are unlikely to exceed the transport buffer, TLS libraries should defer KeyUpdate acknowledgements to the next application write, possible from the KeyUpdate tweaks made early on.

Link to [TLS] TLS 1.3 and TCP interactions thread<EMAIL_ADDRESS>1.3 and TCP interactions

After reading a non APPLICATION_DATA record, we could return 0 bytes read from s2n_recv. Today, 0 bytes read indicates a "peer closed connection". This condition should actually return -1, and set the S2N_ERR_T_CLOSED type.

Apart from this breaking the API and being non compatible with posix APIs anymore, how does this compare to just internally calling receive again to try to read the next fragment.

In blocking mode you would just continue to read and actually return if you have application data
in nonblocking mode you get EAGAIN which you can return to the application (which seems the same as what @xonatius mentions)

Add an s2n_poll function
S2N_RESULT s2n_poll(struct s2n_connection *conn, struct pollfd *fds, nfds_t nfds, int timeout);
This function would accept an S2N connection, and an additional list of file descriptors to poll. The s2n_connection would be added to the list, and poll() would be called. This would allow s2n to determine if there is actually data available for s2n_recv to read.

Please keep application integration scenarios in mind. Applications already have fds registered on select/poll/epoll and do this polling. You can't register the fd to another selector instance.
I think in the we might want something like this, but it seems like more of a complete API revamp in order to decouple socket IO from application IO.
E.g. you could replace the current read/write APIs with:

bool s2n_want_read(connection)
bool s2n_want_write(connection)
s2n_process_io(connection, read_buffer, write_buffer) where read_buffer and write_buffer are now filled by the application after poll calls.
usize_t s2n_nr_received_bytes(connection)
s2n_read_decoded_data(connection, target_buffer)
s2n_enqueue_data_to_send(connection, source_buffer)

In this case the scenario you are looking at would lead to

the socket showing read readiness
the application reading data and feeing it to s2n_process_io
s2n not notifying the application about new received data (via s2n_nr_received_bytes) which causes the application going back to 1)

Such an API might also help applications to implement buffered readers/writers and to use completion based IO on the backend (IOCP, io_uring).
The poll API which lets s2n do even more socket jobs seems to be exactly the opposite direction.

New function s2n_recv2()
Would be recommended for TLS13, but works the same regardless of protocol version.
Pro
Could return 0 when post handshake message is received, because there is no application data, so this would be treated as a 0 sized read.

How would this help users of blocking IO? If they want to block until data is available, they would just call s2n_recv2() again - which seems to make this equivalent to the old API?


python311Packages.google-cloud-appengine-logging: 1.3.1 -> 1.3.2

Changelog: https://github.com/googleapis/python-appengine-logging/blob/v1.3.2/CHANGELOG.md
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 258737 run on x86_64-linux 1

12 packages built:

python310Packages.google-cloud-appengine-logging
python310Packages.google-cloud-appengine-logging.dist
python310Packages.google-cloud-error-reporting
python310Packages.google-cloud-error-reporting.dist
python310Packages.google-cloud-logging
python310Packages.google-cloud-logging.dist
python311Packages.google-cloud-appengine-logging
python311Packages.google-cloud-appengine-logging.dist
python311Packages.google-cloud-error-reporting
python311Packages.google-cloud-error-reporting.dist
python311Packages.google-cloud-logging
python311Packages.google-cloud-logging.dist


Add Exam Inventory Filter - Returned Exams

During testing of the exam inventory table, it was found that the table required filters for exams that have been returned and exams that haven't been returned.Using infrastructure previously developed for filters that already exist, exams were filtered based on whether or not exam_returned_ind was 1 or 0 for the exams present in the table.

Hold on approval, as this will need to be targeted to a sprint-8 branch when it's created.


Disable disconnecting that would damage relations

Disconnecting 'from' and 'to' members from the 'via' point or way in the same turn restriction should be prevented. Also, 'via' and 'via' from the same relation shouldn't be disconnected (there is not a lot of turn restrictions with more 'via' ways, but it's possible).
This issue is closely related to #1512

From duplicate:

The "Disconnect" operation should be disabled for vertices that connect two member ways of a multipolygon. Disconnecting such ways produces an invalid multipolygon.

I work a lot with MP. This breaks the workflow! Instead of disallowing the disconnection, why hasn't there been inserted some sort of simple warning before saving?


fix: Set toolbar direction based on toolbar language

Description
@sakhawy
This PR sets the toolbar text direction based on the toolbar language and not based on the document language.
This needs a "polyfill" to work with Chrome before 120 which is added at least in a basic version.
Related resources

#...
#...

Checklist

[ ] I have opened this pull request against develop-4
[ ] I have added or modified the tests when changing logic
[ ] I have followed the conventional commits guidelines to add meaningful information into the changelog
[ ] I have read the contribution guidelines  and I have joined #workgroup-pr-review on Slack to find a “pr review buddy” who is going to review my pull request.

The patch is minimal, though. We might find places with weird layout. I'll try to add a few more lines later.

Alright, I'll do some manual tests later!

@sakhawy So, the polyfill should be complete ;-)

Once, we have this merged, I'll chery-pick it into #7901

@sakhawy Can you give this a final check, so we can merge it. I would love to backport it to 3.11 and include it in 3.11.6 which I am about to release...

Well spotted, thank you!

@sakhawy Fixed both resize cursor and missing polyfill patch. If you're good to go, let me know by approving the PR :-)