ExperimentalWarning: The fs.promises API is experimental

Environment details

OS: macOS High Sierra
Node.js version: 10.1.0
npm version: 5.6.0
@google-cloud/logging-winston version: 0.9.0

Steps to reproduce
import { LoggingWinston } from'@google-cloud/logging-winston'
I receive the console error
(node:27103) ExperimentalWarning: The fs.promises API is experimental
which is unfortunate because I'm redirecting the console to the logger and always get this error in Stackdriver as well

Hi @kriskate! Thanks for the bug report. Given that you're using ES6 modules can you also provide details on how you are using them? E.g. are you using babel or TypeScript, and if so, what versions.
Secondly can you run with the Node.js --trace-warnings flag so that we can see the stack trace leading to the warning? node --trace-warnings index.js.

Hey, thanks for the prompt response.
requiring the modules has the same result
let LoggingWinston = require('@google-cloud/logging-winston')
(node:33405) ExperimentalWarning: The fs.promises API is experimental
    at Object.get [as promises] (fs.js:84:15)
    at __importStar (~/node_modules/google-auth-library/build/src/auth/googleauth.js:58:96)
    at Object.<anonymous> (~/node_modules/google-auth-library/build/src/auth/googleauth.js:65:10)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)

Thanks! I believe this is an issue in the google-auth-library module so I am going to move the issue there.

This issue was moved to google/google-auth-library-nodejs#392


我是第一个star你的

I agree with you, and deeply believe Atomic-style is the future of CSS.

Thank you

Thank you

Great work!


Way to turn off automatically running queries in promises

One of my favorite features of ReQL is the ability to modify a query and then pass it along to another query.
query = r.table('table');
query = query.count();

This is really nice when you want to append something to a query.
query = r.table('table');
if (something) query = query.fields({ something: false });

Then problem with rethinkdbdash is that you can't do this with promises because when you return a query it automatically runs itself (See code).
q()
.then(function () {
  return r.table();
})
.then(function (query) { // Imagining this returns the query and not the results of the query
 return query.filter({ something: 'something' });
});

Although I understand the reason for this feature and think it's cool, is there a way in which something can be implemented for this feature to be turned off? To get a bit more context, is this by design or just an unintended consequence of the convenience provided by modifying these methods? If this sounds like a terrible suggestion, it can be completely ignored :).
Currently, I forked it and just commented out those lines.

I think this is just an (unintended?) side-effect of the 1.16.0 release which made r.table(...).then(...) an alias to r.table(...).run().then(...). I think this is going to be tricky to fix since bluebird tries to treat any object with a then method as if it were a promise (see implementation).

This is an intended behavior. For 1.16 I just wrote examples using generators because it was more shiny, but the idea is the same for with normal promises.
While it's true that you can "fork" queries in rethinkdbdash and in the official driver, you can't really fork them in promises. For example you can use query here just one if you tackle a then at the end.
var p = promise.then(function(result) {
    var query = buildQuery(result) // the query depends on the result
    return query;
})

If you do p.then, the fullfilled handler will be called with result, not query.
If you don't plan on forking the query, then there is no reason to not merge the two fullfilled handler.
On a side note, if you really want to remove this functionality, you can do
var r = require('rethinkdbdash')();
r._Term.prototype.then = undefined;

But to me it sounds like something is wrong in your code if you absolutely need it, or maybe I'm missing a use case?

@neumino @marshall007 Thanks for responding. I mostly just interested to see in how other people do this and how others go about it.
I'll go ahead and close the issue, since it seems like this is not an unintended consequence and more of a deliberate (perhaps opinionated :)) decision.
@neumino I don't really get what you mean by this:

If you don't plan on forking the query, then there is no reason to not merge the two fulfilled handler.

From what I'm understanding, you're suggesting I turn this:
q()
.then(function () {
  return r.table();
})
.then(function (query) { // This has no asynchronous operations, but it could easily have some!
  if (Math.random() > 0.5) {
    return query.filter({ something: 'something' });
  }
  return query;
});

Into:
q()
.then(function () {
  var query = r.table();
  if (Math.random() > 0.5) {
    query = query.filter({ something: 'something' });
  }
});

If that's the case, that's a valid suggestion but I really like the elegance of being able to create different handlers for different parts of a dynamically generate query. When there are 3-4 possible parts of a query that can be dynamically generated, separating them into different handlers make it easier to read and understand what's going on. This also makes creating dynamic queries based on asynchronous operations easier. All that being said, this is mostly personal taste.
For the time being, I'll just stick to a combination r._Term.prototype.then = undefined;, my fork, or the original RethinkDB driver.
@neumino Thanks for the awesome driver!


Not able to connect to remote server using socket.h cpp library by Dart FFI

Steps to Reproduce

Create a .so library from this function
https://www.tutorialspoint.com/unix_sockets/socket_client_example.htm

Link the .so library in flutter using FFI

Run the application.

The application returns ERRNO 4 (System Interrupt)
I am trying to achieve this in linux based (ubuntu) virtualbox setup.
Expected results:
The socket getting connected to remote server and able to read and write to the buffer.
Actual results:
The application hangs for a while and then returns ERRNO 4.

Code sample
static bool initialize() {
nativeApiLib =(DynamicLibrary.open('connect.so')); // android and linux
final _main = nativeApiLib.lookup<NativeFunction<Int32 Function()>>('main');
main = _main.asFunction<int Function()>();
return true;
}
static late DynamicLibrary nativeApiLib;
static late Function main;
}

Logs

[✓] Flutter (Channel stable, 3.0.2, on Ubuntu 22.04.1 LTS 5.15.0-47-generic, locale en_IN)
    • Flutter version 3.0.2 at /home/ms/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision cd41fdd495 (3 months ago), 2022-06-08 09:52:13 -0700
    • Engine revision f15f824b57
    • Dart version 2.17.3
    • DevTools version 2.12.2

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed
      instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop
    • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    • cmake version 3.10.2
    • ninja version 1.8.2
    • pkg-config version 0.29.1

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed
      instructions).

[✓] VS Code
    • VS Code at /snap/code/current
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (1 available)
    • Linux (desktop) • linux • linux-x64 • Ubuntu 22.04.1 LTS 5.15.0-47-generic

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 3 categories

We would need more information to diagnose your problem.

What is the C code you're using? In the tutorial main has a different signature than in your Dart code.
On which platforms does it fail? both Linux and Android?
Did you try the same in Dart standalone? In Dart standalone you can catch the native error in the debugger by using gdb --args path/to/dart path/to/dart_file.dart.

Hi @dcharkes
Thanks for the response.

The arguments can be ignored. We cannot expose out library code that is the reason I have pasted the tutorial link. The arguments are server fqdn and port.
It failed on linux. I did not check on android.
Let me check and get back.

Hi,
This is resolved. It seems to be an issue in our library on one of the operation we performed for adding socket timeout.


Clean code

Hi,
can you use angular array annotation like
someModule.controller('MyController', ['$scope', 'greeter', function($scope, greeter) {
  // ...
}]);

and use like jshint (easy with grunt task) to correct missing semicolon, double quotes etc ?
I just spent 30min to fix the script in a fork (I can't PR because there is code you don't want).
Thanks

The gulp task now lints and runs ng-min to minify code with the bracket notation


[@azure/monitor-opentelemetry] - Requests with status code 304 are shown as failed in application insights

Package Name: @azure/monitor-opentelemetry
Package Version: 1.4.0
Operating system:
[ ] nodejs

version: 18.16.0

[ ] browser

name/version: macOS

[ ] typescript

version: 5.4.5

Describe the bug
Currently some requests are treated and shown as errors, e.g. 304 which is a redirect / cache-hit. The majority of the errors that we get are 304 requests. Moreover, we don't get any information about these requests in application insights (in the first screenshot below you can see how the the dashboard looks like when the 304 is clicked to reveal more information about the errors). Also, these requests are not shown as errors in transaction search, and when they are filtered (ex. by response code), they do not show in the failed requests graph anymore.
To Reproduce
Our setup is similar to this example:
import { AzureMonitorOpenTelemetryOptions, useAzureMonitor } from '@azure/monitor-opentelemetry';
import { metrics, trace } from '@opentelemetry/api';
import { registerInstrumentations } from '@opentelemetry/instrumentation';
import { ExpressInstrumentation } from '@opentelemetry/instrumentation-express';
import { HttpInstrumentationConfig } from '@opentelemetry/instrumentation-http';
import { MongoDBInstrumentationConfig } from '@opentelemetry/instrumentation-mongodb';
import { Resource } from '@opentelemetry/resources';
import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions';
import { IncomingMessage } from 'http';
import { env } from '../env';

const httpInstrumentationConfig: HttpInstrumentationConfig = {
  enabled: true,
  ignoreIncomingRequestHook: (request: IncomingMessage) => {
    // Ignore OPTIONS incoming requests
    if (request.method === 'OPTIONS') {
      return true;
    }
    return false;
  },
};

const mongoInstrumentationConfig: MongoDBInstrumentationConfig = {
  enabled: true,
  enhancedDatabaseReporting: true,
};

export const initializeTelemetry = () => {
  const customResource = Resource.EMPTY;
  customResource.attributes[SEMRESATTRS_SERVICE_NAME] = 'Backend';

  const options: AzureMonitorOpenTelemetryOptions = {
    resource: customResource,
    azureMonitorExporterOptions: {
      connectionString: env.APPLICATION_INSIGHTS_CONNECTION_STRING,
    },
    instrumentationOptions: {
      http: httpInstrumentationConfig,
      mongoDb: mongoInstrumentationConfig,
    },
  };

  useAzureMonitor(options);
  addOpenTelemetryInstrumentation();
};

/**
 * Add additional OpenTelemetry instrumentation that is not bundled with Azure OpenTelemetry Distro
 */
const addOpenTelemetryInstrumentation = () => {
  const instrumentations = [new ExpressInstrumentation()];
  registerInstrumentations({
    tracerProvider: trace.getTracerProvider(),
    meterProvider: metrics.getMeterProvider(),
    instrumentations: instrumentations,
  });
};

Expected behavior
The requests with status code 304 are not shown as errors in application insights.
Screenshots

Additional context
We played around a bit and tried to set custom attributes to the http requests using a SpanEnrichingProcessor but it seems that no  custom attributes could be added to these failed requests.

@despgiat I'm not able to reproduce this situation of 304 status codes being shown as errors. Requests marked as response code 304 are being shown as I expect in the transaction blade when using your example code with an express server that returns a 304 response.
Can you provide more information on where these 304 response codes are being returned from or more details for reproducing your scenario? Thanks!

@JacksonWeber Guess I can chime in here. You can use this repo for repro. It was initially used for a different problem with application insights js sdk/azure otel distro, but has the same issue with 304's showing up under failures. You can find detailed steps for reproducing the scenario in the readme. For the setup - personally I used two ai resources (web client/api) in same workspace, however a shared one also works.

@p-hlp Thank you for doing this work to repro. I'll recreate this scenario and work on debug as soon as I can.

@JacksonWeber Are there any updates by chance? It's a bit of an annoying problem. Otherwise anything I could do on my side to support with getting this going?

@p-hlp Apologies I haven't had much time to look into this earlier. Investigating this afternoon and I'll provide an update ASAP.


Boost imported targets

Need to emulate imported-style version of boost libraries:
find_package(Boost CONFIG REQUIRED)
target_link_libraries(... Boost::boost)

Implementation notes:

Add BoostConfig.cmake/BoostTargets-*.cmake generation to url_sha1_boost_*.cmake.in build schemes
Parent component (Boost/hunter.cmake) is responsible for installing BoostConfig.cmake with header-only imported library Boost::boost and for including BoostTargets-*.cmake
Other components (Boost//hunter.cmake) is responsible for installing corresponding BoostTargets-*.cmake
In installed BoostConfig.cmake module use regular find_package(Boost MODULE) to locate installed libraries (or patch existing FindBoost.cmake -> BoostConfig*.cmake?)

Needed for first version of: https://github.com/ruslo/hunter/issues/74

Fixed in branch develop: https://github.com/ruslo/hunter/commit/80f057704b68aed3931ef8a30f055273c553f62e


CI test does not work as expected

There are two issues:

After @jainr 's PR, the CI code in main branch will not run
For forked repository, the test will only run once and won't run after further changes (reported by @windoze )
more comments below by other folks

My case is you need to unlabel and relabel the PR as "safe to test" to trigger the right action. And it will trigger a normal GitHub action (no secret) after further changes, which causes some fail records in PR.

https://github.com/linkedin/feathr/pull/239


[WIP] Format Sass stylesheets using Prettier

The release of stylelint@15 deprecated all stylistic rules
This PR includes a PR branch update to stylelint-config-gds

https://github.com/alphagov/stylelint-config-gds/pull/32

We now use:

Stylelint to check for stylesheet style issues
Prettier to check for stylesheet formatting issues

Deprecated stylistic rules
Stylelint now recommends Prettier for formatting in their Migrating to 15.0.0 guide

We've deprecated 76 of the rules that enforce stylistic conventions, e.g. indentation.
When we created these rules, pretty printers (like Prettier) didn't exist. They now offer a better way to consistently format code, especially whitespace. Linters and pretty printers are complementary tools that work together to help you write consistent and error-free code.

Seems to look good, but I'll highlight some not-too-pretty examples:
https://github.com/alphagov/govuk-frontend/pull/3799/files#diff-e9de60885fa511018982360bd5f64b5c55a56363d5653e65a6432cc3a6beef33R76
@include govuk-responsive-margin(
  6,
  "bottom",
  $adjustment: $button-shadow-size
); // s2
padding: (govuk-spacing(2) - $govuk-border-width-form-element)
  govuk-spacing(2)
  (
    govuk-spacing(2) - $govuk-border-width-form-element -
      ($button-shadow-size / 2)
  ); // s1

https://github.com/alphagov/govuk-frontend/pull/3799/files#diff-09fe9243587018027ad713666b9b6c114728a2ea2a227ea9265ce482dbfbb9adR35
.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(
    .govuk-fieldset__legend--l
  ):not(.govuk-fieldset__legend--xl)
  + .govuk-hint {
  margin-bottom: govuk-spacing(2);
}

On my side, pretty happy with a move to Prettier for the formatting, especially as we can format pre-commit. Would be keen to use it for formatting JS as well, and possibly Nunjucks so we’re consistent all across. I think the gain from not having to think about formatting anymore outweighs the couple of places where a manual formatting may yield something a little less surprising or preserve some alignment.
A wider line width doesn't sound bad either, especially with selectors that can quickly get quite long so it sounds fine to bump it up.

+1 for having Prettier deal with JS and Sass formatting automagically.
Having tried using it for Nunjucks however, there seem to be few options available that work and fewer still that work well. There are some Prettier plugins for similar languages like Jinja and Twig, but they're often hardcoded with the stylistic preferences of the authors and trip over in places where the control structures are slightly different.
If we wanna make our own Prettier plugin for Nunjucks then I think plenty of people would appreciate that, though! 😋

+1 for having Prettier deal with JS and Sass formatting automagically.

How's this branch for you @querkmachine? Ready for review now
Hopefully all playing nice with Nova

Thanks @romaricpascal
As discussed on Slack I've added some Prettier documentation and also opened:

https://github.com/alphagov/govuk-frontend/pull/4044


Probable bug in argument parser

https://github.com/Nuitka/Nuitka/blob/82769198cb273c353faf29b3f6f0fd7673625421/nuitka/utils/CommandLineOptions.py#L45
AFAICT, the key was already popped at the previous line, so link will always be None?!

You are absolutely correct, I did only explore terminal links and apparently then made it such that it no longer works, but I also removed the link usage it seems. But it will be better to get that corrected, thanks that's a good catch that would have cost me time I am sure.


Use unicode WinApi functions everywhere to support non-ASCII inputs.

Tried to hook ImmDisableIME() out in DS3 and ER to test IME inputs for CJK languages.
Confirmed that it is working fine with these changes (was broken with all ? characters with IME input).

This is great, thank you! I briefly checked out the code and it looks good. I will try and get this merged in as soon as I can.


JBPM-4646 - Case management

@cristianonicolai @krisv first version ready to be reviewed and merged

+1


PubSub filtering/routing

Description
This PR implements Pub/Sub event routing per #2582 as an experimental feature. A new version of the Subscription CRD (dapr.io/v2alpha) was created for defining routing rules for events based on the contents of the Cloud Event envelope. The routing rules themselves use Common Expression Language (CEL) to return true/false based on the developer's matching criteria. The matching rule has an associated path that is used as the URI in the case of HTTP, and provided in the request for gRPC.
Note: I will open a dapr/docs PR and reference the number here.
Example usage:
Enable via the feature flag
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
  name: myappconfig
spec:
  features:
    - name: PubSub.Routing
      enabled: true

Declarative Subscriptions
apiVersion: dapr.io/v2alpha1
kind: Subscription
metadata:
  name: myevent-subscription
spec:
  pubsubname: pubsub
  topic: deathStarStatus
  routes:
    rules:
      - match: event.type == "rebels.attacking.v3"
        path: /dsstatus.v3
      - match: event.type == "rebels.attacking.v2"
        path: /dsstatus.v2
    default: /dsstatus
scopes:
  - app1
  - app2

Programmatic Subscriptions (using Golang without the SDK)
type subscription struct {
    PubsubName string            `json:"pubsubname"`
    Topic      string            `json:"topic"`
    Metadata   map[string]string `json:"metadata,omitempty"`
    Routes     routes            `json:"routes"`
}

type routes struct {
    Rules   []rule `json:"rules,omitempty"`
    Default string `json:"default,omitempty"`
}

type rule struct {
    Match string `json:"match"`
    Path  string `json:"path"`
}

// This handles /dapr/subscribe
func configureSubscribeHandler(w http.ResponseWriter, _ *http.Request) {
    t := []subscription{
        {
            PubsubName: "pubsub",
            Topic:      "deathStarStatus",
            Routes: routes{
                Rules: []rule{
                    {
                        Match: `event.type == "rebels.attacking.v3"`,
                        Path:  "/dsstatus.v3",
                    },
                    {
                        Match: `event.type == "rebels.attacking.v2"`,
                        Path:  "/dsstatus.v2",
                    },
                },
                Default: "/dsstatus",
            },
        },
    }

    w.WriteHeader(http.StatusOK)
    json.NewEncoder(w).Encode(t)
}

Based on some community feedback, I considered naming routes as handlers instead. But I kept it as is because I feel like routes is the concept of selecting the path/URI for the request where handlers refer to the code that is executed when that URI is called. If there are disagreements with that line of thinking, I am happy to hear them.
Closes #2582
Checklist

[x] Code compiles correctly
[x] Created/updated tests
[x] Unit tests passing
[x] End-to-end tests passing
[ ] Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
[ ] Specification has been updated / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
[ ] Provided sample for the feature / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

/ok-to-test

/ok-to-test

/cc @yaron2

/ok-to-test

/ok-to-test

/ok-to-test


Deal correctly with GeoTIFF Pixel-is-point vs Pixel-is-area

The difference between Pixel-is-point and Pixel-is-area in GeoTIFF tends to be confusing. I open this ticket for making my versions of the ASCII art that is used in the standard http://docs.opengeospatial.org/is/19-008r4/19-008r4.html and for giving some examples that can be re-produced with the provided test image and gdalinfo, gdalwarp, and listgeo commands.
GDAL and listgeo examples are given because GDAL is rather widely used and because it has some internal logic when it makes conversions between AREA and POINT variants. That logic is meant to provide backward interoperability after implementing the RFC https://trac.osgeo.org/gdal/wiki/rfc33_gtiff_pixelispoint and to hide some of the complexity from the average user. On the other hand, the same logic can make it difficult to understand what really happens. Fortunately listgeo and gdalinfo reveals all the secrets.
This is one of the ASCII illustrations from the standard
(0,0) (1,0)
      x---x---x-> I
      | * | * |
      x---x---x       Standard (PixelIsArea) TIFF Raster space R,
      | (1,1) (2,1)   showing the locations (x) and areas (*) of several pixels.
      v
      J
The location of the area pixel is referenced at the upper left of the pixel (pixelCorner convention).

These are my versions:
Case 1: Pixel is area. The ModelTiepointTags in the GeoTIFF are set to locations (0,0) and (5,5) in the raster space, and GTRasterTypeGeoKey is set to RasterPixelIsArea. Notice that the count of pixels is zero based and the lower right tiepoint in the 5 by 5 pixel image is actually the top left corner of the pixel at sixth row and column. It is OK, the tiepoint does not even need to be on the area that is covered by the tiff image and it does not need to match with pixel boundaries or centre.

Case 2: Pixel is point. The ModelTiepointTags in the GeoTIFF are set to the same locations (0,0) and (5,5) than in case 1 but GTRasterTypeGeoKey is set to RasterPixelIsPoint. It may feel more odd that the lower left tiepoint is now outside the surface that the raster covers but it is OK.

The side-by side presentation of these images as defined in the text of the standard

If a point-pixel image were to be displayed on a display device with pixel cells having the same size as the raster spacing, then the upper-left corner of the displayed image would be located in raster space at (-0.5, -0.5).

Notice that the areas that cover all the pixels by the extreme boundaries are different.
The GDAL case and some examples
Traditionally RasterPixelIsArea vs RasterPixelIsPoint had no relevance to GDAL but that was changed at around the end of year 2010. But introducing half-a-pixel shifts to the extents of images by the value of the RasterTypeGeoKey is also confusing. Therefore the GDAL utilities like gdalinfo and gdal_translate are handling the RasterTypeGeoKey and ModelTiepointTags hand in hand.
The first example is a pixel-is-point GeoTIFF that has four tiepoints. Listgeo shows the tags
   Tagged_Information:
      ModelTiepointTag (8,3):
         0                 0                 0
         -180              90                0
         1024              0                 0
         -90               90                0
         0                 1024              0
         -180              0                 0
         1024              1024              0
         -90               0                 0
      End_Of_Tags.
   Keyed_Information:
      GTModelTypeGeoKey (Short,1): ModelTypeGeographic
      GTRasterTypeGeoKey (Short,1): RasterPixelIsPoint

Gdalinfo shows this
GCP[  0]: Id=1, Info=
          (-0.5,-0.5) -> (-180,90,0)
GCP[  1]: Id=2, Info=
          (1023.5,-0.5) -> (-90,90,0)
GCP[  2]: Id=3, Info=
          (-0.5,1023.5) -> (-180,0,0)
GCP[  3]: Id=4, Info=
          (1023.5,1023.5) -> (-90,0,0)
Metadata:
  AREA_OR_POINT=Point

Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 1024.0)
Upper Right ( 1024.0,    0.0)
Lower Right ( 1024.0, 1024.0)
Center      (  512.0,  512.0)

Notice that because GDAL is internally using the tiepoint-at-corner approach it is automatically shifting the Ground Control Points that it is using by half a pixel when it sees the metadata that it is calling with name AREA_OR_POINT=Point.
Gdalinfo does not show georeferenced bounds for an image that has just tiepoints but we can gdalwarp the image and run gdalinfo for the warped north-up image
gdalwarp pixel_is_point.tif  warped_pixel_is_point.tif

gdalinfo warped_pixel_is_point.tif

Origin = (-179.956054687500000,89.956054687500000)
Pixel Size = (0.087890625000000,-0.087890625000000)
Metadata:
  AREA_OR_POINT=Point
Corner Coordinates:
Upper Left  (-179.9560547,  89.9560547) (179d57'21.80"W, 89d57'21.80"N)
Lower Left  (-179.9560547,  -0.0439453) (179d57'21.80"W,  0d 2'38.20"S)
Upper Right ( -89.9560547,  89.9560547) ( 89d57'21.80"W, 89d57'21.80"N)
Lower Right ( -89.9560547,  -0.0439453) ( 89d57'21.80"W,  0d 2'38.20"S)
Center      (-134.9560547,  44.9560547) (134d57'21.80"W, 44d57'21.80"N)

In the next test we can make a copy of the pixel_is_point image and edit just the GTRasterTypeGeoKey value
gdal_edit -mo AREA_OR_POINT=Area pixel_is_area.tif --config GTIFF_POINT_GEO_IGNORE YES
Now GDAL converts the tiepoints into its own GCPs without shifts and gdalinfo shows
GCP[  0]: Id=1, Info=
          (0,0) -> (-180,90,0)
GCP[  1]: Id=2, Info=
          (1024,0) -> (-90,90,0)
GCP[  2]: Id=3, Info=
          (0,1024) -> (-180,0,0)
GCP[  3]: Id=4, Info=
          (1024,1024) -> (-90,0,0)

Next use gdalwarp again and check gdalinfo
Origin = (-180.000000000000000,90.000000000000000)
Pixel Size = (0.087890625000000,-0.087890625000000)
Metadata:
  AREA_OR_POINT=Area
Corner Coordinates:
Upper Left  (-180.0000000,  90.0000000) (180d 0' 0.00"W, 90d 0' 0.00"N)
Lower Left  (-180.0000000,   0.0000000) (180d 0' 0.00"W,  0d 0' 0.01"N)
Upper Right ( -90.0000000,  90.0000000) ( 90d 0' 0.00"W, 90d 0' 0.00"N)
Lower Right ( -90.0000000,   0.0000000) ( 90d 0' 0.00"W,  0d 0' 0.01"N)
Center      (-135.0000000,  45.0000000) (135d 0' 0.00"W, 45d 0' 0.00"N)

Third test shows what GDAL is doing quietly by default. Make a new copy of the pixel-is-point image and edit it by using the GDAL defaults
gdal_edit -mo AREA_OR_POINT=Area pixel_is_area2.tif
I add here only the interesting part of the listgeo report.
  Tagged_Information:
      ModelTiepointTag (8,3):
         -0.5              -0.5              0
         -180              90                0
         1023.5            -0.5              0
         -90               90                0
         -0.5              1023.5            0
         -180              0                 0
         1023.5            1023.5            0
         -90               0                 0
      End_Of_Tags.
   Keyed_Information:
      GTModelTypeGeoKey (Short,1): ModelTypeGeographic
      GTRasterTypeGeoKey (Short,1): RasterPixelIsArea

Notice that by default GDAL is unwilling to slide the image. So what is does it to edit the GTRasterTypeGeoKey AND to slide the locations of the ModelTiepointTags by half a pixel. These two half-a-pixel slides compensate each other and therefore the pixel-is-area image that is produced this way overlaps exactly the original pixel-is-point image in QGIS, for example.
I guess that the automatic adjustment of georeferencing that GDAL is doing according to AREA_OR_POINT metadata can make people to believe that GDAL still does not care.
Test data and how to test:

pixel_is_point.tif captured with URL http://maps.ecere.com/ogcapi/collections/SRTM_ViewFinderPanorama/coverage?bbox=-180,0,-90,90 2020-08-25 (server is developing and may not send the same response any more)
pixel_is_area.tif is the same image but GTRasterTypeGeoKey edited into RasterPixelIsArea
run listgeo for the both images
run gdalinfo for the both images
create north-up images with gdalwarp input.tif output.tif
use listgeo and gdalinfo for the warped images

pixel_vs_area.zip

From GML 3.2.2 "When a grid point is used to represent a sample space (e.g. image pixel), the grid point represents the center of the sample space (see ISO 19123:2005, 8.2.2)."
Note that the extract references ISO 19123 - Geographic information — Schema for coverage geometry and functions

From GML 3.2.2 "When a grid point is used to represent a sample space (e.g. image pixel), the grid point represents the center of the sample space (see ISO 19123:2005, 8.2.2)."
Note that the extract references ISO 19123 - Geographic information — Schema for coverage geometry and functions

@jratike80

Perhaps you like the GeoPackage gridded data extension http://docs.opengeospatial.org/is/17-066r1/17-066r1.html where pixels are stored raw and different metadata table stores the meaning with three alternatives "grid-value-is-center", "grid-value-is-area", or "grid-value-is-corner". It feels like "grid-value-is-corner" is what you would like to see in GeoTIFF. GeoTIFF is an OGC standard as well and perhaps the standard could be enhanced to match with GeoPackage here

The GeoTIFF approach seems what is most correct to me:
1 to indicate that the Raster type is PixelIsArea; or
2 to indicate that the Raster type is PixelIsPoint; or

assuming that PixelIsPoint means the GeoPackage tiled gridded coverage extension's grid-value-is-corner.
I believe grid-value-is-center is an offset in diguise which should generally be avoided, but in the case of the GeoPackage coverage tiles, it offers (maybe too much?) flexibility to select different samples when generating those tiles -- so it could be seen as PixelIsPoint in both cases, for which the coverage of the tiles has a different extent, and the distinction prescribes how to compute that extent.
If strictly applying the subset rules being proposed in http://github.com/opengeospatial/ogcapi-coverages/issues/96, typical TileMatrixSets based on 256x256 tiles would generate coverage tiles with 257x257 samples (including all 4 corner points) for PixelIsPoint, and 256x256 samples for PixelIsArea (with the exact same tile extents).

@jratike80

Perhaps you like the GeoPackage gridded data extension http://docs.opengeospatial.org/is/17-066r1/17-066r1.html where pixels are stored raw and different metadata table stores the meaning with three alternatives "grid-value-is-center", "grid-value-is-area", or "grid-value-is-corner". It feels like "grid-value-is-corner" is what you would like to see in GeoTIFF. GeoTIFF is an OGC standard as well and perhaps the standard could be enhanced to match with GeoPackage here

The GeoTIFF approach seems what is most correct to me:
1 to indicate that the Raster type is PixelIsArea; or
2 to indicate that the Raster type is PixelIsPoint; or

assuming that PixelIsPoint means the GeoPackage tiled gridded coverage extension's grid-value-is-corner.
I believe grid-value-is-center is an offset in diguise which should generally be avoided, but in the case of the GeoPackage coverage tiles, it offers (maybe too much?) flexibility to select different samples when generating those tiles -- so it could be seen as PixelIsPoint in both cases, for which the coverage of the tiles has a different extent, and the distinction prescribes how to compute that extent.
If strictly applying the subset rules being proposed in http://github.com/opengeospatial/ogcapi-coverages/issues/96, typical TileMatrixSets based on 256x256 tiles would generate coverage tiles with 257x257 samples (including all 4 corner points) for PixelIsPoint, and 256x256 samples for PixelIsArea (with the exact same tile extents).

SWG 2022-02-16: We should define a GeoTIFF encoding conformance class in OGC API - Coverages, and in there clarify that PixelIsArea / PixelIsPoint flags should be set accordingly, and that the data being returned from the subsetting operation should also accurately reflect the nature of the space occupied by the cells.
The subsetting rules should respect the "span" of the cells, and the a direct position (and the value at that position) should be included in the result set if the direct position is within the subset while considering the "span" of the cell for that value:

If cells represent an infinitely small point, the direct position should only be part of the subset if the position is equal or within (closed interval) the specified subset bounds.
If cells represent an area, the direct position is within the subset if any part of that area is within (open interval) the specified subset bounds. See also https://github.com/opengeospatial/coverage-implementation-schema/issues/6 .

Note that if a GML response is negotiated, including application schemas that reference separate GeoTIFF or JPEG2000 rangesets (e.g. multi-part response), an "offset" vector is used from the CIS 1.0 logical model, but there is no way of knowing whether the data from a GML gmlcov:GridCoverage, gmlcov:RectifiedGridCoverage, gmlcov:ReferenceableGridCoverage cells represent point or area cell spaces. The valueIsPoint or valueIsArea can then only be indicated in e.g. the GeoTIFF.
In https://github.com/opengeospatial/coverage-implementation-schema/issues/6 we clarify how the distinction between point and area can be specified in CIS 1.1 GeneralGridCoverage.

I have used GDAL and GRASS to create slope maps from a Pixel-is-point DEM.  Both create a correct result, but shift the grid to Pixel-is-area and do not set the flag in Geotiff tag 1025.  That tag is strongly encouraged in the Geotiff specs, which as I read them only allows two values, but does not specify one as the default.
https://github.com/OSGeo/grass/discussions/2261 has a long thread with the particulars in this case.
Can GDAL always set that flag in all Geotiffs it creates?  That would remove any ambiguity.  I agree with the results, just not the lack of specific details on how to interpret the shifted coordinates.

Please check your GDAL version. I believe that current GDAL version writes that tag always. The current version at the moment is 3.4.2.
I think that the question about "gdaldem slope"  https://gdal.org/programs/gdaldem.html and the GeoTIFF tags should be asked from the gdal-dev mailing list. However, I made a quick test with GDAL 3.4.1, released 2021/12/27
gdaldem slope MNT_SRTM_EPSG32631.tif slope.tif
gdalinfo slope.tif
...
Metadata:
  AREA_OR_POINT=Area

listgeo slope.tif
...
   Keyed_Information:
      GTModelTypeGeoKey (Short,1): ModelTypeProjected
      GTRasterTypeGeoKey (Short,1): RasterPixelIsArea

You have probably been reading the original GeoTIFF specification http://geotiff.maptools.org/spec/contents.html but GeoTIFF is now an OGC standard http://docs.opengeospatial.org/is/19-008r4/19-008r4.html with requirement 7.3

http://www.opengis.net/spec/GeoTIFF/1.1/req/GTRasterTypeGeoKey.value
The GTRasterTypeGeoKey value SHALL be:

0 to indicate that the Raster type is undefined or unknown; or
1 to indicate that the Raster type is PixelIsArea; or
2 to indicate that the Raster type is PixelIsPoint; or
32767 to indicate that the Raster type is user-defined.
Recommendation: the use of 0 (undefined) or 32767 (user-defined) is not recommended

If current GDAL version does not set GTRasterTypeGeoKey when it creates a new GeoTIFF then it feels like a bug but in that case you should make a re-producible test case for the develpers and write mail to gdal-dev list first.


DACT-789  altering DOB to be a date field(local date/instant) rather …

…than a date3tuple field as software filers would not send it in as seperate day month and year fields,  but will send in 1 date field.

Original design intention for using Date3Tuple

to support Web journey validation via the API

users may submit missing/invalid data for dates
API applies validation and returns appropriate error, e.g. 'Month must be a valid number 1 - 12' etc.

Replacing Date3Tuple with LocalDate

does not allow API-side validation, since they cannot be created with invalid values (a DateTimeException is thrown)
storing as Instant leads to values -1:00 behind during BST, e.g. "23/06/2000" -> '2000-06-22T23:00:00Z'

I suggest keeping the Date3Tuple representation and adding LocalDate options to the associated Builder classes
I'm happy to discuss/work through the details necessary.

After speaking to @rwalrondch on issues raised in preceding comment. The validation and date storage have been considered and addressed previously, so I am satisfied to approve this PR.


YANFF build improved to work in parallel. It is now safe to use -j option with make

Looks good to me


DRM Playback Failure on Long Form MPEG-DASH Content

Have you read the FAQ and checked for duplicate open issues?
Yes
What version of Shaka Player are you using?
Tested on 3.0.0-npm-dirty (latest master) and v2.5.12-master-25-ge63813c
Can you reproduce the issue with our latest release version?
Yes
Can you reproduce the issue with the latest code from master?
Yes
Are you using the demo app or your own custom app?
Both
If custom app, can you reproduce the issue using our demo app?
Yes
What browser and OS are you using?
Chrome 84 and LG WebOS 3.X
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
WebOS 3.X
What are the manifest and license server URIs?
URLs will be sent via email.
What did you do?
Attempt to play long form DRM protected content (videos over 1 hour or so).
What did you expect to happen?
Videos should play fine.
What actually happened?
Video playback fails with { code: 3 } error.  No other errors in logs.
Short form content with DRM (tested with 45 minute videos and shorter) plays fine.

Has this issue been re-created or investigated by the Shaka Player team?  Not being able to play long form video is a major limitation.

Unfortunately we don't have a WebOS device, so we have no way to test or provide support ourselves.  My guess is this is a decoder error and the device is having some trouble playing your content.  This is probably a device limitation.  The content plays fine on desktop Chrome.  You should try only setting a Widevine or PlayReady license server URL; if you only provide one, then we'll only use that.  If it works with one key system, then it is a limitation of the DRM system on the device.
I do notice there is a large gap at the start, so what is probably happening is this used to be a live stream and you converted it to live and you got the timeline wrong (e.g. an incorrect presentationTimeOffset value).

I’m seeing the exact same issue in Chrome and the test app with the example URLs I provided to you by email.  These are not live nor were ever live streams.

What version of Chrome and what platform?  The examples you provided work fine for me on both Windows and Mac with Chrome 84.  I tried using both https://shaka-player-demo.appspot.com and https://nightly-dot-shaka-player-demo.appspot.com.

I'm using Chrome 84 but oddly they are playing fine in Chrome now.  I have no idea why they didn't play the other day.  However, they are still not playing in webOS.  The part that is most confusing is that shorter content (under an hour) is playing fine with DRM on webOS.  The strange thing is that when we turn off DRM temporarily for the content, it plays fine.  I wouldn't think it would be DRM specific since other shorter DRM content plays fine with the same key structure and these play fine on other devices.  The main difference is we use MPEG-DASH when using DRM but unclear why these specific MPEG-DASH manifests are throwing the error.
Can you please provide more details on the presentationTimeOffset as to what you think we should try?  Again, these were not previously "Live" videos so not sure why it would affect anything but open to trying things.

What we have seen on older Tizen devices, for example, is that there are sometimes bugs in the integration between the device's hardware decoders and the CDM.  We've also seen non-DRM bugs triggered by long content on Tizen.  For example, if an audio stream's timestamps are larger than 248 milliseconds (if I recall the exact number correctly), then it just fails to play audio on certain versions of Tizen.  Clearly bugs in the firmware in those cases, and it's hard to develop a workaround for those sorts of things.  Sometimes the trigger for such bugs can only be avoided by changing something in the encoder.
All of that is to illustrate that the same could be true on some versions of WebOS, such that a decoder error is triggered with long DRM content.  It's very hard to say, and we don't have a WebOS device integrated into our lab environment yet.
Anyway, sorry to distract from the productive talk of potential workarounds.  @TheModMaker, is there a workaround you want @jamescahall to try?

I figured out why there's a large gap at the start, I noticed this bug as part of #2709 but we closed it and didn't fix the bug.  You can work around this by setting the manifest.initialSegmentLimit to a large value (e.g. 1e9); this can be changed in the top-left menu of the demo under the "Manifest" tab.  I'll put up a fix now.
Could you try with just one DRM system configured?  You can't do this with the demo as-is, but I think if you edit this: https://github.com/google/shaka-player/blob/master/demo/main.js#L1704 to only have one entry, it should only use that.  You can't just do this in DevTools since this is used during startup and won't have an affect once the demo is loaded.  Alternatively, if you have a custom app, just configure only one license server.  If you try only PlayReady or only Widevine, we may see one of them work if this is caused by DRM-protected content.

Hi Jacob,
I attempted to set the initialSegmentLength to 1e9 as you suggested but had no affect.  I also tried widevine and playready one by one.  Neither adjustment helped.  As mentioned, shorted videos (under an hour or so) play fine with DRM.  Longer videos do not.  Here is my setup (NOTE Ignore the 4K switch as this content is not 4K):
        var configuration = { 'abr': { 'defaultBandwidthEstimate' : 500000 }, 'streaming': { 'bufferingGoal' : 10, 'rebufferingGoal': 4 }, 'manifest' : { 'initialSegmentLength' : 1e9 } };
        var features = [];
        if (source != "" && Content.currentContent.mpdURL != null && Content.currentContent.licenseURLs != null && Object.keys(Content.currentContent.licenseURLs).length > 0) {
            source = Content.currentContent.mpdURL;
            var servers = {};
            if (Content.currentContent.licenseURLs["widevine"] != null) {
                servers["com.widevine.alpha"] = Content.currentContent.licenseURLs["widevine"];
            }
            if (Content.currentContent.licenseURLs["playready"] != null) {
                servers["com.microsoft.playready"] = Content.currentContent.licenseURLs["playready"];
            }
            configuration["drm"] = { servers: servers, advanced: { 'com.widevine.alpha': { 'videoRobustness': 'SW_SECURE_CRYPTO', 'audioRobustness': 'SW_SECURE_CRYPTO' } } };
        }
        if (this.is4KContent == true) {
            features.push("ultra-high definition");
        }
        if (features.length > 0) {
            configuration["features"] = features;
        }
        this.drmPlayer.configure(configuration);

Do you have any further suggestions?  Is there any settings I should enable to get you additional logs that could help identify the issue?  Long form content works without DRM and works in other apps such as Amazon, Hulu, Netflix, etc. (of course I don't know what player they use).
Thanks
James

NOTE:  I'm actually getting this in Chrome and my note above about Chrome wasn't with Shaka enabled and will send a link for you to test by email.
Additionally, I turned on V2 logging and the browser is reporting:
Invalid config, unrecognized key .manifest.initialSegmentLength
shaka.util.ConfigUtils.mergeConfigObjects @ config_utils.js:45
I'm not seeing initialSegmentLength in the configuration tutorial either so wondering if that is some new parameter that requires a specific version.
Here are some more detailed logs from Chrome on the failure:
No Period ID given for Period with start time 0,  Assigning a default
player.js:2355 Found variant with audio and video content, so filtering out audio-only content.
drm_engine.js:858 Created MediaKeys object for key system com.widevine.alpha
23drm_engine.js:548 Ignoring duplicate init data.
stream_utils.js:79 codecs avc1-mp4a avg bandwidth 1295978.5
streaming_engine.js:185 init: completed initial Stream setup
24drm_engine.js:548 Ignoring duplicate init data.
player.js:1888 No preferred audio language set.  We have chosen an arbitrary language initially
simple_abr_manager.js:278 Calling switch_(), bandwidth=172245 kbps
player.js:4427 switch_
No further logs.
When a DRM video DOES play, it also shows lines such as:
switch: switching to Stream (video:8)
switch: Stream (audio:9) already active

Sent additional sensitive testing details by email.

Sorry for the confusion.  The correct config is manifest.dash.initialSegmentLimit, not manifest.initialSegmentLength.  Please try correcting that key and see if it helps.

Also, the latest code in the master branch has a fix from @TheModMaker which should fix segment limit issues for all VOD content.  So you could either try correcting the config key you're using for the recommended workaround, or you could update to the latest source, where no additional config should be needed.
Does this help?

Also, I loaded your app and transferred the manifest and license server URL to the Shaka demo and the asset plays fine.  So it is probably a problem with your app.  Without access to the app's code, this can be hard to tell what this is.

It looks like it doesn't start on Chrome due to the issue I described above.  If I seek to 6000, it plays fine.  If you use the latest master or the updated config value the asset should start fine.  I am still not seeing any decoder errors on Chrome so I can't be much help with that.  Maybe with that fix WebOS will handle it better?

Thank you.  I pulled the latest master branch code with your change and seems to have fixed the issue and all non-DRM and DRM content is now playing (including the linear stream).
One note, and not sure if it is related, but when changing videos this error keeps repeating in console:
failed to get buffered range for video DOMException: Failed to read the 'buffered' property from 'SourceBuffer': This SourceBuffer has been removed from the parent media source.
at shaka.media.MediaSourceEngine.getBuffered_ (https://html5-dev.ottera.tv/vizio/js/helpers/shaka-player.compiled.debug.js?=1596664843071:374:100)
at shaka.media.MediaSourceEngine.bufferStart (https://html5-dev.ottera.tv/vizio/js/helpers/shaka-player.compiled.debug.js?=1596664843071:370:502)
at $jscomp.generator.Engine_.program_ (https://html5-dev.ottera.tv/vizio/js/helpers/shaka-player.compiled.debug.js?=1596664843071:606:381)
at $jscomp.generator.Engine.nextStep_ (https://html5-dev.ottera.tv/vizio/js/helpers/shaka-player.compiled.debug.js?=1596664843071:36:105)
at $jscomp.generator.Engine.next_ (https://html5-dev.ottera.tv/vizio/js/helpers/shaka-player.compiled.debug.js?=1596664843071:32:234)
at $jscomp.generator.Generator.next (https://html5-dev.ottera.tv/vizio/js/helpers/shaka-player.compiled.debug.js?=1596664843071:37:73)
at https://html5-dev.ottera.tv/vizio/js/helpers/shaka-player.compiled.debug.js?=1596664843071:45:230
at new Promise ()
at Object.$jscomp.asyncExecutePromiseGenerator (https://html5-dev.ottera.tv/vizio/js/helpers/shaka-player.compiled.debug.js?=1596664843071:45:123)
at Object.$jscomp.asyncExecutePromiseGeneratorProgram (https://html5-dev.ottera.tv/vizio/js/helpers/shaka-player.compiled.debug.js?=1596664843071:45:419)
For reference, to destroy the player we are:
a) Removing the raw video tag from the DOM
b) Calling:
this.drmPlayer.unload().then(function() {
_this.drmPlayer.destroy().then(function() {
}).catch(function(error) {
log("DRM Destroy Error: " + error);
});
});

I think the error is caused by removing the video element from the DOM while the player is still holding a reference to it.  Instead, I would suggest calling await player.destroy() first, then removing the element.  There is no need to call unload() or detach() immediately before destroy(), as destroying the player implies both unloading the content and detaching from the video element.
Does this help?

BTW, I'm marking this as a duplicate of #2677 since the fix for that issue also fixes this one.

OK thanks.  I'll review code changes to prevent the error.  It doesn't affect app usage so appears to be non-critical.

This issue and #2677 were fixed in c403dec5355bd6b8191ed57df381d9005a776e7f.


7nodes node crashing - fatal error: runtime: out of memory

7nodes node crashing - fatal error: runtime: out of memory
Playing with 7nodes example, testing set and get methods with privateFor
Questions

What is the correct way within the 7nodes example to selectively start one crashed node?
What debug information can I give you, to solve the underlying issue that caused the crash described below?
How can I increase the available RAM in that virtualmachine? I have 16 GB, so no problem.
Is this a known problem? Are private transactions still very much beta perhaps?

Problem Description
Suddenly my node1 disappeared - and reconnect fails:
geth attach ipc:/home/vagrant/quorum-examples/7nodes/qdata/dd1/geth.ipc

Fatal: Unable to attach to remote geth: dial unix ~/quorum-examples/7nodes/qdata/dd1/geth.ipc: connect: no such file or directory

while the other nodes are still there:
geth attach ipc:/home/vagrant/quorum-examples/7nodes/qdata/dd7/geth.ipc
geth attach ipc:/home/vagrant/quorum-examples/7nodes/qdata/dd2/geth.ipc
etc.

all good.
Looking into the log files, I find this:
cat  ~/quorum-examples/7nodes/qdata/logs/1.log | grep mem

fatal error: runtime: out of memory
/usr/local/go/src/runtime/mem_linux.go:216 +0x1d0

(same command for 2.log and 7.log ... result is empty instead --> no such memory problem)
version 2.0.2
geth version
Geth
Version: 1.7.2-stable
Git Commit: ee498061b5a74bf1f3290139a53840345fa038cb
Quorum Version: 2.0.1
Architecture: amd64
Network Id: 1
Go Version: go1.9.3
Operating System: linux
GOPATH=
GOROOT=/usr/local/go

this ^ saying 2.0.1 is actually wrong, I had installed v2.0.2 from github release

Is this all I have to increase?

How can I increase the available RAM in that virtualmachine?

https://github.com/jpmorganchase/quorum-examples/blob/master/Vagrantfile#L12
After a couple of transactions, this is the status:
vagrant ssh

free -m
              total        used        free      shared  buff/cache   available
Mem:           2000        1314         528           3         157         525
Swap:             0           0           0

Anyone else had such memory problems, like described above?  What about creating 2048 MB swap by default, when initiating the vagrant-VM ?
Was it actually a memory problem, or might it have had other origins?

@drandreaskrueger I merged a PR in Quorum master that should improve memory allocation but you can increase the memory available in your vagrant config if needed.

any news on releases ?


Swift Package Manager Support

Closed as duplicate of https://github.com/Boris-Em/BEMCheckBox/pull/97.
Thanks for your contribution @paranat. Sorry for not being available to review your PR earlier.


User photos

Includes addition to user form. Use dropzone unless it's really hard.
Allow editing of photo only by photographer role

Originally created by Tom Smyth at 2016-11-06 15:32, migrated from redmine-#5372

Description updated (diff)

By Tom Smyth at 2016-11-06 20:43

Status changed from New to Closed

By Tom Smyth at 2016-12-05 08:55

Version set to 2.7

By Tom Smyth at 2016-11-22 18:29


Bug: redirect()->withInput()->back() always redirect to / in HTTP Test and Controller testing

Describe the bug
I am on upgrading my ci4-album that tested in CI 4.0.3 which has the following code:
	public function add()
	{
		if ($this->request->getMethod() === 'post')
		{
			$data = $this->request->getPost();
			if ($this->repository->save($data))
			{
				session()->setFlashdata('status', 'New album has been added');
				return redirect()->route('album-index');
			}

			session()->setFlashdata('errors', model(AlbumModel::class)->errors());
			return redirect()->withInput()->back();
		}

		return view('Album\Views\album\add', ['errors' => session()->getFlashData('errors')]);
	}

which was testable with code:
	public function testAddAlbumInvalidData()
	{
		$request = Services::request(null, false);
		$request->setMethod('post');

		$result = $this->withRequest($request)
						->controller(Album::class)
						->execute('add');
		$this->assertTrue($result->isRedirect());

		$request = Services::request(null, false);
		$request->setMethod('get');

		$result = $this->withRequest($request)
					   ->controller(Album::class)
					   ->execute('add');
		$this->assertTrue($result->isOK());
		$this->assertTrue($result->see('The artist field is required.'));
		$this->assertTrue($result->see('The title field is required.'));
	}

On latest CI 4.1.2, it always false for result->see(). On debugging, checking the redirect Url, it always back to / instead of /album/add so it always failuire. It happen in HTTP test as well:
public function testAddAlbumInvalidData()
{
        $result = $this->post('/album/add');
        $this->assertTrue($result->isRedirect());
        var_dump($result->getRedirectUrl());
}

which result:
string(32) "http://localhost:8080/index.php/"

which should be:
string(32) "http://localhost:8080/index.php/album/add"

On another debugging, somehow, the session always empty for :
var_dump(model(AlbumModel::class)->errors());die;

which actually exists if it called in the web browser.
array(2) { ["artist"]=> string(29) "The artist field is required." ["title"]=> string(28) "The title field is required." }

CodeIgniter 4 version
4.1.2
Affected module(s)
Test
Expected behavior, and steps to reproduce if appropriate
It should work.

PHPUnit configuration https://github.com/samsonasik/ci4-album/blob/master/phpunit.xml.dist
Database
Testing setup: https://github.com/samsonasik/ci4-album#testing
Error demo: https://github.com/samsonasik/ci4-album/pull/9/checks?check_run_id=2626262047#step:11:18

Context

OS: MacOS Big Sur 11.3
Web server CLI
PHP version 8.0.6

redirect()->back() will default to root when there is no __ci_previous_url, which in feature and controller tests should always be the case (unless you are preserving sessions between tests). I'm curious how this was working before.

__ci_previous_url is not exists, for just back to previous uri, the $_SERVER['HTTP_REFERER'] initialization tweak can be used but the session is gone.
I check versions one by one, and it seems it is not working since 4.0.5, so we need to check the diff between https://github.com/codeigniter4/CodeIgniter4/compare/v4.0.4...v4.0.5

I don't see you setting $_SESSION['_ci_previous_url'] or $_SERVER['HTTP_REFERER'] so if this was working before it must have been carried over from a previous test. Maybe it was the changes to CIUnitTestCase? https://github.com/codeigniter4/CodeIgniter4/compare/v4.0.4...v4.0.5#diff-581964b1f9dfdbe8e8fb29c615b299dac0fb4624e080117fe787447b92c14749

That should work without that tweak with withInput() and back() to bring input into session and back to current URI, it is a 303 post redirect get work.
Definetely needs check in the CIUnitTestCase

It is previously working on <= 4.0.4

I am closing for now, still an issue, but use another solution already.


Fix constraint in subscribe of transform_each

This should fix the issue in #1245

/ok to test

thanks!


Intermittently missing spans created inside threads

While working on another async related ticket (#1056), I discovered a bug in how the agent handles asynchronous spans in a transaction. It appears that intermittently a span happening in another thread from the starting thread of the transaction will get dropped and will not be reported by the agent.
It appears that in instances of this missing span, the harvest begins while the missing span is still working (making http requests for our example app), and then it appears to be dropped completely. It's not clear yet how (or if) the harvest is causing the span to go missing. Maybe something to do with how we exclude the agent http calls from being recorded on transactions is related?
This behavior appears to be already present in the agent for some time.
Example transaction in dt: https://staging.onenr.io/0YBR684K2QO
Can reproduce using the ruby_agent_playground/multi-threading application.
snippet from test app:
    threads = []
    threads << Application.perform_with_instrumentation(name: 'Custom/Thread1') do
      long_request
    end
    threads << Application.perform_with_instrumentation(name: 'Custom/Thread2') do
      post_request
    end
    threads.each(&:join)

  def self.perform_with_instrumentation(name:)
    instrumentation = Thread.current[:newrelic_tracer_state]
    Thread.new do
      Thread.current[:newrelic_tracer_state] = instrumentation
      segment = NewRelic::Agent::Tracer.start_segment(name: name)
      yield
      segment.finish
    end
  end

I suspect this may be related to our Net::Http instrumentation using NewRelic::Agent.disable_all_tracing.


chore(test): export c8 coverage from puppeteer

exports script coverage from puppeteer to c8 in a compatible format

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

GitHub release
v6.26.0

Your semantic-release bot :package::rocket:


Split appveyor to test node-webkit and node.js separately

@Mithgol - currently the appveyor scripts test both node.js and node-webkit at the same time, correct? I think we should only test node-webkit or node.js per matrix item. This will make it much easier to see quickly whether the failure is due to both failing or just one of the runtimes. Do you agree? This is the way the .travis.yml works currently.

I agree.

If you have such matrix ready in your mind, commit it to the nwjs branch.
If you don't, I might commit something like that (but not before tomorrow).

I don't have anything in mind, just logging the idea. If you have time to consider breaking apart the matrix tomorrow that would be amazing.

Closing as we no longer use Appveyor 🙂


Adding sitemap.xml support to Hydroshare

Pull Request Checklist:

[x] Positive Test Case Written by Dev

[ ] Automated Testing

[ ] Sufficient User and Developer Documentation

[ ] Passing Jenkins Build

[ ] Peer Code review and approval

Positive Test Case

Check out the sitemap.xml branch
Visit your-dev-url/sitemap.xml and you should see an index pointing to two sub sitemaps, sitemap-pages.xml and sitemap-resources.xml

Build finished.

retest this, please

Build finished.

Build finished.

retest this, please

Build finished.

retest this, please

Build finished.

Build finished.

I dont think an automated test is necessary for this...


Lazy load karl

asdf

Changes Unknown when pulling 571336d3f9cf08db231bd27cda0a102ffeb819d2 on lazy-load-karl into ** on master**.

Changes Unknown when pulling ad01a30677ed5b14719e8bb495156fed6ffcf2b4 on lazy-load-karl into ** on master**.


Fix form response file saving. Closes #7

As far as I understand it, Quart has this Request class that represents requests to the server. Inside this class, there is a class attribute form_data_parser_class. Currently it's left as FormDataParser, and that doesn't work because FormDataParser uses FileStorage, and FileStorage uses aiofiles, which is not compatible with Trio, so it all breaks.
This pull request adds new subclasses of the FormDataParser and FileStorage classes, named TrioFormDataParser and TrioFileStorage respectively, and the new TrioFileStorage class reimplements the save and load methods to use Trio's built in asynchronous file IO instead of using aiofiles.
Closes #7

Thanks, I merged this manually as I've made some other updates beforehand.


search index, sitemap.xml and feed.xml are not updating after publishing new post!

hey @Mridul2820 - you need to trigger a new deployment for your project as the sitemap.xml and feed.xml are both generated during build. this is something outside of the scope of the starter


Change repo topics

To be consistent with other Esri repo topics categorization, please remove topics ios-swift and ios-app, add topics native-development, ios, and swift

I've requested for ownership from github_admin of this repo so that I can change the tags.

I've been granted ownership.
The topics should now be consistent with what is outlined above.

looks good, thanks!
https://github.com/Esri?q=topic:swift


Include a link to open the project

Hey, I'm reading through the book and thoroughly enjoying it, thanks @lakshmanok!
I have some trouble viewing the notebooks here on GitHub though (it keeps saying "Sorry, something went wrong", likely hitting some size limits).
I work at Deepnote, and we try to build better data science notebooks. The proposed button opens the repo as a project in Deepnote, and you can view and execute all of the files – it might be helpful for other readers too :)

@googlebot I signed it!


Fresh Installation is not working fine

Getting issues while i installed fresh setup at my localhost
I had attached screenshot to see what exactly it happening for web view as well as admin view.
Looking forward for your positive feedback
Thanks
Akanshu

What's the URL you're on when you get that 404?


fix(cli): argo lint with strict should report case-sensitive errors. Fixes #13006

Fixes #13006
Motivation
Currently, when linting a CronWorkflow definition file, argo lint fails to detect keys with incorrect capitalization. This oversight can lead to unexpected behavior when applying these definitions using kubectl. Prior to this fix, argo cron create would ignore capitalization issues and proceed with the provided values, creating an inconsistency between kubectl and argo cron create behaviors.
By addressing this issue, we aim to:

Enhance the linting process to catch capitalization errors early in the development cycle.
Align the behavior of argo cron create/argo submit with kubectl, ensuring both tools report errors for incorrectly capitalized fields.
Streamline the workflow creation process by providing consistent feedback across different Argo and Kubernetes tools.

This change will help prevent potential errors by catching and reporting capitalization issues uniformly across all relevant tools.
Modifications
To address this issue, we've made the following change:
Modified the strict path of the linting process to utilize the sigs.k8s.io/json library for unmarshaling.

This library provides case-sensitive unmarshaling in strict mode.
Fields with incorrect capitalization (e.g., "schedUle" instead of "schedule") will now be unmarshaled as-is.
The strict mode will then report these incorrectly capitalized fields as errors using the k8s.io/apimachinery/pkg/runtime library.

This change ensures that argo lint will now flag incorrectly capitalized fields when strict mode is enabled, providing developers with immediate feedback on potential issues in their workflow definitions. It also aligns the behavior of argo lint and argo cron create/argo submit with kubectl, creating a consistent experience across these tools.
Verification
To validate the effectiveness of this fix, I have extended the test suite with two new unit tests:

A test case for strict mode enabled, verifying that capitalization errors are correctly reported.
A test case for strict mode disabled, ensuring that the existing behavior remains unchanged.

@agilgur5, I notice you were discussing making pkg do this strict check instead of doing it in here. That feels slightly better as an approach, but I don't want to block this on that. Would you rather we went that way?

In https://github.com/argoproj/argo-workflows/issues/13006#issuecomment-2156786547 I was primarily concerned about "strict + case-sensitive". If the k8s variant handles this, then perhaps the functions in pkg are not even necessary and can be replaced and removed.
But if we wanted to, we could add this as an additional function in pkg and then load from the same place. For this case, I don't mind either way; would in fact prefer replacing and removing if possible.


rdg websocket support

websocket support for  remotedesktop gateway RDG_OUT_DATA
It automatically falls back to classic RDG_OUT_DATA/RDG_IN_DATA if it is not supported.
This pull request is relatively big because this time client->server flow has to distinguish between chunked encoding and websocket framing.
currently server->client masking is not supported. if the server does this reading does not work anymore (because it is not impemented, but the header is parsed, so security wise this should not be exploitable)
On the other hand rfc 6455 mandates masking from client to server, the other way around is not specified. In fact it is defined that the client has to generate a new masking key per frame (not for the server) so I think it is practically prohibited for a server to do that.
Anyhow, I don't know any server that does this. If one should exists, it will always be possible to implement it.

@freerdp-bot test

@freerdp-bot test

sorry, don't know what exactly the oldest toolchain can do...
hope this one is compatible (uint8_t to BYTE, variable declaration removed in for loop)

sorry, don't know what exactly the oldest toolchain can do...
hope this one is compatible (uint8_t to BYTE, variable declaration removed in for loop)

@freerdp-bot test
@akarl10 best stick to C99 rules (except for stdint.h and variable declaration at beginning of scope)

@freerdp-bot test
@akarl10 best stick to C99 rules (except for stdint.h and variable declaration at beginning of scope)

@freerdp-bot test

@freerdp-bot test

@akarl10 is the pr now ready for testing?

@akarl10 is the pr now ready for testing?

if you are ok with the code quality I would say yes.
Personally I have tested it against  RDG 2016 directly, RDG behind nginx* with websocket upgrade, without websocket upgrade with and without chunked transfer encoding, but only running on a recent os (Ubuntu 20.10).

the nginx tests used only PAA authentication, but in that regard it should not make any difference.

if you are ok with the code quality I would say yes.
Personally I have tested it against  RDG 2016 directly, RDG behind nginx* with websocket upgrade, without websocket upgrade with and without chunked transfer encoding, but only running on a recent os (Ubuntu 20.10).

the nginx tests used only PAA authentication, but in that regard it should not make any difference.

@freerdp-bot test

LGTM

@akallabeth  should I squash commit or is it ok like this?

I have rebased and squashed commited.
The view on github shows a lot more changes. Is this normal?
checked with git diff b05fea134e0244d0a9f67941e2385229b267ab5c (current head) and it shows only my changes..

@akarl10 ok, sorry, you did something wrong. rebase to current master and check the diff.
Please also note that now we need to review again :/

now something got really wrong..
https://github.com/FreeRDP/FreeRDP/compare/master...akarl10:websocket
shows up ok, but this page now sometimes gives me a 500 server error.
additionally the update does not show up here...
What should I do now? close this an do a new pull request?

@akarl10 just fetch and rebase to master, I´ve tried that and it was not on based on current master.
github being a bit unreliable is something that happens sometimes ;)

ok, should be fixed now.
My apologies about that.

@freerdp-bot test


Translate koalix-crm to Brazilian Portuguese, pt-BR

Context
koalix-crm was developed in english as a main language.
As django framework offers a convenient way to translate strings in the admin interface into other languages we can make use of this feature and translate the front-end to other langages.
how the translation is done is described here: https://docs.djangoproject.com/en/2.1/topics/i18n/translation/
Acceptance Criteria
The Issue is resolved when the all elements of the django-admin are translated to Portuguese language (crm, accounting, djangoUserExtension and subscriptions)

Hello Williano
Sorry for my late reply regarding your issue with the fork.
I just saw that you have now your own fork? Are you able to work on your
fork for the moment?
I will need to think about adding you to the developers team when i known
how to set restrictions on the master and on the branches.
As soon as we have worked together for a few weeks this should be no
problem i guess.
best regards
Aaron
Am Mo., 22. Okt. 2018 um 04:09 Uhr schrieb Williano Serpa <
<EMAIL_ADDRESS>
Hi @scaphilo https://github.com/scaphilo I will work on that as soon as
possible.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/scaphilo/koalixcrm/issues/220#issuecomment-431725166,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAnVSELnK6OfAD9XpB751sxWfDV747wAks5unSjSgaJpZM4XxUni
.

Hi Aaron, no problem. Now I have solved the issue with fork. I will try to work in translation right now. I will keep you on track.
Thanks and Best Regards,
Williano

Hello Williano
How is it going?
Do you face any issues where i could help you?
best regards Aaron

Hello Aaron,
I am working on the translate and I have commit some files in my fork(as
you can see in GitHub), I have completed the development environment. Now
the build is working with success in Travis-CI.
But I can't publish the application in Heroku for some reason.
I think next week I can complete the translate activity, because I don`t
have time enough on this days, I am very busy in my job.
Thanks and Best Regards,
Williano
Em sex, 2 de nov de 2018 às 17:54, Aaron Riedener<EMAIL_ADDRESS>escreveu:

Hello Williano
How is it going?
Do you face any issues where i could help you?
best regards Aaron
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/scaphilo/koalixcrm/issues/220#issuecomment-435500579,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGktM7jRzs0Rua8CDHPzgF8Ty136g3MNks5urLEYgaJpZM4XxUni
.

Great Aaron!! I am very happy with your feedback.
Thanks.
Williano
Em sex, 9 de nov de 2018 às 21:30, Aaron Riedener<EMAIL_ADDRESS>escreveu:

Hello Williano
Thank you very much for the huge translation work you have done.
I will need to rework the files and then we can make a pull request to the
master.
As i have to rework the files manually it would be great when you could
check the result on the demo-server again.
I keep you informed when everything is done
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/scaphilo/koalixcrm/issues/220#issuecomment-437527903,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGktM0-K5tOn1Fb7IW7C7Zof3AHNdUGHks5uthAsgaJpZM4XxUni
.


Create Custom fields automatically when returned by llm

As in #33 there seems to be an error, when custom fields are not set.

[x] Create custom fields on startup/on the fly when using doclytics
[x] expand documentation

Hi @B-urb . Not sure how can I enable this feature?

Right now, you would have to build the docker image from the feature/automatically-create-customfields branch. I will complete this feature soon and then it will be available from the registry as a release candidate.

@tural-ali the latest rc version includes an early working version of this. You just have to set the Mode environment variable to 1


Application Insight - ITelemetryInitializer - Exception

I am trying to get the MultiTenantContext from the IHttpContextAccessor during an ITelemetryInitializer.Initialize of ApplicationInsight to add the tenant properties (name and id) but I still get an exception of type ArgumentNullException during the GetMultiTenantContext.
Is there a way to get this information at this time?
Step to reproduce the problem:
Includes Nuget to your WebApi

Microsoft.ApplicationInsight.ASpNetCore
Finbuckle.MultiTenant.AspNetCore

Route on controller
[Route("{tenant=}/[controller]")]

public class TenantInitializer : ITelemetryInitializer
    {
        private readonly IHttpContextAccessor _httpContextAccessor;

        public IntelliumAppInsightsInitializer(IHttpContextAccessor httpContextAccessor)
        {
            _httpContextAccessor = httpContextAccessor ?? throw new ArgumentNullException("httpContextAccessor");
        }

        public void Initialize(ITelemetry telemetry)
        {

            //the following line raises an exception
			var tenantInfo = _httpContextAccessor.HttpContext
                                                                                ?.GetMultiTenantContext<TenantInfo>()
                                                                                ?.TenantInfo;
                                                               if (tenantInfo != null)
                                                               {
                                                                               telemetry.Context.GlobalProperties.TryAdd("Tenant Id", tenantInfo.Id);
                                                                               telemetry.Context.GlobalProperties.TryAdd("Tenant Name", tenantInfo.Name);
                                                               }
        }
    }

            Startup.cs

namespace WebApplication1
{
    public class Startup
    {
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;
        }

        public IConfiguration Configuration { get; }

        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddApplicationInsightsTelemetry();
            services.AddSingleton<ITelemetryInitializer, AppInsightsInitializer>();
            services.AddControllers();

            services.AddMultiTenant<TenantInfo>()
                .WithConfigurationStore()
                .WithRouteStrategy();
        }

        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseHttpsRedirection();

            app.UseRouting();
            app.UseMultiTenant();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
                endpoints.MapControllerRoute("default", "{__tenant__=}/{controller=Home}/{action=Index}");
            });
        }
    }
}

@bedeche1 I haven't seen this before, but something that jumps out is services.AddSingleton<ITelemetryInitializer, AppInsightsInitializer>(); which means it gets initialized once and typically tenant changes per request. Would AddScoped work for that service or is that not how it works with AppInsights?

I've tried this before to put AddScoped instead of AddSingleton but ApplicationInsight requires it to be a services.AddSingleton <ITelemetryInitializer, AppInsightsInitializer> (). I did not specify I am using AspNetCore 3.1

Yes, I ran into a similar thing a few weeks ago. Luckily, I have the tenant name inside of a claim as well so was able to pull from that and it works well. I didn't see any other way around it with it being Singleton.

Can you try moving the
services.AddApplicationInsightsTelemetry();
            services.AddSingleton<ITelemetryInitializer, AppInsightsInitializer>();

after Add MultiTenant? It's possible that initialize is called there and the services for registered yet that Finbuckle uses. I'll try to recreate in a project and dig into the error further.

I just tried again so you could see the stack. Honestly pulling it out of the claim worked better for me anyways so I didn't dig too deep and moved on. That telemetryinitializer is the last thing in my ConfigureServices
So it's tanking on: https://github.com/Finbuckle/Finbuckle.MultiTenant/blob/612889bdddce4ab9143bc2f0988145fce12afa35/src/Finbuckle.MultiTenant.AspNetCore/Extensions/HttpContextExtensions.cs#L31
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Finbuckle.MultiTenant.FinbuckleHttpContextExtensions.GetMultiTenantContext[T](HttpContext httpContext)
at CloudApp.Api.Filters.HttpContextRequestTelemetryInitializer.Initialize(ITelemetry telemetry) in HttpContextRequestTelemetryInitializer.cs:line 33
at Microsoft.ApplicationInsights.TelemetryClient.Initialize(ITelemetry telemetry)

Thanks for the suggestions, I will abandon the use of _httpContextAccessor.HttpContext? .GetMultiTenantContext <TenantInfo> () ?. TenantInfo; for now and I'll instantiate and directly use the basepathstrategy to get the idetifier. the important thing is to have at least one piece of information that allows me to identify my tenant.

I’m going to still look a little deeper into this. I’ll let you know what I find out.

On Dec 11, 2020, at 4:21 AM, bedeche1<EMAIL_ADDRESS>wrote:

Thanks for the suggestions, I will abandon the use of _httpContextAccessor.HttpContext? .GetMultiTenantContext  () ?. TenantInfo; for now and I'll instantiate and directly use the basepathstrategy to get the idetifier. the important thing is to have at least one piece of information that allows me to identify my tenant.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

@bedeche1 If you still wanna use Application Insights, you could do the following.
app.Use(async (context, next) =>
{
    var multiTenantContextAccessor = context.RequestServices.GetRequiredService<IMultiTenantContextAccessor>();
    var requestTelemetry = context.Features.Get<Microsoft.ApplicationInsights.DataContracts.RequestTelemetry>();

    // Application insights
    requestTelemetry.Context.User.AccountId = multiTenantContextAccessor.MultiTenantContext?.TenantInfo?.Id ?? null;
    requestTelemetry.Context.User.AuthenticatedUserId = context.User.Identity.IsAuthenticated ? context.User.GetUserId().ToString() : null;
    requestTelemetry.Properties.TryAdd("TenantUrl", multiTenantContextAccessor.MultiTenantContext?.TenantInfo?.Identifier);

    await next.Invoke();
});

Just make sure its called after app.UseMultiTenant();

@bedeche1 If you still wanna use Application Insights, you could do the following.
app.Use(async (context, next) =>
{
    var multiTenantContextAccessor = context.RequestServices.GetRequiredService<IMultiTenantContextAccessor>();
    var requestTelemetry = context.Features.Get<Microsoft.ApplicationInsights.DataContracts.RequestTelemetry>();

    // Application insights
    requestTelemetry.Context.User.AccountId = multiTenantContextAccessor.MultiTenantContext?.TenantInfo?.Id ?? null;
    requestTelemetry.Context.User.AuthenticatedUserId = context.User.Identity.IsAuthenticated ? context.User.GetUserId().ToString() : null;
    requestTelemetry.Properties.TryAdd("TenantUrl", multiTenantContextAccessor.MultiTenantContext?.TenantInfo?.Identifier);

    await next.Invoke();
});

Just make sure its called after app.UseMultiTenant();

I haven't found a better approach than what @Nisden shows above. App Insights seems to hide a lot of its setup behind the scenes so its hard to say. I'm going to close this out for now. Thanks!


Unable to set default value of String-typed option with help and completion

Let's say, it's possible to configure a String-typed option:

with help text;
with completion;
with default value.

In fact, we can do either two of these, but combining three of these will cause compilation failure.
ArgumentParser version: 1.0.2, main
Swift version: swift-driver version: 1.26.21 Apple Swift version 5.5.2 (swiftlang-13<IP_ADDRESS> clang-13<IP_ADDRESS>)
Checklist

[x] If possible, I've reproduced the issue using the main branch of this package
[x] I've searched for existing GitHub issues

Steps to Reproduce
Minimal code to reproduce:
import ArgumentParser

struct Run: ParsableCommand {
    @Option(help: "", completion: .file())
    var string: String = ""

    func run() {}
}

Similar bug with String?:
@Option(completion: .file())
var string: String? = ""

Expected behavior
Compile successfully.
Actual behavior
main.swift:5:26: error: cannot convert value of type 'String' to expected argument type '[String]'
    var string: String = ""
                         ^
main.swift:5:9: error: property type 'String' does not match 'wrappedValue' type 'Array<String>'
    var string: String = ""
        ^~~~~~
main.swift:5:9: note: cannot automatically synthesize 'Decodable' because '<<error type>>' does not conform to 'Decodable'
    var string: String = ""
        ^
main.swift:3:8: error: type 'Run' does not conform to protocol 'Decodable'
struct Run: ParsableCommand {
       ^
Swift.Decodable:2:5: note: protocol requires initializer 'init(from:)' with type 'Decodable'
    init(from decoder: Decoder) throws
    ^

Workaround
For anyone who encountered such error, you can workaround with a non-op transform:
// ✅ It works!
@Option(help: "", completion: .file(), transform: {String($0)})
var string: String = ""

Oooof, it looks like we have some parameter order inconsistency with the Option initializers — the one you want has help after completion. This code works instead:
@Option(completion: .file(), help: "")
var string: String = ""

We should deprecate that initializer and add a new one that has the parameters in the correct order.

Hey, me again 😄
I allowed myself to create a PR, following your recommendations.

Resolved in #391 🎉


Feature: alternative "using:" syntax to include namespace to XAML file

Currently Avalonia supports WPF'style namespaces in XAML files, using clr-namespace with assembly.
With that we need to provide long path to assemblies, if namespace isn't contained in current one.
UWP and XF supports another syntax, using "using:" keyword (for UWP it is only one available syntax).
With this we don't need to provide assembly, instead it will internally search for namespace in referenced projects and packages.
Proposal syntax:
<Styles xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="using:System"
        xmlns:controls="using:MyNamespaceInAnotherAssembly">
  <Style Selector="controls|MyControl" />
</Window>

UWP docs:
https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/xaml-namespaces-and-namespace-mapping#mapping-custom-types-to-xaml-namespaces-and-prefixes
Xamarin Forms docs:
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/namespaces#declaring-namespaces-for-types

In UWP it also works fine, when one namespace is used in multiple assemblies.
For instance, I can reference Microsoft.UI.Xaml package and use controls from its with namespace.
And then I can create new UserControl in local assembly but with same namespace - Microsoft.UI.Xaml.Controls, and reuse same namespace definition:
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:controls="using:Microsoft.UI.Xaml.Controls">
  <controls:NavigationView >
    <controls:NavigationView.Content>
       <controls:CustomControl />
    </controls:NavigationView.Content>
   </controls:NavigationView >
</Page>

namespace Microsoft.UI.Xaml.Controls
{
    public class CustomControl : UserControl
    {
        public CustomControl()
        {
            Content = new Border
            {
                Background = new SolidColorBrush(Colors.Azure),
                Width = 100,
                Height = 100,
            };
        }
    }
}

yes, it should be exist, but that feature must be in the xaml-compiler, 'cause if that executes in the run-time would be very slow

I added this to the WinUI prototype Xaml compiler based on XamlX, and this is pretty easy to add to the XamlX library.

maybe additional to using keyword it is possible to add open as well?
xmlns:controls="open:Microsoft.UI.Xaml.Controls"

@FoggyFinder what are the semantics of the open syntax and how do they differ from the other syntax?

I propose open as a synonym to using with exactly the same meaning.
Context:
open is import declaration in F#.
Import Declarations: The open Keyword
C#
using System.IO;`

F#
open System.IO

@jkoritzinsky is it possible to assume xmlsn:test="System.Diagnostic" was a clr namespace?

"using:" is well known UWP and XF syntax not only for C#, but also for F#/VB/C++ projects as well.
Need to mention, that "using:" isn't just a synonym for "clr-namespace:", but also provides some benefits with automatic assemblies lookup, when "clr-namespace" looks for current assembly or fails, if it wasn't provided explicitly.
On other hand we can just extend "clr-namespace:", so no need to maintain new syntax.
xmlsn:test="System.Diagnostic" could be parsed correctly in XamlX, but it will be completely new syntax for XAML language, and namespace name should be a valid URI, when "System.Diagnostic" doesn't looks like (not sure though).

"using:" is well known UWP and XF syntax not only for C#, but also for F#/VB/C++ projects as well.

Just because UWP doesn't care about anything except C#. To use it properly (release mode = .net native) you have to edit gatekeeper config manually. At least for F# for sure. I doubt the situation is better for VB (which is literally dead for Microsoft) and C++/CLI.
Also not all developers who use Avalonia have previous UWP/XF/WPF background, besides there are features that specific only to Avalonia already (at least I think so).
From the start Avalonia has better F# support than the rest of .net - ui - frameworks. Providing one alternative synonym for keyword doesn't sound like a big deal but it allows write more idiomatic code.

I love it. Done in latest 0.10-preview6.

How do you use this? Why is there no documentation?
<UserControl xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:views="using:Abc.UI.Views"
        x:Class="Abc.UI.Views.MainView">
	<DockPanel>
		<DockPanel>
			<!-- This doesn't work. Namespace is:  Abc.UI.Views.Sidebar -->
			<views:Sidebar.ActivityBarView DockPanel.Dock="Left" Width="50"/>

			<!-- This also doesn't work. -->
			<views:ActivityBarView DockPanel.Dock="Left" Width="50"/>
		</DockPanel>
	</DockPanel>
</UserControl>

I don't understand how to resolve views, if they are grouped under directories, like this:
- Abc.UI
 - Views
  - Sidebar
   - ActivityBarView.axaml
  - MainView.axaml

@ClassyCircuit I believe Sidebar folder adds a new Namespace in your case? Either move SideBar into Views namespace or add xmlns:SidebarViews="using:Abc.UI.Views.Sidebar"

@timunie Yes, sidebar folder adds another namespace. I am providing the root folder for the views and I was expecting that "using" statement would allow searching for namespaces within it.
I thought "using" replaced "clr-namespace", so that it actually searched in the namespaces under it. What is the usecase for the "using" statement here then?

https://docs.avaloniaui.net/docs/basics/user-interface/introduction-to-xaml

From that link it seems there is no difference between "using" and "clr-namespace", is that correct? Why do we need "using" then?

iirc clr-ns requires Assembly to be specified when not in your main prj, but using does not require it. Other than that these are more or less the same.

Why do we need "using" then?
Why not? I like that syntax more tbh. For me it's shorter to write and easier to remember.


Doc: migration mintlify to docusaurus

Description:
Documentation migration from mintlify to docusaurus.

@ashrafchowdury added vercel deployments (https://agenta-documentation.vercel.app/)


C# Syntax Highlighter gets confused by cell level using statements.

Describe the bug
Having "using" statements at the top level in a cell confuses the syntax highlighter making stuff look weird.
Please complete the following:
Which version of .NET Interactive are you using? There are a few ways to find this out:
Version: 1.0.215503+493ca2a0b7dd775fb10f53257ea7d5c25350a1ad
Build date: 2021-03-06T09:58:11.2109025Z

OS

[x ] Windows 10
[ ] macOS
[ ] Linux (Please specify distro)
[ ] iOS
[ ] Android

Browser

[ ] Chrome
[ ] Edge
[ ] Firefox
[ ] Safari

Frontend

[ ] Jupyter Notebook
[ ] Jupyter Lab
[ ] nteract
[x] Visual Studio Code
[ ] Other (please specify)

Screenshots
If applicable, add screenshots to help explain your problem.

We use the default C# highlighting, and unfortunately they have this same bug so we inherit it, too.  See dotnet/csharp-tmLanguage#126.
Leaving this issue open for visibility and tracking.


Does not seems to export anything to exporter

Tldr:
Everything that happens before axum starts are sent to my exporter, everything after doesn't.
#[tokio::main]
async fn main() {
    init_tracer();

    let state = state::AppState::default(); // <--- This is sent to Grafana Tempo
    state.start_ws_observer_task(); // <--- This is sent to Grafana Tempo
    let config = state.config();  // <--- This is sent to Grafana Tempo

// After that, nothing is sent
    let addr = SocketAddr::from((config.env.listening_ip, config.env.listening_port));
    info!("Listening on: {}", addr);
    let app = Router::new()
        .nest("/api/v1", handlers::router())
        .with_state(state.clone())
        .layer(opentelemetry_tracing_layer());
    axum::Server::bind(&addr)
        .serve(app.into_make_service_with_connect_info::<SocketAddr>())
        .with_graceful_shutdown(shutdown_signal(state))
        .await
        .unwrap();
}

fn init_tracer() {
    let env = config::ENV::new();

    let env_filter = EnvFilter::try_from_default_env()
        .or_else(|_| EnvFilter::try_new("info,axum_tracing_opentelemetry=info"))
        .unwrap();

    let exporter = opentelemetry_otlp::new_exporter()
        .tonic()
        .with_endpoint(env.opentelemetry_endpoint.clone());

    let config =
        opentelemetry::sdk::trace::config().with_resource(opentelemetry::sdk::Resource::new(vec![
            opentelemetry::KeyValue::new("service.name", "gateway"),
            opentelemetry::KeyValue::new("service.namespace", "cloud-conference"),
        ]));

    let tracer = opentelemetry_otlp::new_pipeline()
        .tracing()
        .with_exporter(exporter)
        .with_trace_config(config)
        .install_batch(opentelemetry::runtime::Tokio)
        .expect("Failed to create opentelemtry pipeline");

    let telemetry = tracing_opentelemetry::layer().with_tracer(tracer.clone());

    let formatting_layer = BunyanFormattingLayer::new("gateway".to_string(), std::io::stdout);

    axum_tracing_opentelemetry::init_propagator().unwrap();

    let subscriber = Registry::default()
        .with(env_filter)
        .with(telemetry)
        .with(JsonStorageLayer)
        .with(formatting_layer);

    tracing::subscriber::set_global_default(subscriber)
        .expect("Failed to install `tracing` subscriber.");
}

Here is an exemple of a log, as you can see the trace_id exists, but the trace is not sent to Tempo for some reason, it was working fine when I used actix web with the exact same opentelemetry/tracing config
{"v":0,"name":"gateway","msg":"[HTTP REQUEST - START]","level":30,"hostname":"gateway-0","pid":1,"time":"2023-03-04T18:16:58.580886678Z","target":"axum_tracing_opentelemetry::middleware::trace_extractor","line":161,"file":"/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/axum-tracing-opentelemetry-0.10.0/src/middleware/trace_extractor.rs","http.method":"GET","http.route":"","http.flavor":"1.1","http.target":"/api/v1/private/liveness","http.scheme":"HTTP","http.client_ip":"<IP_ADDRESS>:45702","http.user_agent":"kube-probe/1.24","otel.kind":"server","trace_id":"a7d4105269dd7e48a25d7849e9df333d","otel.name":"GET ","http.host":"<IP_ADDRESS>:8080"}
{"v":0,"name":"gateway","msg":"[HTTP REQUEST - END]","level":30,"hostname":"gateway-0","pid":1,"time":"2023-03-04T18:16:58.581061857Z","target":"axum_tracing_opentelemetry::middleware::trace_extractor","line":161,"file":"/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/axum-tracing-opentelemetry-0.10.0/src/middleware/trace_extractor.rs","elapsed_milliseconds":0,"http.method":"GET","http.route":"","http.flavor":"1.1","http.target":"/api/v1/private/liveness","http.scheme":"HTTP","http.client_ip":"<IP_ADDRESS>:45702","http.user_agent":"kube-probe/1.24","otel.kind":"server","trace_id":"a7d4105269dd7e48a25d7849e9df333d","otel.name":"GET ","http.host":"<IP_ADDRESS>:8080","http.status_code":"204","otel.status_code":"OK"}

Here you can see, I do receive traces, but only about things that happens before axum starts, or about traces I create manually in my websocket task.

If I search by trace_id, with the one that was in the log I provided, here is what happens:

Into the route of axum, Did you add the layer  .layer(opentelemetry_tracing_layer()) ?
see README, the crate provide 2 axum layers:

1 to create trace (new or from remote) + span
1 (optional) to output trace info into the header of the response  (useful only for debug, dev)

From your init_tracer above, you didn't define explicitly the sampler. I don't know what is the expected behavior in this case.
(eg in version before 0.10 the crate define the sampler to Always when you use the helper from the crate for the setup, for version 0.10, the value is based on the environment with default following Opentelementry spec)
The sampler define what is exported or not,
As your exporter seams to be correctly configured as you receive some trace, I only see the sampler as "blocker".

The default behavior is parentbased(always_on)  via opentelemetry crate (like in your case) or via helper of this crate.  (https://docs.rs/opentelemetry/0.18.0/opentelemetry/sdk/trace/enum.Sampler.html#variant.ParentBased). Trace created by this crate are flagged as remote (and not root iirc), so except if the caller create a trace to report, nothing will be exported (I guess)
You can try with a w3c tracecontext like traceparent: 00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01 (as header) to see if it is reported (the flag 01  at end)

Indeed it works with
.with_sampler(opentelemetry::sdk::trace::Sampler::AlwaysOn);

Thank you for the detailed answer 😄.
I'm just a bit confused on why it was working fine when I used tracing-actix-web without setting a sampler.


Text Update

The syntax in the document doesn't reflect the correct syntax that can be used. I have updated the syntax.
Problem: https://github.com/MicrosoftDocs/windows-itpro-docs/issues/8989

@JohanFreelancer9 - kindly do the copy editor review for this PR. Thanks.

@JohanFreelancer9 - kindly do the copy editor review for this PR. Thanks.

Just a note about the preceding documentation: Line 430 states the following:
If you don’t use proxy servers, you must also include the "," delimiter just before the "|".
The change made in this PR seems to go against that statement. Should it be removed, if testing has proved it to be incorrect?

Just a note about the preceding documentation: Line 430 states the following:
If you don’t use proxy servers, you must also include the "," delimiter just before the "|".
The change made in this PR seems to go against that statement. Should it be removed, if testing has proved it to be incorrect?

@Dansimp, PR has been copyedited and is ready for final review, could you please check and merge? Thanks!


Add confluence extension

Description

Screencast

Checklist

[ ] I read the extension guidelines
[ ] I read the documentation about publishing
[ ] I ran npm run build and tested this distribution build in Raycast
[ ] I checked that files in the assets folder are used by the extension itself
[ ] I checked that assets used by the README are placed outside of the metadata folder

Please ignore this was a test