text:
How to use WebSocketMaker with cupertino_http

I'd like to use cupertino_http for underlying websocket implementation.
It supports websocket connections as described here. In my graphql client I'm using TransportWebSocketLink. How can I use CupertinoWebSocket instead of gql's WebSocketChannel?
import 'package:gql_websocket_link/gql_websocket_link.dart' as gql_ws;

    final wsLink = gql_ws.TransportWebSocketLink(
      gql_ws.TransportWsClientOptions(
        socketMaker: gql_ws.WebSocketMaker.generator(() async {
          final socket = await CupertinoWebSocket.connect(
            Uri.parse(baseWs),
          );
         // not sure how to proceed

        }),
        retryWait: (retries) {
          _log.i('Retrying websocket connection in 2 sec, attempt $retries');
          return Future.delayed(const Duration(seconds: 2));
        },
        connectionParams: () async {
          var token = await _getToken();

          return {
            'headers': {
              'Authorization': token,
              'Hasura-Client-Name': 'flutter',
              'Content-Type': 'application/json',
            },
          };
        },
      ),
    );

Hi!
The TransportWebSocketLink uses web_socket_channel to use a single WebSocket implementation for both web and IO.
I think you should be able to use the adapter of this package in order to use the cupertino implementation like
 socketMaker: WebSocketMaker.generator(() async {
      final socket = CupertinoWebSocket.connect(
        Uri.parse("url"),
      );
      return AdapterWebSocketChannel(socket);
    })

````

Thanks, I was able to achieve it as follows:
import 'dart:async';
import 'dart:io';
import 'dart:typed_data';

import 'package:async/async.dart' as async;
import 'package:cupertino_http/cupertino_http.dart';
import 'package:gql_websocket_link/gql_websocket_link.dart' as gql_ws;
import 'package:graphql/client.dart';
import 'package:http/http.dart';
import 'package:stream_channel/stream_channel.dart' as sc;
import 'package:web_socket/web_socket.dart' as ws;
import 'package:web_socket_channel/web_socket_channel.dart' as wsc;

final wsLink = gql_ws.TransportWebSocketLink(
  gql_ws.TransportWsClientOptions(
    socketMaker: gql_ws.WebSocketMaker.generator(() async {
      return AdapterWebSocketChannel(
        CupertinoWebSocket.connect(
          Uri.parse(baseWs),
          protocols: ['graphql-transport-ws'],
          config: URLSessionConfiguration.defaultSessionConfiguration(),
        ),
      );
    }),
  ),
);

// adjusted from https://github.com/dart-lang/web_socket_channel/blob/master/lib/adapter_web_socket_channel.dart#L135
class AdapterWebSocketChannel extends sc.StreamChannelMixin implements wsc.WebSocketChannel {
  @override
  String? get protocol => _protocol;
  String? _protocol;

  @override
  int? get closeCode => _closeCode;
  int? _closeCode;

  @override
  String? get closeReason => _closeReason;
  String? _closeReason;

  /// The close code set by the local user.
  ///
  /// To ensure proper ordering, this is stored until we get a done event on
  /// [StreamChannelController.local]`.stream`.
  int? _localCloseCode;

  /// The close reason set by the local user.
  ///
  /// To ensure proper ordering, this is stored until we get a done event on
  /// [StreamChannelController.local]`.stream`.
  String? _localCloseReason;

  /// Completer for [ready].
  final _readyCompleter = Completer<void>();

  @override
  Future<void> get ready => _readyCompleter.future;

  @override
  Stream get stream => _controller.foreign.stream;

  final _controller = sc.StreamChannelController<Object?>(sync: true, allowForeignErrors: false);

  @override
  late final wsc.WebSocketSink sink = _WebSocketSink(this);

  /// Creates a new WebSocket connection.
  ///
  /// If provided, the [protocols] argument indicates that subprotocols that
  /// the peer is able to select. See
  /// [RFC-6455 1.9](https://datatracker.ietf.org/doc/html/rfc6455#section-1.9).
  ///
  /// After construction, the [AdapterWebSocketChannel] may not be
  /// connected to the peer. The [ready] future will complete after the channel
  /// is connected. If there are errors creating the connection the [ready]
  /// future will complete with an error.
  factory AdapterWebSocketChannel.connect(Uri url, {Iterable<String>? protocols}) =>
      AdapterWebSocketChannel(ws.WebSocket.connect(url, protocols: protocols));

  // Construct a [WebSocketWebSocketChannelAdapter] from an existing
  // [WebSocket].
  AdapterWebSocketChannel(FutureOr<ws.WebSocket> webSocket) {
    Future<ws.WebSocket> webSocketFuture;
    if (webSocket is ws.WebSocket) {
      webSocketFuture = Future.value(webSocket);
    } else {
      webSocketFuture = webSocket;
    }

    webSocketFuture.then((webSocket) {
      webSocket.events.listen((event) {
        switch (event) {
          case ws.TextDataReceived(text: final text):
            _controller.local.sink.add(text);
          case ws.BinaryDataReceived(data: final data):
            _controller.local.sink.add(data);
          case ws.CloseReceived(code: final code, reason: final reason):
            _closeCode = code;
            _closeReason = reason;
            _controller.local.sink.close();
        }
      });
      _controller.local.stream.listen((obj) {
        try {
          switch (obj) {
            case final String s:
              webSocket.sendText(s);
            case final Uint8List b:
              webSocket.sendBytes(b);
            case final List<int> b:
              webSocket.sendBytes(Uint8List.fromList(b));
            default:
              throw UnsupportedError('Cannot send ${obj.runtimeType}');
          }
        } on ws.WebSocketConnectionClosed {
          // There is nowhere to surface this error; `_controller.local.sink`
          // has already been closed.
        }
      }, onDone: () async {
        try {
          await webSocket.close(_localCloseCode, _localCloseReason);
        } on ws.WebSocketConnectionClosed {
          // It is not an error to close an already-closed `WebSocketChannel`.
        }
      });
      _protocol = webSocket.protocol;
      _readyCompleter.complete();
    }, onError: (Object e) {
      Exception error;
      if (e is TimeoutException) {
        // Required for backwards compatibility with `IOWebSocketChannel`.
        error = e;
      } else {
        error = wsc.WebSocketChannelException.from(e);
      }
      _readyCompleter.completeError(error);
      _controller.local.sink.addError(error);
      _controller.local.sink.close();
    });
  }
}

/// A [WebSocketSink] that tracks the close code and reason passed to [close].
class _WebSocketSink extends async.DelegatingStreamSink implements wsc.WebSocketSink {
  /// The channel to which this sink belongs.
  final AdapterWebSocketChannel _channel;

  _WebSocketSink(AdapterWebSocketChannel channel)
      : _channel = channel,
        super(channel._controller.foreign.sink);

  @override
  Future close([int? closeCode, String? closeReason]) {
    _channel._localCloseCode = closeCode;
    _channel._localCloseReason = closeReason;
    return super.close();
  }
}

authors: knaeckeKami orestesgaolin

repo: gql-dart/gql


text:
Only enable generation outgoing variants for Test Suites if feature preview flag is set

Hide generation of outgoing variants for Test Suites behind a feature preview flag.

Add a mechanism to variant creation to mark them as unstable/incubating.

This should automatically ban them from publishing.
This should be visible in the outgoing variants report.

This is to be done after #19008.

Replaced by https://github.com/gradle/gradle/issues/19231

source: gharchive/issue

repo: gradle/gradle

license_type: permissive

license_source: github-api


text:
A quite odd configuration cache problem

Current Behavior
Put this in your settings.gradle.kts
val value = "world"
gradle.lifecycle.beforeProject {
    project.extra["hello"] = value
}

This will fail:
* What went wrong:
Failed to notify build listener.
> Failed to isolate 'GradleLifecycle' action: cannot serialize Gradle script object references as these are not supported with the configuration cache

However there is an intresting workaround:
if (true) {
    val value = "world"
    gradle.lifecycle.beforeProject {
        project.extra["hello"] = value
    }
}

Surround the offending code using if (true) and gradle will stop complaining...
Expected Behavior
Well this should be fixed or if it cant be fixed the error message could be more helpfull...
Context (optional)
No response
Self-contained Reproducer Project
intellijBug.zip
Gradle version
8.11
Build scan URL (optional)
No response
Your Environment (optional)
No response

The issue is in the backlog of the relevant team and is prioritized by them.

This issue will be closed as a duplicate of

#22879

Please add your use case and 👍 to that issue.
If you think our analysis is wrong, please provide us with more detailed information explaining why.

This is a known peculiarity of the Kotlin script compilation, which we'll eventually address.

authors: mlopatkin reinsch82 tg-freigmbh


text:
Project will not compile without transitive dependency exclusion when I believe it should.

I have a project in which I have a dependency on a recent version of Guava, but the presence of other dependencies that have a dependency on an older version of Guava seem to override my version with theirs.
Expected Behavior

The project should compile - ./gradlew compileJava should succeed.
Current Behavior

Without an explicit transitive dependency exclusion the task fails. The task succeeds when I add exclude group: 'com.google.guava' for the module with an older dependency. Here's the failure output:
$ ./gradlew compileJava

> Task :compileJava FAILED
<...>/test-gradle-transitive-dependencies/src/main/java/Main.java:6: error: cannot find symbol
        Throwables.throwIfInstanceOf(new Exception(), RuntimeException.class);
                  ^
  symbol:   method throwIfInstanceOf(Exception,Class<RuntimeException>)
  location: class Throwables
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s
1 actionable task: 1 executed

Context

I'm trying to use a new version of Guava in a project that has dependencies that require other versions of Guava.
Steps to Reproduce (for bugs)

I have a minimal working example of a single Java file and build.gradle:
import com.google.common.base.Throwables;

public class Main {
    public static void main(String... args) {
        Throwables.throwIfInstanceOf(new Exception(), RuntimeException.class);
    }
}

apply plugin: 'java'

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.google.guava:guava:23.5-jre'
    compileOnly('com.google.errorprone:error_prone_core:2.0.5') {
        exclude group: 'com.google.guava'
    }
}

The project can be found here: https://github.com/andrewparmet/test-gradle-transitive-dependencies
If I comment out the exclude group line compilation fails. I also tried to use a resolution strategy to force versions of the Guava module to version 23.5-jre but this also failed. I include the build.gradle file I used with this attempt as build.gradle.alt. It seems to be related to the error-prone module, as other modules do not cause this problem. I appreciate any insight into why this is going wrong.
Your Environment

Build scan URL:
https://gradle.com/s/3mnzxioz4ffcg

This problem did not occur on Gradle 3.5 or 3.5.1, and first occurs in version 4.0.

The problem is in the version of error-prone you're using.  Before 2.0.16, the error-prone-core jar also contained a copy of Guava.  See related https://github.com/google/error-prone/issues/501
The reason exclude seemed to fix the problem is that it changed the ordering of the classpath.  The exclusion would put the newer Guava jar ahead of the error-prone-core jar.  When the error-prone-core jar is ahead of the Guava jar, you get an old copy of Throwables.
Can you switch to use a newer version of error-prone?

Sure, I can use a newer version. I'm not quite sure what you mean when you say it contained a copy of Guava - the dependency tree shows that its version of Guava should be forced up to my required version. I didn't realize this has something to do with the classpath ordering?

If you look at the contents of the error prone core jar for 2.0.5, you'll see Guava classes inside of it. It doesn't matter which version of Guava is chosen if the Guava jar appears after the error prone core jar in the classpath.

Ah, I was looking through various POMs and must have missed some configuration somewhere that includes the Guava source. Thanks!

authors: andrewparmet big-guy


text:
Exception: cache.properties does not exist

Seeing gradle build cache throwing error on cache.properties
Expected Behavior
No error on build cache operations. This issue does not affect the end build result. However, it does produce a lot of exceptions which makes the log confusing.
Current Behavior
Seeing gradle throwing
16:16:03 org.gradle.api.GradleException: Build cache entry ece8e0a901dbcc0047c3a9c4e3433f81 from local build cache is invalid
16:16:03 	at org.gradle.caching.internal.controller.DefaultBuildCacheController.load(DefaultBuildCacheController.java:106)
16:16:03 	at org.gradle.api.internal.tasks.execution.SkipCachedTaskExecuter.execute(SkipCachedTaskExecuter.java:79)
16:16:03 	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
16:16:03 	at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
16:16:03 	at org.gradle.api.internal.tasks.execution.ResolveBuildCacheKeyExecuter.execute(ResolveBuildCacheKeyExecuter.java:66)
16:16:03 	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
16:16:03 	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
16:16:03 	at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
16:16:03 	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
16:16:03 	at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
16:16:03 	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
16:16:03 	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
16:16:03 	at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
16:16:03 	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
16:16:03 	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:256)
16:16:03 	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
16:16:03 	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
16:16:03 	at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
16:16:03 	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
16:16:03 	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:249)
16:16:03 	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238)
16:16:03 	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
16:16:03 	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
16:16:03 	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
16:16:03 	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
16:16:03 	at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:663)
16:16:03 	at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:597)
16:16:03 	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
16:16:03 	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
16:16:03 	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
16:16:03 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
16:16:03 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
16:16:03 	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
16:16:03 	at java.lang.Thread.run(Thread.java:748)
16:16:03 Caused by: org.gradle.api.UncheckedIOException: java.io.FileNotFoundException: /dev/shm/android-build-cache/cache.properties (No such file or directory)
16:16:03 	at org.gradle.util.GUtil.loadProperties(GUtil.java:211)
16:16:03 	at org.gradle.cache.internal.DefaultPersistentDirectoryCache$Initializer.requiresInitialization(DefaultPersistentDirectoryCache.java:87)
16:16:03 	at org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess.incrementLockCount(LockOnDemandCrossProcessCacheAccess.java:107)
16:16:03 	at org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess.withFileLock(LockOnDemandCrossProcessCacheAccess.java:87)
16:16:03 	at org.gradle.cache.internal.DefaultCacheAccess.withFileLock(DefaultCacheAccess.java:198)
16:16:03 	at org.gradle.cache.internal.DefaultPersistentDirectoryStore.withFileLock(DefaultPersistentDirectoryStore.java:163)
16:16:03 	at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.withFileLock(DefaultCacheFactory.java:192)
16:16:03 	at org.gradle.caching.local.internal.DirectoryBuildCacheService.loadLocally(DirectoryBuildCacheService.java:96)
16:16:03 	at org.gradle.caching.internal.controller.service.DefaultLocalBuildCacheServiceHandle.load(DefaultLocalBuildCacheServiceHandle.java:49)
16:16:03 	at org.gradle.caching.internal.controller.DefaultBuildCacheController.load(DefaultBuildCacheController.java:104)
16:16:03 	... 33 more
16:16:03 Caused by: java.io.FileNotFoundException: /dev/shm/android-build-cache/cache.properties (No such file or directory)
16:16:03 	at java.io.FileInputStream.open0(Native Method)
16:16:03 	at java.io.FileInputStream.open(FileInputStream.java:195)
16:16:03 	at java.io.FileInputStream.<init>(FileInputStream.java:138)
16:16:03 	at org.gradle.util.GUtil.loadProperties(GUtil.java:204)
16:16:03 	... 42 more

Context
The error only seems to happen on CI machines where /dev/shm/android-build-cache is shared among multiple executors.
For example:
/home/jenkins/workspace_0 and /home/jenkins/workspace_1 are separate repos both running gradle, but they use /dev/shm/android-build-cache as their shared local cache location.
Steps to Reproduce (for bugs)

This only happens from time to time, so no consistent way to repro. I was wondering if the right assumption were made on reading/writing cache.properties in a concurrent context.
Your Environment
Centos7

A bit more context: potentially related to our periodically manual cleanup because we are not consuming #4950 yet, that a gradle build could be in flight while the local build cache directory is removed.
Not urgent issue, but I think the error handling can be more graceful and should not block further cache operations.

As you say, #4950 will solve the problems with periodical cleanup you might have currently. Once it ships with Gradle 4.8 there won't be need for external cleanup. Meanwhile, you could make sure that your cleanup script does not delete the cache.properties file.

authors: lptr wisechengyi


text:
Liquibase could not start correctly, your database is NOT ready: liquibase.exception.SetupException error in JHipster gradle project

i am getting Liquibase could not start correctly, your database is NOT ready: liquibase.exception.SetupException error  while running the gradle project in Jhipster.
liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: Error parsing line 2 column 427 of config/liquibase/changelog/20181013183900_migrate_from_v4.xml: schema_reference.4: Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
	at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:27)
	at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:229)
	at liquibase.Liquibase.update(Liquibase.java:202)
	at liquibase.Liquibase.update(Liquibase.java:192)
	at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:431)
	at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:388)
	at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.initDb(AsyncSpringLiquibase.java:103)
	at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.lambda$afterPropertiesSet$0(AsyncSpringLiquibase.java:83)
	at io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor.lambda$createWrappedRunnable$1(ExceptionHandlingAsyncTaskExecutor.java:68)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: liquibase.exception.SetupException: Error parsing line 2 column 427 of config/liquibase/changelog/20181013183900_migrate_from_v4.xml: schema_reference.4: Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
	at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:322)
	at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:282)
	at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25)
	... 11 common frames omitted
Caused by: liquibase.exception.ChangeLogParseException: Error parsing line 2 column 427 of config/liquibase/changelog/20181013183900_migrate_from_v4.xml: schema_reference.4: Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
	at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:114)
	at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:17)
	at liquibase.changelog.DatabaseChangeLog.include(DatabaseChangeLog.java:478)
	at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:320)
	... 13 common frames omitted
Caused by: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:99)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:392)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:306)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4158)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaWarning(XSDHandler.java:4149)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument1(XSDHandler.java:2491)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2193)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:578)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:610)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2447)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1768)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741)
	at com.sun.org.apache.xerces.internal.impl.XML11NSDocumentScannerImpl.scanStartElementAfterName(XML11NSDocumentScannerImpl.java:543)
	at com.sun.org.apache.xerces.internal.impl.XML11NSDocumentScannerImpl$NS11ContentDriver.scanRootElementHook(XML11NSDocumentScannerImpl.java:851)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3132)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:852)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
	at com.sun.org.apache.xerces.internal.impl.XML11NSDocumentScannerImpl.next(XML11NSDocumentScannerImpl.java:822)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
	at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:106)
	... 16 common frames omitted
Caused by: java.net.ConnectException: Connection timed out: connect
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at java.net.Socket.connect(Socket.java:538)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
	at sun.net.www.http.HttpClient.New(HttpClient.java:339)
	at sun.net.www.http.HttpClient.New(HttpClient.java:357)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1220)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:984)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:647)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:148)
	at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:583)
	at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:686)
	at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:530)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2181)
	... 34 common frames omitted.

I tried a lot ,can anyone help me on solving this error...
thankyou.

I've got the same problem

It doesn't look like gradle-related.

smbd coud found the solutuin?


text:
Toolchain download fails with user-readable errors

In case the download fails, multiple downloads happen in parallel or a requested JDK is not available, fail the build with human-readable error messages.

@bot-gradle test QF

OK, I've already triggered QuickFeedback build for you.

@bot-gradle test QF

OK, I've already triggered QuickFeedback build for you.

@bot-gradle test QF

OK, I've already triggered QuickFeedback build for you.

@bot-gradle test RFM

Sorry some internal error occurs, please contact the administrator @blindpirate

@bot-gradle test RFM

Sorry some internal error occurs, please contact the administrator @blindpirate

@bot-gradle test RFM

Sorry some internal error occurs, please contact the administrator @blindpirate

source: gharchive/pull-request

authors: bmuskalla bot-gradle


text:
Remove unused code and test from #13125

Context: https://github.com/gradle/gradle/issues/13125#issuecomment-756835580

Removes remnants of dropped feature: unused private method and ignored test
Context

Gradle Core Team Checklist

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation
[ ] Recognize contributor in release notes

@bot-gradle help

Currently I support the following commands:

@bot-gradle test {BuildStage} to trigger a build

e.g. @bot-gradle test SanityCheck plz
SanityCheck/CompileAll/QuickFeedbackLinux/QuickFeedback/ReadyForMerge/ReadyForNightly/ReadyForRelease are supported
test this means test ReadyForMerge
test and merge to trigger a pre-tested commit build
cancel to cancel a running pre-tested commit build or remove it from queue
SanityCheck can be abbreviated as SC, ReadyForMerge as RFM, etc.
Specific builds:

AST: AllSmokeTestsReadyForMerge
AFT: AllFunctionalTestsReadyForMerge
ASB: AllSpecificBuildsReadyForMerge
ACC: AllConfigCacheTestsReadyForMerge
ACT: AllCrossVersionTestsReadyForNightly
APTN: AllPerformanceTestsReadyForNightly
AFTN: AllFunctionalTestsReadyForNightly
ACTR: AllCrossVersionTestsReadyForRelease
AFTR: AllFunctionalTestsReadyForRelease

@bot-gradle help to display this message
@bot-gradle clean to clear the conversation history

@bot-gradle test and merge

Your PR is queued. See the queue page for details.

OK, I've already triggered a build for you.

Pre-tested commit build failed.

@bot-gradle test QF plz

OK, I've already triggered QuickFeedback build for you.

@bot-gradle test QF

OK, I've already triggered QuickFeedback build for you.

@bot-gradle help

Currently I support the following commands:

@bot-gradle test {BuildStage} to trigger a build

e.g. @bot-gradle test SanityCheck plz
SanityCheck/CompileAll/QuickFeedbackLinux/QuickFeedback/ReadyForMerge/ReadyForNightly/ReadyForRelease are supported
test this means test ReadyForMerge
test and merge to trigger a pre-tested commit build
cancel to cancel a running pre-tested commit build or remove it from queue
SanityCheck can be abbreviated as SC, ReadyForMerge as RFM, etc.
Specific builds:

AST: AllSmokeTestsReadyForMerge
AFT: AllFunctionalTestsReadyForMerge
ASB: AllSpecificBuildsReadyForMerge
ACC: AllConfigCacheTestsReadyForMerge
ACT: AllCrossVersionTestsReadyForNightly
APTN: AllPerformanceTestsReadyForNightly
AFTN: AllFunctionalTestsReadyForNightly
ACTR: AllCrossVersionTestsReadyForRelease
AFTR: AllFunctionalTestsReadyForRelease

@bot-gradle help to display this message
@bot-gradle clean to clear the conversation history

@bot-gradle test and merge

OK, I've already triggered a build for you.

Thanks for cleaning up after me 😉

authors: DPUkyle bot-gradle ljacomet


text:
Filter test tasks by AbstractTestTask instead Test in TestTaskExecutionTracker

Context
Start investigation point was here: https://youtrack.jetbrains.com/issue/KTIJ-20110
In Gradle 7.3.3 TestTaskExecutionTracker was implemented but it has problem: incoming tasks are filtered by sub-type of Test but KotlinTest tasks are extended from AbstractTestTask
Contributor Checklist

[x] Review Contribution Guidelines
[x] Make sure that all commits are signed off to indicate that you agree to the terms of Developer Certificate of Origin.
[x] Make sure all contributed code can be distributed under the terms of the Apache License 2.0, e.g. the code was written by yourself or the original code is licensed under a license compatible to Apache License 2.0.
[x] Check "Allow edit from maintainers" option in pull request so that additional changes can be pushed by Gradle team
[x] N/A Provide integration tests (under <subproject>/src/integTest) to verify changes from a user perspective
[x] N/A Provide unit tests (under <subproject>/src/test) to verify logic
[x] N/A Update User Guide, DSL Reference, and Javadoc for public-facing changes
[x] Ensure that tests pass sanity check: ./gradlew sanityCheck
[x] Ensure that tests pass locally: ./gradlew <changed-subproject>:quickTest

Gradle Core Team Checklist

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation
[ ] Recognize contributor in release notes

@bot-gradle test RFM

OK, I've already triggered the following builds for you:

PullRequestFeedback build

This looks sane to me.
Could we add some coverage for this using KotlinTest or a custom AbstractTestTask?

Good idea but I need your advise: where i can do it and there is some example?

org.gradle.integtests.tooling.r27.TestLauncherCrossVersionSpec is a good one to get inspiration.
Since this is only going to work on Gradle 7.5+, our convention is to:

Create a new package org.gradle.integtests.tooling.r75
Mark the test with @TargetGradleVersion(">=7.5")

HTH

Is there a chance to lower the fix to the 7.3.* version?

This code works fine with 7.1.1
And fails with 7.3.3+
build.gradle
import org.gradle.api.internal.tasks.testing.*
import org.gradle.internal.operations.OperationIdentifier

plugins {
    id 'java'
    id 'application'
}

group 'org.example'
version '1.0-SNAPSHOT'

repositories {
    mavenCentral()
    maven { url 'https://repo.gradle.org/gradle/libs-releases' }
}

dependencies {
    implementation 'org.gradle:gradle-tooling-api:7.3.3'
    runtimeOnly 'org.slf4j:slf4j-simple:1.7.36'
}

application.mainClass = 'Main'

class CustomTestExecutionSpec implements TestExecutionSpec {}
class CustomTestExecuter implements TestExecuter<CustomTestExecutionSpec> {

    @Override
    void execute(CustomTestExecutionSpec customTestExecutionSpec, TestResultProcessor testResultProcessor) {
        OperationIdentifier rootId = new OperationIdentifier(40L)
        DefaultTestSuiteDescriptor rootDescr = new DefaultTestSuiteDescriptor(rootId, "MyCustomTestRoot")
        testResultProcessor.started(rootDescr, new TestStartEvent(System.currentTimeMillis()))

        OperationIdentifier testId = new OperationIdentifier(42L)
        DefaultTestDescriptor testDescr = new DefaultTestDescriptor(testId, "org.my.MyClass", "MyCustomTest", null, "DisplayName")
        testResultProcessor.started(testDescr, new TestStartEvent(System.currentTimeMillis()))
        testResultProcessor.completed(testId, new TestCompleteEvent(System.currentTimeMillis(), TestResult.ResultType.SUCCESS))

        testResultProcessor.completed(rootId, new TestCompleteEvent(System.currentTimeMillis()))
    }

    @Override
    void stopNow() {}
}

class CustomTestTask extends AbstractTestTask {
    CustomTestTask() {
        binaryResultsDirectory.set(new File(getProject().buildDir, "CustomTestTask"))
        reports.html.required.set(false)
        reports.junitXml.required.set(false)
    }

    @Override
    protected TestExecuter<? extends TestExecutionSpec> createTestExecuter() {
        return new CustomTestExecuter()
    }

    @Override
    protected TestExecutionSpec createTestExecutionSpec() {
        return new CustomTestExecutionSpec()
    }
}

tasks.register("myTestTask", CustomTestTask)

Main.java
import org.gradle.tooling.BuildLauncher;
import org.gradle.tooling.GradleConnector;
import org.gradle.tooling.ProjectConnection;
import org.gradle.tooling.events.OperationType;
import org.gradle.tooling.internal.consumer.DefaultGradleConnector;

import java.io.ByteArrayOutputStream;
import java.io.File;

public class Main {
    public static void main(String[] args) {
        GradleConnector connector = GradleConnector.newConnector();
        connector.forProjectDirectory(new File("."));

        // required because invoked build script doesn't provide a settings file
        ((DefaultGradleConnector) connector).searchUpwards(false);

        ProjectConnection connection = connector.connect();
        try {
            BuildLauncher launcher = connection.newBuild();
            launcher.forTasks("myTestTask");

            ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
            launcher.setStandardOutput(outputStream);
            launcher.setStandardError(outputStream);
            launcher.addProgressListener(event -> {
                System.out.println("TEST ProgressEvent: " + event.getDisplayName());
            }, OperationType.TEST);

            launcher.run();
            System.out.println("Build was successful");
        } finally {
            System.out.println("Cleaning up after the build");
            connection.close();
        }
    }
}

After my fix the sample above works fine again.
@big-guy  could you review the PR?

@bot-gradle test RFM

OK, I've already triggered the following builds for you:

PullRequestFeedback build

@bot-gradle test RFM

OK, I've already triggered the following builds for you:

PullRequestFeedback build

@bot-gradle test and merge

No milestone for this PR. Please set a milestone and retry.

@bot-gradle test and merge

Your PR is queued. See the queue page for details.

@bot-gradle help

Currently, the following commands are supported:
@bot-gradle test <BuildTrigger1> <BuildTrigger2> ... <BuildTriggerN>

A trigger is a special build for this PR on TeamCity, common triggers are:

SanityCheck/CompileAll/QuickFeedbackLinux/QuickFeedback/PullRequestFeedback/ReadyForNightly/ReadyForRelease
Shortcuts: SC/CA/QFL/QF/PRF/RFN/RFR
Specific builds:

PT: PerformanceTest, all performance tests for Ready For Nightly stage.
APT: AllPerformanceTest, all performance tests, including slow performance tests.
AST: AllSmokeTestsPullRequestFeedback
AFT: AllFunctionalTestsPullRequestFeedback
ASB: AllSpecificBuildsPullRequestFeedback
ACC: AllConfigCacheTestsPullRequestFeedback
ACT: AllCrossVersionTestsReadyForNightly
AFTN: AllFunctionalTestsReadyForNightly
ACTR: AllCrossVersionTestsReadyForRelease
AFTR: AllFunctionalTestsReadyForRelease

@bot-gradle test and merge

queues this PR for testing and merges if all tests pass by:

Creating a merge commit from your PR branch HEAD and the target branch
Running a ReadyForNightly build against the merge commit
When it passes, fast-forward the target branch to this merge commit (i.e. merge the PR)

The merge commit is called a pre-tested commit, which means that it fully tests the integration
of your branch HEAD and latest master, instead of only testing your branch HEAD.
@bot-gradle cancel

cancel a running pre-tested commit build or remove it from queue

@bot-gradle clean

clear the conversation history

@bot-gradle help

display this message

To run a command, simply submit a comment.  For detailed instructions see here.

@bot-gradle cancel

OK, I've already cancelled the pre-tested commit build.

@bot-gradle test and merge

OK, I've already triggered a build for you.

authors: big-guy bot-gradle donat terrakok


text:
Track cross-project model access in Project.getChildProjects + Introduce @ForExternalUse

This is a partial fix for #21485 – the Project.getChildProjects part.
Gradle Core Team Checklist

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation

@wolfs May I ask for your quick review of the ArchUnit part?

@bot-gradle test and merge

OK, I've already triggered a build for you.


text:
Apply snappy compression to Configuration Cache entries

Compression and encryption are offloaded to a separate thread, utilizing a pool of byte buffers capped at a maximum memory working set of 32MB.
Reviewing cheatsheet
Before merging the PR, comments starting with

❌ ❓must be fixed
🤔 💅 should be fixed
💭 may be fixed
🎉 celebrate happy things

@bot-gradle test APT

I've triggered the following builds for you. Click here to see all build failures.

AllPerformanceTestsReadyForRelease build

@bot-gradle test ACC

I've triggered the following builds for you. Click here to see all build failures.

AllConfigCacheTestsPullRequestFeedback build

authors: bamboo bot-gradle


text:
coalesce and env don't work together.

What's wrong?
In the alloy config, if I have an expression like coalesce("grafana-", env("ALLOY_CLUSTER_ENV")) this doesn't work. It always gets rendered as grafana-.
If I directly use env("ALLOY_CLUSTER_ENV") it works as expected.``
Steps to reproduce

Set an env variable ALLOY_CLUSTER_ENV=x in pod
Use it in an config eg:

remote.kubernetes.secret "logs_service" {
	name      = coalesce("grafana-", env("ALLOY_CLUSTER_ENV"))
	namespace = "default"
}

It will fail on startup failing to resolve.

System information
Offical Docker Alloy image
Software version
Alloy 1.0.0
Configuration
remote.kubernetes.secret "logs_service" {
	name      = coalesce("grafana-", env("ALLOY_CLUSTER_ENV"))
	namespace = "default"
}

Logs
grafana-alloy-655d78b6b7-h428p alloy Error: /etc/alloy/main.alloy:763:1: Failed to build component: building component: secrets "grafana-" not found
grafana-alloy-655d78b6b7-h428p alloy
grafana-alloy-655d78b6b7-h428p alloy 762 |   // Logs Service
grafana-alloy-655d78b6b7-h428p alloy 763 |   remote.kubernetes.secret "logs_service" {
grafana-alloy-655d78b6b7-h428p alloy     |  _^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grafana-alloy-655d78b6b7-h428p alloy 764 | |     name      = coalesce("grafana-", env("ALLOY_CLUSTER_ENV"))
grafana-alloy-655d78b6b7-h428p alloy 765 | |     namespace = "default"
grafana-alloy-655d78b6b7-h428p alloy 766 | | }
grafana-alloy-655d78b6b7-h428p alloy     | |_^
grafana-alloy-655d78b6b7-h428p alloy 767 |

Sample where I directly used an env variable

grafana-alloy-655d78b6b7-h428p alloy Error: /etc/alloy/main.alloy:683:1: Failed to build component: building component: secrets "helm" not found
grafana-alloy-655d78b6b7-h428p alloy
grafana-alloy-655d78b6b7-h428p alloy 682 |   // Metrics Service
grafana-alloy-655d78b6b7-h428p alloy 683 |   remote.kubernetes.secret "metrics_service" {
grafana-alloy-655d78b6b7-h428p alloy     |  _^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grafana-alloy-655d78b6b7-h428p alloy 684 | |     name      = env("ALLOY_DEPLOY_MODE")
grafana-alloy-655d78b6b7-h428p alloy 685 | |     namespace = "default"
grafana-alloy-655d78b6b7-h428p alloy 686 | | }
grafana-alloy-655d78b6b7-h428p alloy     | |_^
grafana-alloy-655d78b6b7-h428p alloy 687 |

Hi! The function coalesce takes any number of arguments and returns the first one that isn’t null, an empty string, empty list, or an empty object. In your example it will always return "grafana-" because it's the first argument and it isn't null.
What you can do instead is to use the format function:
remote.kubernetes.secret "logs_service" {
	name      = format("grafana-%s", env("ALLOY_CLUSTER_ENV"))
	namespace = "default"
}

That makes sense :( I assumed it was an concat, thanks closing.

authors: HackToHell wildum

repo: grafana/alloy


text:
Add response status to faro resource event FaroResourceTiming

Description
Add response status to faro resource event FaroResourceTiming. This would be really helpful for to create metrics based on specific http statuses
Proposed solution
We already have resource status available in scope https://github.com/grafana/faro-web-sdk/blob/c33caee495826c6c73443114c791ef2158af15ef/packages/web-sdk/src/instrumentations/performance/performanceUtils.ts#L47
Prosed solution would be to add one more field responseStatus

Proposal
packages/web-sdk/src/instrumentations/performance/performanceUtils.ts
export function calculateFaroResourceTiming(resourceEntryRaw: PerformanceResourceTiming): FaroResourceTiming {
const {
  connectEnd,
  connectStart,
  decodedBodySize,
  domainLookupEnd,
  domainLookupStart,
  duration,
  encodedBodySize,
  fetchStart,
  initiatorType,
  name,
  nextHopProtocol,
  redirectEnd,
  redirectStart,
  // @ts-expect-error the renderBlockingStatus property is not available in all browsers
  renderBlockingStatus: rbs,
  requestStart,
  responseEnd,
  responseStart,
  // @ts-expect-error the renderBlockingStatus property is not available in all browsers
  responseStatus, // responseStatus already available to use
  secureConnectionStart,
  transferSize,
  workerStart,
} = resourceEntryRaw;

return {
  name: name,
  duration: toFaroPerformanceTimingString(duration),
  tcpHandshakeTime: toFaroPerformanceTimingString(connectEnd - connectStart),
  dnsLookupTime: toFaroPerformanceTimingString(domainLookupEnd - domainLookupStart),
  tlsNegotiationTime: toFaroPerformanceTimingString(requestStart - secureConnectionStart),
  responseStatus, // <------------- add here new responseStatus field with any normalization
  redirectTime: toFaroPerformanceTimingString(redirectEnd - redirectStart),
  requestTime: toFaroPerformanceTimingString(responseStart - requestStart),
  responseTime: toFaroPerformanceTimingString(responseEnd - responseStart),
  fetchTime: toFaroPerformanceTimingString(responseEnd - fetchStart),
  serviceWorkerTime: toFaroPerformanceTimingString(fetchStart - workerStart),
  decodedBodySize: toFaroPerformanceTimingString(decodedBodySize),
  encodedBodySize: toFaroPerformanceTimingString(encodedBodySize),
  cacheHitStatus: getCacheType(),
  renderBlockingStatus: toFaroPerformanceTimingString(rbs) as FaroResourceTiming['renderBlockingStatus'],
  protocol: nextHopProtocol,
  initiatorType: initiatorType,

  // TODO: add in future iteration, ideally after nested objects are supported by the collector.
  // serverTiming: resourceEntryRaw.serverTiming,
};

Context
Faro docs say we are using this spec which include responseStatus https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStatus
It is confusion that we are missing this field

Hey @ColinRosati great suggestion that makes a lot sense. Thanks you for that!
Do you would like to implement it / make a contribution? Otherwise I can quickly tackle it today because the change isn't bug and I can include it in this weeks release.
Cheers,
Marco

@ColinRosati Any other feedback about the instrumentation is highly  welcome.
It's a very opinionated implementation so feedback is amazingly helpful.
Cheers,
Marco

Hey @codecapitano I would love to push the suggestion. Let me open a PR for this one 🙌

Hey @codecapitano I would love to push the suggestion. Let me open a PR for this one 🙌

Great, thank you so much 🚀
I'll take of the docs then.
PS:
Please also update the changelog (slips through quite often)

@codecapitano Looks like CI is blocked and says to contact admin. Are you able to help there?

authors: ColinRosati codecapitano

repo: grafana/faro-web-sdk


text:
Add a global job tag to all instances of a given job

When outputting Prometheus metrics, k6-operator includes a job_name tag, but the value of this tag corresponds to the individual instance (== Pod) running a test.   So, for a job called test, the values of job_name look like test-1, test-2, etc.
This makes it very difficult to build a dashboard that displays all jobs running a particular test.  We need a tag that provides the name of the job without any instance numbers.
People want test-wide tags:
https://community.grafana.com/t/k6-operator-pass-local-environment-variable-as-test-wide-tag/99639
People are struggling with bugs:
https://github.com/grafana/k6-operator/issues/162
https://github.com/grafana/k6-operator/issues/211
This PR adds a base_job_name tag that contains only the job name.
In the example above, this PR adds a base_job_name tag with a value of test.

Hi @chrissnell, thank for the PR! I believe this is the case when it's preferable to open an issue / forum question first and have a discussion there :sweat_smile:
The links you added are actually about troubles around quotes and env vars specifically, and the forum question was resolved. So this seems unrelated to the dashboard problem you described. Specifically:

This makes it very difficult to build a dashboard that displays all jobs running a particular test. We need a tag that provides the name of the job without any instance numbers.

Currently, there are as many Jobs per TestRun as parallelism value + 2. These jobs are named with suffix attached to the name of a TestRun. So "all jobs" is basically the name of a test run CR. That information is being added to all Jobs already with the .metadata.labels:
metadata:
  labels:
    k6_cr: <name>

So if you scrape your Kubernetes metrics to Prometheus, it should be possible to insert those labels as well. IOW, it makes sense to double-check your metrics scraping config.
For example, in Loki, I have been doing the following to get logs from all jobs per test run:
{cluster="...", namespace="k6-op", k6_cr="my-test"}

Let me know if this workaround works for you.

authors: chrissnell yorugac


text:
Context aware autocompletion for macros

This PR is based on https://github.com/grafana/redshift-datasource/pull/169 so for the time being it includes its diff.
This PR adds context aware autocompletion for redshift macros. Suggestions are context aware in the sense that macros for columns, tables, filters and groups are differentiated. See example below.

Part of #108
Fixes #170

Too many parallel PR now, so closing this in favor of https://github.com/grafana/redshift-datasource/pull/174

repo: grafana/redshift-datasource


text:
Cache database connections based on datasource Updated time

The most straightforward way to address https://github.com/grafana/athena-datasource/issues/264, where the cached connection is not updated when credentials are changed, is to use the updated timestamp as part of the connection cache key. To remove some code duplication and fix the same issue for all sqlds-based datasources, I'd like to make that change here.

No longer needed

repo: grafana/sqlds


text:
fix getRegionFromZone(), add exporter_test.go

Changes overview:

exporter.go:

Fix getRegionFromZone(), also make other functions use <provider>.ProviderName recently added (instead of fixed strings)

exporter_test.go:

Add test coverage to some functions, including the one fixed above

Dockerfile:

add --load to Dockerfile to support buildx setups.

--
Signed-off-by: JuanJo Ciarlante juanjosec@gmail.com

About to merge, built and verified running ok (and scraping :8080/metrics with:
# AWS
docker run -v $HOME/.aws:/root/.aws:ro -p 8080:8080 us.gcr.io/kubernetes-dev/unused:v0.0.3-78-g96944e9 --aws.profile some-profile --aws.providername=EKS

# GCP
docker run -v $HOME/.config/gcloud:/root/.config/gcloud:ro -p 8080:8080 us.gcr.io/kubernetes-dev/unused:v0.0.3-78-g96944e9 --gcp.project some-project --gcp.providername=gke

built from main and pushed to us.gcr.io/kubernetes-dev/unused us.gcr.io/kubernetes-dev/unused:v0.0.3-79-gc2eb1aa

repo: grafana/unused


text:
Feature Request: port-fowarding with kubectl

Feature Request

Is there a way to use this plugin to port-forward?
kubectl port-forward MySQL 3306:3306

Hello @kempsterc! At the moment, no. I'll take a look to see if that's something we can get incorporated.

@javaducky missed this comment! Sorry! Thank you for that! 😀

authors: javaducky kempsterc


text:
all zero values on pageSize, pageToken (+ other req.) should be validated before use in grafeas api

verify that all grafeas call to the storage engine validate portions of the request where needed before passing the call to the storage engine.

reflect non-validated behaviour in the fakeStorage for the purpose of unit-testing

follow up on https://github.com/grafeas/grafeas/pull/458

fakeStorage modified to test that grafeas API uses validatePageSize for the List methods

WIP: check if any other parts of the request would need validation

repo: grafeas/grafeas

license_source: bigquery


text:
Figure out the icons and category

not sure who to assign this to

Categories sorted by @obucklin  in https://github.com/gramaziokohler/compas_timber/pull/209
Icons by @jonashaldemann ?

license: MIT


text:
Linux lag fix

Fixed lag on Linux systems by using solution that was described in referenced issue.
Fixes #28

I added your changes to this commit. Thanks!

authors: FranzQuad granttitus

repo: granttitus/FlappyBird


text:
i22 chunk URL arrays

Eloi @SingingMeerkat started on #22 and I was able to complete it on this branch.  This supersedes https://github.com/graph-genome/Schematize/pull/72.

Testing Issues:

"Use Width Compression" caused Components stacking up on x bug.
Step 11: It appears to be nearly impossible to find an orphan link now that we're loading entire chunks.  Link rendering may need to not go off the screen even if the component is "known"

Clicking on other links appears to work (though it's superfluous)

Mouseover looks good and shows the new list of nucleotide ranges.

@josiahseaman Concerning orphan links, if it is just that they do not appear since both ends are displayed on screen, you might want to try the testing procedure while working in window mode, and not full screen. This way, even though multiple chunks loading is enabled, you will still have the possibility to see only 2 chunks or so at once.
If however, it is that some ends are loaded but in the 'not displayed' bit of the chunks (far left or far right of screen), maybe the behaviour of orphan links should be change to depend on startEndBin rather than what is loaded or not (since what is in between startEndBin should be loaded anyway)?

authors: SingingMeerkat josiahseaman

repo: graph-genome/Schematize


text:
Carbon answers tcp connections slowly on 1.1.1

Hello,
I'm not quite sure how to describe what happened for us, but  carbon became very slow for us when we tried upgrading from carbon 1.0.1 to 1.1.1.    Graphite-web  1.1.1 seemed unable to connect to it, and conecting to to carbon directly on port 201x  (we have 3 on each box)   took somewhere around 3/4 of a second before a connection was established.
The problem went away when going back to carbon 1.0.1
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
Kernel: 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Python version: 2.7.12
pip list:
jblackwell:~$ pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
alabaster (0.7.10)
appdirs (1.4.3)
attrs (15.2.0)
awscli (1.11.64)
Babel (2.4.0)
boto (2.46.1)
botocore (1.5.27)
cachetools (2.0.1)
cairocffi (0.8.0)
carbon (1.0.1)
carbonate (1.1.1)
cffi (1.10.0)
chardet (2.3.0)
colorama (0.3.7)
cryptography (1.2.3)
Django (1.9.13)
django-appconf (1.0.2)
django-shortcuts (1.5)
django-staticfiles (1.2.1)
django-tagging (0.4.3)
docutils (0.13.1)
enum34 (1.1.2)
funcsigs (1.0.2)
futures (3.0.5)
gevent (1.1.0)
graphite-web (1.1.1)
greenlet (0.4.9)
gunicorn (19.4.5)
idna (2.0)
imagesize (0.7.1)
ipaddress (1.0.16)
Jinja2 (2.9.6)
jmespath (0.9.2)
MarkupSafe (1.0)
mock (2.0.0)
mocker (1.1.1)
mysqlclient (1.3.7)
ndg-httpsclient (0.4.0)
packaging (16.8)
PAM (0.4.2)
pbr (2.0.0)
pip (9.0.1)
pyasn1 (0.1.9)
pyasn1-modules (0.0.7)
pycparser (2.18)
Pygments (2.2.0)
pyOpenSSL (0.15.1)
pyparsing (2.2.0)
pyserial (3.0.1)
python-dateutil (2.6.0)
python-memcached (1.53)
pytz (2017.2)
PyYAML (3.12)
requests (2.9.1)
rsa (3.4.2)
s3transfer (0.1.10)
scandir (1.5)
service-identity (16.0.0)
setuptools (38.5.1)
simplejson (3.8.1)
six (1.10.0)
snowballstemmer (1.2.1)
Sphinx (1.6.3)
sphinx-rtd-theme (0.2.4)
sphinxcontrib-websupport (1.0.1)
sqlparse (0.1.18)
stevedore (1.21.0)
Twisted (16.0.0)
txAMQP (0.7.0)
typing (3.6.1)
urllib3 (1.21.1)
virtualenv (15.1.0)
virtualenv-clone (0.2.6)
virtualenvwrapper (4.7.2)
wheel (0.29.0)
whisper (1.0.1)
whitenoise (3.3.0)
zope.interface (4.1.3)
carbon

You can try to 1.1.x branch or apply this fix above directly, of course.

authors: deniszh jdblack

repo: graphite-project/carbon


text:
Add documentation about rewrite-rules.conf

Rebased my doc PR from https://github.com/graphite-project/graphite-web/pull/1113 for the 0.9.x branch as requested.
cc @obfuscurity

Thanks! :ice_cream:

authors: brandonwamboldt obfuscurity

repo: graphite-project/graphite-web


text:
Create Empty Capacitor starter project

Create Ionic Capacitor starter project

ping @LakshanKarunathilake

repo: graphql-heroes/ionic-offline


text:
CORS feature is not working

In early 2017 this issue was opened to report a bug in CORS support.
Even though apparently that issue was solved, I believe at some point later it was reintroduced. The expectation is CORS to be enabled by default, but it is not. Actually, even when you do explicitly enable it (in the Spring Boot config file, like seen below) CORS still doesn't work.
graphql:
  servlet:
    corsEnabled: true

Maybe some change reintroduced this bug. Was there a regression test added when this was fixed originally?
I am reporting this bug against version 5.9.0.
Thanks.

I just tested this with that version and works for me... Maybe something else is overriding this setting in your case?


text:
How to handle AccessDeniedException from @Secured annotation in GraphQL response?

 @Secured("ROLE_ADMIN")
  Response createResponse(Map<String, Object> createInput) {
    return responseService.create(createInput);
  }

This piece of code throws an AccessDeniedException when logged-in user does not have the required roles.
I am using Spring Security here.
How can I catch this exception and provide a meaningful response from my /graphql endpoint?
Currently, I just get a Internal Server Error message in my response.

I am also dealing the same problem.
I implemented OncePerRequestFilter filter to check if the token is good. When it is not I throw exception for InvalidAuthExcetpion . However it seem I always get this error
{
  "error": "Unexpected end of JSON input"
}

My guess it's because the exception can't handle in the filter level for graphql

Try enabling the exception handlers. Instead of getting an Internal Server Error every time it returns the actual exception. If that's not enough, you could add your own custom GraphQLError and populate the extensions map to contain an error code for example.
graphql:
  servlet:
    exception-handlers-enabled: false

Assuming my last comment answered your question. If not and you have follow-up questions, feel free to re-open.

authors: oliemansm shahdadpuri-varun zt1983811


text:
Latest 15.0.0 version is not compatible with Spring boot 3.0.2 and spring security 6.0.1

Describe the bug
After doing regular library upgrade in one of our project I got issues with the security of our "/graphql" endpoint.
My security settings are not applied to the "/graphql" endpoint. So my graphql endpoint it publicly available in theory. Because of the PreAuthorize annotations every request fail because no security context is available.
I verified that my security settings where working correctly with an additional rest endpoint where everything worked like expected.
The issue was only there with the "/graphql" endpoint
I tried everything in a clean small project. The same result
To Reproduce
Steps to reproduce the behavior:

Get latest spring boot version (3.0.2) and spring security version (6.0.1)
Secure with a simple basic auth the "/graphql" endpoint
Run the application
Try graphql query without any Authorization Header -> Request passed
Add @PreAuthoirze annotation on graphql function implementation and try request again -> Error "An Authentication object was not found in the SecurityContext"

Expected behavior
Spring security settings are securing "/graphql" endpoint
Additional context
With previous version of your library and spring boot 2.7.4 and spring security 5.7.3 everything worked as expected.
I attached a small demo security project as an example
security-demo.zip

Just curious, any workaround for the time being?

Thanks @ghoshrahul, your solution worked. Tested it today.

authors: mkrajina ralbertsasrc


text:
Update Medium Icon

Closes #4336.

Will merge when green ...

@whit537 I think I see green....wooooohoooo !

Good work, @dmk246! 😄  💸  💃  🌻

Happy dance! So excited! Thank you @whit537 and @kaguillera for all your help and patience!

!m @dmk246 💃  💃  💃  💃  💃

license: mit


text:
Unexpected Keyword Argument Error

Problem:
The problem stemmed from a mismatch between the argument expected by the Chatbot class constructor in the BingAI Python module and the argument that was being passed to it. The error message pointed to this:
TypeError: Chatbot.__init__() got an unexpected keyword argument 'cookie_path'
This error indicates that the Chatbot class's __init__ method was being called with an argument (cookie_path) that it doesn't support.
Solution:
The solution was to change the Chatbot class's constructor to accept the cookie_path argument. Specifically, we added the following to the Chatbot class's __init__ method:
def __init__(
    self,
    proxy: str | None = None,
    cookies: list[dict] | None = None,
    cookie_path: str | None = None
) -> None:

This allows the Chatbot class to accept a cookie_path argument when it's instantiated.
Also, we adjusted the rest of the class to handle the new cookie_path argument appropriately. In this case, we didn't actually use cookie_path within the class, but in a real-world application, you would want to ensure that any new arguments are used as intended within the class.
So, in summary, the error was caused by trying to pass an argument that wasn't accepted by the class constructor, and the solution was to modify the class constructor to accept and handle this argument.

I'm having the same issue and I tried your solution but I'm not I implemented it correctly because I'm still getting the same error messages.
File "plugins\AutoGPTBingAI.zip\AutoGPTBingAI\BingAI_init_.py", line 61, in post_prompt
File "plugins\AutoGPTBingAI.zip\AutoGPTBingAI\BingAI\bing_ai.py", line 34, in
TypeError: Chatbot.init() got an unexpected keyword argument 'cookie_path'
My question is - Where is the Chatbot class located? Which file? Thank you.

It should be located in the EdgeGPT.py
/Auto-GPT/venvAutoGPT/lib/python3.11/site-packages/EdgeGPT.py

I also updated line 34 in the bing_ai.py file to >>>     bot = Chatbot(cookies=cookies)  # Update this line
I would try first without updating line 34

repo: gravelBridge/AutoGPT-BingAI


text:
The Improve button scrolls to the bottom of docs, but there is nothing there

Applies To

https://goteleport.com/docs/architecture/authorization/

Details
AFAIR it used to scroll to a ribbon or something that led you to the corresponding file on GitHub, but it looks like it's gone now.
How will we know this is resolved?
The Improve button should navigate you towards the file on GitHub.

I believe it scrolls down to put the "Was this page helpful?" feedback section in front of the reader.

I believe it scrolls down to put the "Was this page helpful?" feedback section in front of the reader.

Perhaps change this to provide feedback.

@alexfornuto correct, that's the idea but if it's hard for users to see we can highlight it somehow to make it more obvious on button click.  Or/and like @stevenGravy suggested, change the button text to "provide feedback"

Was it ever navigating you to GitHub or am I just making this up? If it did, then I think I appreciated this feature, especially when I just joined Teleport and didn't know where to find the relevant markdown file.

Was it ever navigating you to GitHub or am I just making this up? If it did, then I think I appreciated this feature, especially when I just joined Teleport and didn't know where to find the relevant markdown file.

it did. We did get a lot of empty GH requests.

@ravicious there's still the option to open an issue after clicking the thumbs up thumbs down button.

Closed as complete/no longer an issue.

authors: alexfornuto dumez-k ptgott ravicious stevenGravy

repo: gravitational/docs


text:
feat(Dockerfile): upgrade java

🏗 Your changes can be tested here and will be available soon:
Console: https://pr.team-apim.gravitee.dev/6307/console
Portal: https://pr.team-apim.gravitee.dev/6307/portal
Management-api: https://pr.team-apim.gravitee.dev/6307/api/management
Gateway v4: https://pr.team-apim.gravitee.dev/6307
Gateway v3: https://pr.gateway-v3.team-apim.gravitee.dev/6307

As discussed with the archi team, we will upgrade java version only on master for now

repo: gravitee-io/gravitee-api-management


text:
[BUG] @2.0.0-pre4 pressing Shift after Shift+Backspace continues triggering Shift+Backspace

react-hotkeys version: 2.0.0-pre4
If there is a hotkey handler on Shift+Backspace, then pressing just Shift right after pressing Shift+Backspace triggers the same actions as pressing Shift+Backspace.
Code:
import React, { Component } from "react";
import { HotKeys } from "react-hotkeys";
import logo from "./logo.svg";
import "./App.css";

const keyMap = {
  ShiftBackspace: "shift+backspace",
};

const handlers = {
  ShiftBackspace: () => alert("shift+backspace"),
};

const App = () => (
  <HotKeys keyMap={keyMap}>
    <HotKeys handlers={handlers}>
      <div className="App">
        <header className="App-header">
        </header>
      </div>
    </HotKeys>
  </HotKeys>
);

export default App;

Steps:

press Shift+Backspace, an alert appears
close alert (esc, enter, mouse)
press Shift (alone, no Backspace)

Actual result:

alert appears

Expected result:

no alert appears

Example repo: https://github.com/vadzim/react-hotkeys-test/tree/f8c80b11074f496cad5dd9a2966ef7be8a79271e

Apologies for the delay, I have been away for a while.
I have to do some more testing, but I believe you are seeing this issue because you are choosing to display an alert dialog in your action handler, which is removing the focus from the document, so the shift and escape keyup events are never captured by react-hotkeys. i.e. react-hotkeys still thinks you are holding down shift and escape when you press shift for the second time.
You should not have this same issue if you have an event handler that does not cause the window to lose focus.
However, this is still a bug and I am working on an appropriate fix (currently toying with the idea of completely clearing the key history every time the window is blurred).

I think we might be experiencing this too... our keymap looks like this:
  const keyMap: KeyMap = {
    UNDO: ['ctrl+z', 'command+z'],
    REDO: ['ctrl+y', 'command+shift+z'],
  };

REDO fires on command+shift (doesn't wait for the z)... unless you can't have 3 key combos mapped?
We're not doing anything to change focus.

Thank you for the extra information, @StephenHaney.
Would you mind opening a separate issue with further details and logs? I'd like to keep the scope of this issue to when the handler changes the window focus.

authors: StephenHaney greena13 vadzim

license: ISC


text:
About Modal Dialog can auto close

Dear Sir
When I use the Modal Dialog Module,if I clicked the backdrop,the dialog would be closed automaticly.Can I change this setting to  not close the dialog automaticly? I did not find any option setting in ModalOptions.
Pls give me some suggestions.Thank you very much.

Yes. You can pass modal:true to modal:
export interface ModalOptions {
component: Type;
componentFactoryResolver?: ComponentFactoryResolver;
injector?: Injector;
resolve?: any;
backdrop?: boolean;
backdropClass?: string;
keyboard?: boolean;
modal?: boolean; // this option
modalClass?: string;
animation?: boolean;
size?: 'lg' | 'sm';
rootContainer?: ViewContainerRef;
}

Thank you very much.It works well.

repo: greengerong/rebirth-ng


text:
Notes are not synchronized to Roam

Using the latest version, I've noticed that the notes for my items are not synchronized to zotero. After a brief investigation, I've found out that the api <userOrGroupPrefix>/items does not return any notes. The notes can be retrieved using the <userOrGroupPrefix>/items/<itemKey>/children api method.
Is there a plan to include the call of  <userOrGroupPrefix>/items/<itemKey>/children api in the getItemMetadata method?

Hi there! To clarify the <userOrGroupPrefix>/items call does include note elements, but the API key needs to have permission to access user notes - otherwise the extension won't be able to retrieve them.
<userOrGroupPrefix>/items includes both top-level items (i.e, papers, works, etc.) and attachments (PDFs, linked files, notes, etc.). If that's what you use in your dataURI setting you will get your notes as well provided your API key allows the extension to do so. It's the <userOrGroupPrefix>/items/top that is restrictive to top-level items.

Will close this for now - if you've done the above and are still running into issues, comment here & add some screenshots of your Zotero + Roam displays to help troubleshoot!

authors: IamMarek greenmeen

repo: greenmeen/zotero-roam


text:
feature: snippets in caddy security configuration

With the previous caddy-auth-portal and caddy-auth-jwt it was possible to setup a portal per-domain in separate files. This ability was useful to me since I use one Caddy instance to serve many apps, each with their own OAuth2 endpoint in my SSO. I've designed my Caddy config with one main Caddyfile that imports a directory of additional per-app Caddyfiles like so:
// Main Caddyfile
(sso) {
    route /auth* {
        authp {
            backends {
                generic_oauth2_backend {
                    method oauth2
                    realm ml
                    provider generic
                    metadata_url https://sso.somewhere.com/{args.0}
                    base_auth_url https://sso.somewhere.com/
                    client_id "{args.1}"
                    client_secret "{args.2}"
                    scopes openid email profile
                }
            }
        }
    }
}

(sso-jwt) {
    jwt {
        primary yes
        set auth url /auth/oauth2/ml
        allow roles authp/admin authp/user authp/guest
        inject headers with claims
    }
}

import ./apps/*.caddy

// Site Caddyfile
some.place.com {
	import sso some_place ID SECRET
	route {
		import sso-jwt
		reverse_proxy 10.1.0.5:8028 {
			// ...
		}
	}
}

From what I can tell with the new caddy-security (and please correct me if I'm wrong), the only way to setup auth "portals" is now via the global config and I can't configure any portals via my included files (since Caddy doesn't allow multiple globals blocks).
Is there any way to still use the above (or similar) file architecture with the new design of caddy-security?
Thanks for the project and taking a look at this question!

@Matchlighter , thank you for the question!
Same idea here.
authentication portal site1portal {
…
}
authentication portal site2portal {
…
}
Authsite1.foo.bar {
authenticate with site1portal
}
Authsite2.foo.bar {
Authenticate with site2portal
}
Perhaps, I misunderstand the question.
Also, have you watched this? https://www.youtube.com/watch?v=Mxbjfv47YiQ&t=1s&vq=hd1080
have you seen configuration examples? https://github.com/authp/authp.github.io/tree/main/assets/conf

I looked through the config examples and didn't see anything that matched. Hadn't come across that video though - I should be able to take a look at it tomorrow.
I had gathered that I could provide multiple authentication portal xyz entries, but don't they need to be in the Caddy global options block ({ ... }) at the beginning of the main Caddyfile (and not allowed in imported files) (as per Caddy docs, in reference to the global options "There can only be one at most, and it must be the first block of the Caddyfile.")? My ideal is to be able to maintain the portal config with the site config - not have the portal config in the main file and my site config in a separate file.

@Matchlighter , to replay, you want to use “import” statements when configuring “security” app, correct? However, you can’t do it because it is in “global” config.
noticed you have “import ./apps/*.caddy”. In theory “security” is an “app”, so it could be in “apps” configuration section too, i.e. not only global configuration. Can you use “import” statements in “apps”?

@Matchlighter , how many portal instances do you run? Which backends do they use?
Side note. I am introducing a new feature that allow a portal to be used across multiple domain. Basically you can specify “cookie  enable” for each domain you want to enable under a single portal.

Correct - each "app" is just a file with a site.xyz { ... } block. I've got my SSO (Authentik, similar to Okta) setup so that each "app"/site has it's own OAuth2 IdP (allowing me to use my SSO for "which-users-can-access-which-apps"-level policy). I currently have ~7 apps/sites set up this way on a single Caddy instance.
Your comment reminded me "imports", so I dug back into the Caddy docs and did a couple quick tests - it looks like snippet defintions are allowed before the global options block and that import is allowed anywhere (unless modules need to explicitly support it, but it seems like it's more of a preprocess that Caddy does before actually parsing the file), so I should be able to do an import  ./auth_portals/*.caddy or import ./apps/*.portal in the security block of global options. I'd have to maintain two files per-site instead of one, but I think that will better fit my usage than modifying the main Caddyfile with portals for each app/site. Given your rename, I think we may have had parallel thoughts!
"unless modules need to explicitly support it" - I think you'd know more about the details here. Given the rename, I'll keep this issue open incase explicit support is needed, but if you know it's not, feel free to close this. I'm working on a test deploy my end as well - if I find that import is indeed implicitly universal, I'll loop back and close this as well.
Thanks for your help and quick turn around!

@Matchlighter , I will open an issue in caddyserver for this. Will keep you posted here.

@Matchlighter , see https://github.com/caddyserver/caddy/issues/4559#issuecomment-1030148870
Looks like it is possible to do.

@Matchlighter , just tested injecting default portal links and it worked just fine.
(defaultPortalLinks) {
        links {
                "API Metadata" /api/metadata icon "las la-star"
                "AuthDB" /authdb/ icon "las la-cog"
                "Cypress Videos" /videos/ icon "las la-photo-video"
                "My Website" https://assetq.myfiosgateway.com:8443/ icon "las la-star"
                "My Identity" "/whoami" icon "las la-user"
        }
}

{
        http_port 8080
        https_port 8443
        debug

        order authenticate before respond
        order authorize before basicauth

        security {
                authentication portal myportal {
                        crypto default token lifetime 3600
                        crypto key sign-verify {env.JWT_SHARED_KEY}
                        backend local {env.HOME}/.local/caddy/users.json local
                        cookie domain myfiosgateway.com
                        ui {
                                import defaultPortalLinks
                                #links {
                                #       "API Metadata" /api/metadata icon "las la-star"
                                #       "AuthDB" /authdb/ icon "las la-cog"
                                #    "Cypress Videos" /videos/ icon "las la-photo-video"
                                #               "My Website" https://assetq.myfiosgateway.com:8443/ icon "las la-star"
                                #       "My Identity" "/whoami" icon "las la-user"
                                #}
                                password_recovery_enabled yes
                        }

@Matchlighter , next ...
Separated portal config into a separate file ~/tmp/authp/authdb/portal1.include. The config includes defaultPortalLinks snippet.
        authentication portal myportal {
            crypto default token lifetime 3600
            crypto key sign-verify {env.JWT_SHARED_KEY}
            backend local {env.HOME}/.local/caddy/users.json local
            cookie domain myfiosgateway.com
            ui {
                import defaultPortalLinks
                password_recovery_enabled yes
            }
            transform user {
                match origin local
                action add role authp/user
                ui link "Portal Settings" /settings icon "las la-cog"
            }
            transform user {
                match origin local
                match sub webadmin
                action add name "Paul Greenberg"
            }
            transform user {
                match origin local
                match sub webadmin1
                action add picture "https://avatars.githubusercontent.com/u/3826416?v=4" as string
            }
        }

The "main" Caddyfile now references the portal.
(defaultPortalLinks) {
        links {
                "API Metadata" /api/metadata icon "las la-star"
                "AuthDB" /authdb/ icon "las la-cog"
                "Cypress Videos" /videos/ icon "las la-photo-video"
                "My Website" https://assetq.myfiosgateway.com:8443/ icon "las la-star"
                "My Identity" "/whoami" icon "las la-user"
        }
}

{
        http_port 8080
        https_port 8443
        debug

        order authenticate before respond
        order authorize before basicauth

        security {
        import /home/greenpau/tmp/authp/authdb/portal1.include

and it worked fine.
You should be good to go.

authors: Matchlighter greenpau

repo: greenpau/caddy-security


text:
Add an option to NOT show a count for a given scope.

Not all scopes are cheap to compute a count for, even if they are useful to expose in the admin UI.
A configuration option that allows us to disable the count for a given scope would be enormously useful.

+1  This is an enormous slowdown (minutes) for large tables.

Partial progress on this, as there's now an option on index to control whether scopes are counted or not, but no love on per-scope configuration it seems.

Good news @MrJoy I have a fix written for this that will let you exclude counts on a per-scope basis like so:
scope :all, :show_count => false # defaults to true

Thanks!

Any progress here? Would love this feature as well ..

@knagode what exactly is missing? You can disable scope count per scope and also disable the pagination total count.

@javierjulio Nice. I see that show_count  option was actually merged into master.

authors: MrJoy javierjulio knagode latortuga nevir sadfuzzy


text:
October 2016 updates

RFR @jsmpereira

Garh, wrong source. My bad :smiley:

repo: greggles/mcc-codes

license: unlicense


text:
How we can use "grouping" feature, already installed mui-datatables.

How we can use "grouping" feature, already installed mui-datatables, as currently "grouping" feature is in beta version.
`import React, { useState } from 'react';
import ReactDOM from 'react-dom';
import MUIDataTable from "mui-datatables";
import InputLabel from '@material-ui/core/InputLabel';
import MenuItem from '@material-ui/core/MenuItem';
import FormHelperText from '@material-ui/core/FormHelperText';
import FormControl from '@material-ui/core/FormControl';
import Select from '@material-ui/core/Select';
function Example() {
const [responsive, setResponsive] = useState('vertical');
const [tableBodyHeight, setTableBodyHeight] = useState('400px');
const [tableBodyMaxHeight, setTableBodyMaxHeight] = useState('');
const columns = [
{
name: 'name',
label: 'Name',
options: {
setCellHeaderProps: () => ({
style: {
width: '25%'
}
}),
}
},
{
name: 'title',
label: 'Title',
options: {
setCellHeaderProps: () => ({
style: {
width: '25%'
}
}),
}
},
{
name: 'location',
label: 'Location',
options: {
setCellHeaderProps: () => ({
style: {
width: '25%'
}
}),
}
},
{
name: 'gender',
label: 'Gender'
}
];
const options = {
filter: true,
filterType: 'dropdown',
responsive,
pagination: false,
draggableColumns: {
enabled: true,
},
onTableChange: (action, state) => {
console.log(action);
console.dir(state);
},
grouping: {
columnIndexes: [1, 3]
}
};
const data = [
['Gabby George', 'Business Analyst', 'Minneapolis', 'female'],
['Aiden Lloyd', "Business Consultant", 'Dallas', 'male'],
['Jaden Collins', 'Attorney', 'Santa Ana', 'male'],
['Franky Rees', 'Business Analyst', 'St. Petersburg', 'male'],
['Aaren Rose', null, 'Toledo', 'male'],
['Johnny Jones', 'Business Analyst', 'St. Petersburg', 'male'],
['Jimmy Johns', 'Business Analyst', 'Baltimore', 'male'],
['Jack Jackson', 'Business Analyst', 'El Paso', 'male'],
['Joe Jones', 'Computer Programmer', 'El Paso', 'male'],
['Jacky Jackson', 'Business Consultant', 'Baltimore', 'female'],
['Jo Jo', 'Software Developer', 'Washington DC', 'male'],
['Donna Marie', 'Business Manager', 'Annapolis', 'female'],
['Armin Tamzarian', 'Principal', 'Springfield', 'male'],
['Gerald Strickland', 'Principal', 'Hill Valley', 'male'],
['Doc Brown', 'Computer Programmer', 'Hill Valley', 'male'],
['Angela Li', 'Principal', 'Lawndale', 'female'],
['Jake Morgendorffer', 'Business Analyst', 'Lawndale', 'male'],
];
return (
<React.Fragment>

Responsive Option
<Select
labelId="demo-simple-select-label"
id="demo-simple-select"
value={responsive}
style={{ width: '200px', marginBottom: '10px', marginRight: 10 }}
onChange={e => setResponsive(e.target.value)}>
<MenuItem value={'vertical'}>vertical
<MenuItem value={'standard'}>standard
<MenuItem value={'simple'}>simple
      <MenuItem value={'scroll'}>scroll (deprecated)</MenuItem>
      <MenuItem value={'scrollMaxHeight'}>scrollMaxHeight (deprecated)</MenuItem>
      <MenuItem value={'stacked'}>stacked (deprecated)</MenuItem>
    </Select>
  </FormControl>
  <MUIDataTable title={'ACME Employee list'} data={data} columns={columns} options={options} />
</React.Fragment>

);
}
export default Example;
`
grouping is not working in this case.

The Grouping feature probably won't be released for another week, so it cannot yet be used at this time.
You can simulate this feature using the expandableRows option, but it will require a bit of work on your part.
Also, if you can, create codesandboxes for examples (ex: https://codesandbox.io/s/muidatatables-custom-toolbar-rvmcj), they make it easier to see what you're doing.

Hi @patorjk thanks for quick reply.
This is codesandboxes link. I am doing like this. I have added "grouping" in options but it is not making a gropus.
https://codesandbox.io/s/jolly-leakey-4ot12

That feature has not yet been added to the codebase. You'll want to look at the expandableRows option instead.

Yes, but in "expandableRows" we have an issues with expandable-icon & view columns. How we can solve that. see my last comment in https://github.com/gregnb/mui-datatables/issues/1446

repo: gregnb/mui-datatables


text:
Access JsonLogic internal properties

Environment

Nuget Package: JsonLogic
Nuget Version: 1.3.1

How can I help you today?
Can internal properties be made public? I would like to post process rules after deserialization. Is there a cleaner alternative to do this?
Ex. Access rules list in AndRule

Can you give an example of what you'd like to do?

I would like to validate that the selected values in select are 'valid' before processing the rule. (product id from a product list).
Atm I'm validating the values during deserialization (iffy)

Seems like a big change. Its fine, I'll fork for my requirements.
I appreciate the library. 👍

Um... okay.  I haven't really had the opportunity to look into this yet, and I'm still not completely certain what you're looking for.

So to answer your question, I've built these libraries with a preference for immutability.  Being able to modify the rules would go against that philosophy.
I'd like to explore your need a bit more to see if there's a way that I could accommodate it.

My use case is probably niche. Don't worry about it.

repo: gregsdennis/json-everything


text:
Proposal: Node.js penetration test framework

Just in case :)
https://gist.github.com/jesusprubio/8f092af4ca252e252eab

Nice! This looks interesting. I'm going to close this issue since there doesn't seem to be anything actionable for this project, but feel free to discuss or add more details here.

authors: greim jesusprubio

repo: greim/hoxy


text:
don't re-enqueue a successful job if worker is in SHUTDOWN_IMMEDIATE …

see #138

Thanks again! I'll merge once the spelling fix is in.

authors: bp-FLN gresrun

repo: gresrun/jesque


text:
Update README.md

Updated reference to SpinneriDialog.hide([wpStatusbar]) with new optional parameter info for Windows 10 Mobile platform.

@andreszs thank you for update! But please keep in mind that it would be great if all your changes will be in 1 PR with reference to issue which are you fixed 😃

authors: andreszs greybax

repo: greybax/cordova-plugin-native-spinner