Feature: Keep file previews to Preview tab, use Icons for details

What feature or improvement do you think would benefit Files?

When selecting a text file, the contents should only be displayed on the preview text (and using some kind of container to show its a preview and not some bug with Files itself)
For images I think the thumbnail is fine, but perhaps with the filetype icon overlayed in the bottom right corner?
I would also suggest a monotype font for plain text files preview.
Requirements

Display thumbnail in details pane
Display preview in details pane

Files Version
2.4.85
Windows Version
Windows 11 (22H2): 22621
Comments
The details pane should be polished and elegant or people will just close it and not get to see additional functionality.

Thanks for the feedback, this is a good idea.

@mdtauk is this the expected behavior? (Nevermind the bad icon resolution and text preview still unformated as requested, I want to make sure I have the expectations right.)

I would like to find a way to do something with a TXT preview, so it looks less like an error. - But yes the Icon should be used for the details page, unless its an image file, where we should have a thumbnail with an icon in the corner.

@yaira2 should the header with the name/extension for all files be as the mockup shown above? And be there for both details/preview?

If that's what @mdtauk wants.

@QuaintMako do you still have the proof of concept code you showed above?

Just a reminder this is still an issue

@QuaintMako do you still have the proof of concept code you showed above?

I still have it, and still need to get back to it.

Do you want to open a draft and I can try to finish it up?

Do you want me to open a pull request with the code that QuaintMako has created?

Avez-vous eu l'occasion d'examiner ce problème ? Cela devient un peu gênant car lorsque nous sélectionnons un fichier avec le panneau de prévisualisation ouvert en mode "Détails", il ralentit lorsque la prévisualisation se charge, ce qui ne devrait pas être le cas en mode "Détails".

@Lukiluc29 if you prefer, you can use stable which doesn't have the shell preview handler yet.

@Lukiluc29 if you prefer, you can use stable which doesn't have the shell preview handler yet.

I know, but I really like the new features in the current version, so I can't go back to an earlier version.

Avez-vous eu l'occasion d'examiner ce problème ? Cela devient un peu gênant car lorsque nous sélectionnons un fichier avec le panneau de prévisualisation ouvert en mode "Détails", il ralentit lorsque la prévisualisation se charge, ce qui ne devrait pas être le cas en mode "Détails".

I'm working at the moment on finishing the code for this issue. It should be done pretty soon.

I'm working at the moment on finishing the code for this issue. It should be done pretty soon.

Awesome! You're doing amazing work.


Fix nix flake devshell

Follow-up to https://github.com/runtimeverification/haskell-backend/pull/3890

update GHC from 9.6.4 to 9.6.5
update Stackage LTS from 22.10 to 22.23
use HLS from Nix pkgs, upgrading it to <IP_ADDRESS>
update all-cabal-hashes
remove cabal.project.freeze, but keep the scrips to generate it in case we ever want it back
update README with up-to-date information about updating Haskell dependencies
add stack to Nix dev shell

remove cabal.project.freeze, but keep the scrips to generate it in case we ever want it back

Why exactly are we removing this?
We are running the unit tests and booster integration tests using a nix shell and cabal so I think it does matter?
Apart from that, I am OK with the upgrade (although not having to allow-newer would be nice...)

As I understand, the Haskell packages available in the Nix shell come from the stack resolver, since the Nix flake uses stacklock2nix. This makes cabal.project.freeze redundant in the Nix shell.
However, perhaps we indeed could keep it in the end, as otherwise the project would likely be impossible to build with pure cabal-install.


[Request] Keep zoom levels persistent across modes

I would like to request that the zoom level has a more persistent state. Currently, I think Micromapping and POI modes keep the same zoom level if you switch between them, but going to Entrance mode zooms out. Returning to the other modes from Entrance mode then zooms them out as well.
I would like it if either:

the zoom level stays the same in every map page regardless of how you switch to it (including fine-tuning position)
each mode keeps its zoom level when you go back to it. So if I'm at z19 in Micromapping, z17 in POI, going back to Micromapping would be back to z19.

I had the same annoyance. Especially when lining up the cursor, pressing "+" and having a new map appear on top, with a different zoom (annoying when the "add item" map is zoomed further out than the previous map).
My expectation is that there is one map view, which changes sizes to accommodate the different accompanying UI, instead of having each screen come with its own map. This might require panning the map when the shape changes, to keep the cursor positioned appropriately within the viewport (or in the center). Having smooth panning transitions when switching between modes, or when tapping on a busy area in micromapping mode, etc., would make it much easier to keep oriented as one moves through the app.
This is how OSMAnd, Organic Maps and Google Maps feel: there is a single map, with additional UI coming in from the top or bottom as needed. Google Maps does a good job of framing the current subject on the map when the screen changes, but I am often annoyed when it zooms into something unnecessarily, so I would err on the side of "let the user position the map" and only reposition when its definitely helpful (e.g. when the changing shape would cause the subject to move out of frame).

Adding another voice for not changing the zoom level when changing modes, especially when adding a new item to the map. This is quite disconcerting in POI mode, where not only the zoom changes, but the map also moves because the bottom panel listing existing POIs disappears from the bottom when one clicks the + button:
https://user-images.githubusercontent.com/478237/184311999-204eb9b3-b1a4-4985-9e8e-850fd9991e79.mp4
(The sudden panning of the map is related to #136.)

Done in 2.1.


reporting seed

Seed: R410-VB21-V1PCURYL100

Can you tell me what the problem was?

Hey there so in the re1 door rando killing a chimera anywhere insta crashes the game saddly
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: Ted John @.>
Sent: Saturday, December 17, 2022 6:13:54 PM
To: IntelOrca/biorand @.>
Cc: scooby1123 @.>; Author @.>
Subject: Re: [IntelOrca/biorand] reporting seed (Issue #73)
Can you tell me what the problem was?
—
Reply to this email directly, view it on GitHubhttps://github.com/IntelOrca/biorand/issues/73#issuecomment-1356610388, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A4Z7RWZ6YEWG62RWBE7XBYDWNZQNFANCNFSM6AAAAAATCGQ5QA.
You are receiving this because you authored the thread.Message ID: @.***>

Thanks, I will merge this issue with #70

Also I wanted to mention that the dbl door in the 1st zombie hall crashes the game sometimes to when opened
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: Ted John @.>
Sent: Saturday, December 17, 2022 6:19:48 PM
To: IntelOrca/biorand @.>
Cc: scooby1123 @.>; Author @.>
Subject: Re: [IntelOrca/biorand] reporting seed (Issue #73)
Closed #73https://github.com/IntelOrca/biorand/issues/73 as completed.
—
Reply to this email directly, view it on GitHubhttps://github.com/IntelOrca/biorand/issues/73#event-8063159197, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A4Z7RWZJIQJUQTU3GOI5IWDWNZRDJANCNFSM6AAAAAATCGQ5QA.
You are receiving this because you authored the thread.Message ID: @.***>

Thanks, that has been reported too:  #71


Feature request: option to change orientation when generate dotcode

Sometimes, the left to right type orientation will cause the final dot graph too wide, and we may need the top to bottom orientation.
And currently, the codebase hard code the orientation of dotcode to 'LR' in this line.
Can we provide a check_box to enable 'BT' orientation?

Please consider to provide a pull request to implement this feature idea.


Containers spacing

If you have
:::info

Instead of
::: info

on any of the containers it breaks functionality, make it so removes the spacing in this.

https://weblutions.com/i/IYNOh7.png


QR code for API token

I think it would be a good idea to add a QR code with the token next to the current API token field. I'm creating a mobile client for Linkding and for the users it would be much easier to just scan the QR code with the phone, and then the app to autofill the token on the text field, than entering on the web app from the phone and copying the token from there.

Sounds like a decent use-case, but could also be confusing for users that use the extension and then wonder what to do with the QR code. If anything, it should be built in an app-agnostic way, so that multiple client apps can work with it.


Cannot create identical appwrappers in different namespaces

When I create an AppWrapper in one namespace, it works as expected. But when I try to create the same AppWrappers in another namespace (with all the resource namespaces properly updated), the AppWrapper turns into the Failed state.

Source AppWrappers
aw000-000-30s.yaml.log

MCAD logs:
mcad.log

Failed AppWrappers
appwrappers.yaml.log

Thanks for reporting, I think MCAD needs a --generate name or internally needs to generate unique name

Quick and dirty reproducer:
#! /bin/bash

set -x

APPWRAPPER="
apiVersion: mcad.ibm.com/v1beta1
kind: AppWrapper
metadata:
  name: aw000-000-30s
  namespace: default
spec:
  priority: 10
  resources:
    GenericItems:
    - completionstatus: Complete
      custompodresources:
      - limits:
          cpu: 100m
          memory: 100Mi
        replicas: 1
        requests:
          cpu: 100m
          memory: 100Mi
      generictemplate:
        apiVersion: batch/v1
        kind: Job
        metadata:
          name: aw000-000-30s-job
          namespace: default
        spec:
          activeDeadlineSeconds: 18000
          template:
            metadata:
              name: aw000-000-30s-job-pod
            spec:
              containers:
              - args:
                - sleep $RUNTIME
                command:
                - bash
                - -c
                env:
                - name: RUNTIME
                  value: '30'
                image: registry.access.redhat.com/ubi8/ubi
                name: main
                resources:
                  limits:
                    cpu: 100m
                    memory: 100Mi
                  requests:
                    cpu: 100m
                    memory: 100Mi
              restartPolicy: Never
      replicas: 4
    Items: []
"

oc delete ns test1 test2 --ignore-not-found

oc create ns test1
oc create ns test2

echo "$APPWRAPPER" | sed 's/namespace: default/namespace: test1/'  | oc apply -f-
echo "$APPWRAPPER" | sed 's/namespace: default/namespace: test2/'  | oc apply -f-

while true; do
    if oc get appwrapper.mcad.ibm.com/aw000-000-30s -n test1 -ojsonpath={.status.state} | grep Failed; then
        oc get appwrapper.mcad.ibm.com/aw000-000-30s -n test1 -oyaml
        break
    fi
    if oc get appwrapper.mcad.ibm.com/aw000-000-30s -n test2 -ojsonpath={.status.state} | grep Failed; then
        oc get appwrapper.mcad.ibm.com/aw000-000-30s -n test2 -oyaml
        break
    fi
done

Expected output (relevant part):
status:
  canrun: true
  conditions:
  - lastTransitionMicroTime: "2023-07-27T09:11:55.530986Z"
    lastUpdateMicroTime: "2023-07-27T09:11:55.530986Z"
    status: "True"
    type: Init
  - lastTransitionMicroTime: "2023-07-27T09:11:55.569199Z"
    lastUpdateMicroTime: "2023-07-27T09:11:55.569199Z"
    reason: AwaitingHeadOfLine
    status: "True"
    type: Queueing
  - lastTransitionMicroTime: "2023-07-27T09:11:55.574809Z"
    lastUpdateMicroTime: "2023-07-27T09:11:55.574809Z"
    reason: FrontOfQueue.
    status: "True"
    type: HeadOfLine
  - lastTransitionMicroTime: "2023-07-27T09:11:58.182186Z"
    lastUpdateMicroTime: "2023-07-27T09:11:58.182185Z"
    message: 'test2/aw000-000-30s creation failure: jobs.batch "aw000-000-30s-job"
      not found'
    reason: ItemCreationFailure.
    status: "True"
    type: Failed
  controllerfirsttimestamp: "2023-07-27T09:11:55.530986Z"
  filterignore: true
  queuejobstate: Failed
  sender: before manageQueueJob - afterEtcdDispatching
  state: Failed
  systempriority: 10

This is the same issue as #383

I'm confused on what is causing this when https://github.com/project-codeflare/multi-cluster-app-dispatcher/blob/44696cfcc692db8a47386bca5aba4ff4b81d3217/pkg/controller/queuejob/queuejob_controller_ex.go#L145 exists. It seems like internally it's referenced by only its name somewhere.

@Fiona-Waters and I faced a similar issue, this time when the AppWrapper contains an item, that has the same name as an existing resource of the same kind in another namespace.
For example:

create a Job in namespace A
then create an AppWrapper, with the same Job as wrapped item, in namespace B
The Job corresponding to the AppWrapper in namespace B is never created, despite the AppWrapper has been dispatched.

/cc @ChristianZaccaria


cuelang.org: usecases/datadef: overly technical content in "On logical not" section

Originally opened by @extemporalgenome in https://github.com/cuelang/cuelang.org/issues/130
https://cuelang.org/docs/usecases/datadef/#json-schema--openapi
"On logical not" has content that is perhaps overly technical for a use-cases page. Many readers may not be familiar with the symbols for not and false/bottom, and may get the false impression that CUE is too academic/theoretical for them to learn and start using (or that CUE has important limitations in its integration with OpenAPI, despite "not" being comparatively rare).
The "On logical not" guidance may be more suited for an errata page specific to OpenAPI, and it would be consumable by a wider audience using CUE syntax (or something approximating it) to represent the dilemma and workaround.

Have moved this to https://github.com/cue-lang/docs-and-content/issues/91. That repo is private for now, but will be made public when we go live with the switch from alpha.cuelang.org to cuelang.org.


Error in run itk-convert xxx.jpg to xxx.png

System Info *
Window 10, Node v10.15.1, NPM v6.8.0

Thanks for the report.
If you build / test the package locally:
https://github.com/InsightSoftwareConsortium/itk-js/tree/master/examples/Node.js
i.e.
git clone https://github.com/InsightSoftwareConsortium/itk-js
cd itk-js/examples/Node.js
npm install
npm test

Does the test fail?

@thewtex Hi~ I tried your code but it still didn't work.
** error info **
the same as last error info:

** system info **
    System:
      OS: Windows 10 / 1803 / 17134.590
    Binaries:
      Node: 10.15.1 - C:\Program Files\nodejs\node.EXE
      npm: 6.8.0 - C:\Program Files\nodejs\npm.CMD
      python: 2.7.2

** extra **
I don't use nvm, so I use the latest nodejs.
And can I provide other forms of help if I don't try to downgrade my nodejs?

This is now addressed in itk 9.4.1 and itk-convert 1.1.1. Please upgrade and try again. Thanks again for the report :+1:

thank~


Add missing docstrings

Please add the missing docstring to the function GidOutputParameters in: stem/output.py

For those parameters, I couldn't find the exact description, not even in the source code of KRATOS:
https://github.com/KratosMultiphysics/Kratos/blob/master/kratos/includes/gid_io.h
Any idea?

The source code where these parameters are used can be found at :
~\Kratos\kratos\python_scripts\gid_output_process.py
But after seeing this i think the undescribed parameters can be removed entirely


Installing from conda installs v3.13.0

Hello!
Apologies in advance if I have posted this in the wrong location.
When executing:
conda install -c conda-forge uproot
it appears to install uproot3 (v3.13.0) with the dependency of awkward v0.15.0.
conda install -c conda-forge uproot4
offers uproot4 v0.1.2, as opposed to the current tag 4.0.3 which shows on the conda forge website.
I had understood the "naming transition" to have taken place, so I wanted to ask if this was expected behaviour?
Cheers,
Paul

Creating a new environment seems to work:
$ conda create --name test uproot
$ conda activate test
$ python -c 'import uproot; print(uproot.__version__)'
4.0.3

Conda is probably avoiding upgrading too many packages and uproot 3 is a valid solution to the install command. Have you tried conda install -c conda-forge uproot=4?

@naidoo88, respond here if @chrisburr's solution doesn't work for you. I'm closing this now, but I can reopen it if it's still an issue.

Apologies for the slow response!
Specifying uproot=4 indeed worked.  Must be as @chrisburr  said.
Thank you for your help!


С# Not found CloseVisitTypes() AddHardTypeIncompatibility

C#
.NET Framework 4.6.1
OrTools 7.4.7247 (or-tools_VisualStudio2017-64bit_v7.3.7083)
CVRPTW
I am trying to solve the following problem:
only one of the node in the list A, B, C, D can visit the vehicle.
If the route passes through node A, then it cannot pass through nodes B, C, D.
If the route passes through node B, then it cannot pass through nodes A, C, D.
Etc.
I tried to assign different types of visits to the nodes. I found the SetVisitType function in c #, however I did not find the AddHardTypeIncompatibility, CloseVisitTypes, which are present in the library sources.

void SetVisitType(int64 index, int type);
int GetVisitType(int64 index) const;
/// This function should be called once all node visit types have been set and
/// prior to adding any incompatibilities/requirements.
// TODO(user): Reconsider the logic and potentially remove the need to
/// "close" types.
void CloseVisitTypes();
int GetNumberOfVisitTypes() const { return num_visit_types_; }
/// Incompatibilities:
/// Two nodes with "hard" incompatible types cannot share the same route at
/// all, while with a "temporal" incompatibility they can't be on the same
/// route at the same time.
void AddHardTypeIncompatibility(int type1, int type2);
void AddTemporalTypeIncompatibility(int type1, int type2);

It's bug?

I understood why I can not find these functions. But will they still be implemented in the near future?
https://github.com/google/or-tools/blob/stable/ortools/constraint_solver/csharp/routing.i

// Ignored:
%ignore RoutingModel::AddDimensionDependentDimensionWithVehicleCapacity;
%ignore RoutingModel::AddHardTypeIncompatibility;
%ignore RoutingModel::AddMatrixDimension(
std::vector<std::vector > values,
int64 capacity,
bool fix_start_cumul_to_zero,
const std::string& name);
%ignore RoutingModel::AddSameVehicleRequiredTypeAlternatives;
%ignore RoutingModel::AddTemporalRequiredTypeAlternatives;
%ignore RoutingModel::AddTemporalTypeIncompatibility;
%ignore RoutingModel::CloseVisitTypes;
%ignore RoutingModel::GetAllDimensionNames;
%ignore RoutingModel::GetDeliveryIndexPairs;
%ignore RoutingModel::GetDimensions;
%ignore RoutingModel::GetDimensionsWithSoftAndSpanCosts;
%ignore RoutingModel::GetDimensionsWithSoftOrSpanCosts;
%ignore RoutingModel::GetHardTypeIncompatibilitiesOfType;
%ignore RoutingModel::GetPerfectBinaryDisjunctions;
%ignore RoutingModel::GetPickupIndexPairs;
%ignore RoutingModel::GetSameVehicleRequiredTypeAlternativesOfType;
%ignore RoutingModel::GetTemporalRequiredTypeAlternativesOfType;
%ignore RoutingModel::GetTemporalTypeIncompatibilitiesOfType;
%ignore RoutingModel::HasHardTypeIncompatibilities;
%ignore RoutingModel::HasSameVehicleTypeRequirements;
%ignore RoutingModel::HasTemporalTypeIncompatibilities;
%ignore RoutingModel::HasTemporalTypeRequirements;
%ignore RoutingModel::HasTypeRegulations;
%ignore RoutingModel::MakeStateDependentTransit;
%ignore RoutingModel::RegisterStateDependentTransitCallback;
%ignore RoutingModel::StateDependentTransitCallback;
%ignore RoutingModel::SolveWithParameters(
const RoutingSearchParameters& search_parameters,
std::vector<const Assignment*>* solutions);
%ignore RoutingModel::SolveFromAssignmentWithParameters(
const Assignment* assignment,
const RoutingSearchParameters& search_parameters,
std::vector<const Assignment*>* solutions);
%ignore RoutingModel::TransitCallback;
%ignore RoutingModel::UnaryTransitCallbackOrNull;

looking at the prototype:
https://github.com/google/or-tools/blob/dbac8c324d1fa3d37ed992174aa4c0fcc48cd673/ortools/constraint_solver/routing.h#L730
This method should not have any issue to be wrapped by SWIG. I guess it is currently ignored until someone find the time to test (i.e. or write a sample) using it in all supported "OSS" languages (i.e. java, .net, python) for consistency.

It would be great if this “someone” took the time to do this.  ))
Thx.

Alternatively, could one use a dimension of capacity 1 and have each of the nodes A, B, C, D add 1 to it?

done in 930e7fb0d62afbdd563ce5d322e93316a6f9d4c3


Better support for other languages in export2html

Let me know if this is not the correct place to discuss this feature request. I am coming from context of fastpages blog and the ask here is to have better support for multiple languages in export2html. The current implementation does convert cell containing any language into html however it has 2 limitation -

The syntax highlight gets messed up as it always assume its python code.
Using tags such as #hide_input is a problem as # is not a comment syntax in other language.

I use Databricks for most of my work so I can talk from its perspective. The way Databricks works is that it supports magic commands (%R, %md, %SQL, %scala and %python) to determine which language the code is written.

For syntax highlighting is it possible to read the this and determine which language the code is in and change? It already does proper formatting for code segment in markdown under ``` tag. Wondering if that can be reused somehow.
Once the language is determined is it possible to switch which "tags" will be used to specify prefix in tag based upon language's comment syntax (//hide_input instead of #hide_input)?
a. In case this is not possible to dynamically change what prefix will be used, is it possible to make it configurable to an extent that users can specify what prefix can be used?

To help with 2) Can you 'from nbdev import *' in a databricks notebook? If you can, you might be able to use nbdev magic flags like %nbdev_hide_input.
https://github.com/fastai/nbdev/blob/master/nbs/08_flag_tests.ipynb

In databricks the first line in code cell must be a magic command to change language (%scala, %R, etc). So once the language is changed it will through error as %nbdev_hide wont be recognized as a valid language statement.

Best place to discuss this is forums.fast.ai. If you develop a specific proposal for how to handle multi-language support, feel free to open a new issue to post it here.


store(minio): switch to @aws-sdk/client-s3

This is a smaller SDK, is more popular than minio and is most likely expected to be used by our users. I am also not happy with the current functions that declare the minio parameter, so we may want to revisit those api's.
This is a big breaking change, and compatibility with S3 like deployments should be reverified on usage.

Since the @aws-sdk/client-s3 has almost daily updates, most of the time it being only a version bump, we may want to disable this in our dependabot config or figure some way of auto ignoring these updates when nothing has changed for the s3 client

Current functions accepting the Minio client all in @compas/store

newMinioClient
ensureBucket
listObjects
removeBucket
removeBucketAndObjectsInBucket
copyAllObjects
createOrUpdateFile
getFileStream
copyFile
syncDeletedFiles
FileCache
sendTransformedImage

Quick draft for new api's;
Uses the objectStore prefix for api's requiring both sql and S3Client parameters, and objectStorage prefix for S3Client only operations.
function objectStorageGetDevelopmentConfig(): S3ClientConfig;
function objectStorageCreateClient(config?: S3ClientConfig): S3Client;
function objectStorageEnsureBucket(S3Client, bucketName, opts: { timeout?: number }): Promise<void>;
// -> Should use `waitUntilBucketExists` to check if the bucket exists with a small timeout, else create it
function objectStorageRemoveBucket(S3Client, bucketName, opts: { includeObjects: boolean });
function objectStorageListObjects(S3Client): Promise<*[]>;
function objectStorageGetFileStream(S3Client, file);

function objectStoreCreateOrUpdateFile(sql, S3Client, ...opts);
function objectStoreSyncDeletedFiles(sql, S3Client, ...opts);

function objectResponseSendFile();
function objectResponseSendTransformedImage();


Add TestCase for CircularContainer showing CircleRadius one-frame-lag

References this issue.
This test is very framerate dependent and I would recommend starting with a low framerate so it doesn't "flicker" too often. I set the delay pretty high though, so it shouldn't be too bad.
As you can see, just rescaling the CircularContainer with a non-changing box inside works without problems. If you fade out the box at the same time though (on by default), you sometimes get the square corners for a frame.

Can you PR this once again when the issue is fixed? There's kinda no point for this to be in the game as is without a fix.

I asked him to PR it so we had a testcase to work with when fixing (@FreezyLemon tried for some time but couldn't figure the underlying issue)


Problem when click on "User as authorization request pop up menu"

I've imported a collection which already was using the plugin, but when I tried to select the authorization request on popup menu I got the following error ->

Happens even clearing the workspace jwt.

Thanks for reporting this issue. I will look into it as soon as i can.

In v1.1.1 it should no longer throw this error. But most likely the plugin will not be able to determine the workspace due to some unexpected data in your collection.
I would need an export of the collection to reproduce this problem.


Remove part of string in bullet

Why:
Closes #19521

What's being changed (if available, include any code snippets, screenshots, or gifs):

Check off the following:

[x] I have reviewed my changes in staging (look for the "Automatically generated comment" and click the links in the "Preview" column to view your latest changes).
[x] For content changes, I have completed the self-review checklist.

Writer impact (This section is for GitHub staff members only):

[ ] This pull request impacts the contribution experience

[ ] I have added the 'writer impact' label
[ ] I have added a description and/or a video demo of the changes below (e.g. a "before and after video")

@chaiwattsw Thanks so much for opening a PR! I'll get this triaged for review :zap:


Consolidate type aliases into a single file

Goal
Consolidate type aliases into a single file

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

Current dependencies on/for this PR:

master

PR #384

PR #385   👈

PR #386

This stack of pull requests is managed by Graphite.

Merge activity

Feb 9, 12:20 PM EST: @bidetofevil started a stack merge that includes this pull request via Graphite.


example with custom import

Users can define their own "go" module function imports by defining a func
without a body in their source and a%_wasm.s or %_js.s file that uses the
CallImport instruction.
The compiler chooses a naming prefix of "main.$funcName", if defined in the
main package, or a fully-qualified based on the module, if elsewhere.
For example, given func logString(msg string) and the below assembly:
#include "textflag.h"
TEXT ·logString(SB), NOSPLIT, $0
CallImport
RET

If the package was main, the WebAssembly function name would be
"main.logString". If it was util and your go.mod module was
"github.com/user/me", the WebAssembly function name would be
"github.com/prep/user/me/util.logString"
You may want to add an example of this, so that you can see the impact
to the various runtimes. It is the same as the other "go".
Note that you will need to put this in a separate directory so you can
compile . or ./... and get the .s file. Also, the func has to be called, or
the compiler will skip writing it!
Here's an example which would work the same way in user-code as go's
source tree
https://github.com/golang/go/blob/master/src/syscall/js/js.go#L569
https://github.com/golang/go/blob/master/src/syscall/js/js_js.s#L63-L65

I've been playing with this for a bit and I wonder how useful this really is 🤔 You cannot really break out of the go module so it has be to included in those imports. This takes a true waPC implementation off the table, for example.
I did find out that you can override the package name, though. For example, you can do this:
//go:linkname exampleImport foo.exampleImport
func exampleImport() int32

and this:
#include "textflag.h"

TEXT foo·exampleImport(SB), NOSPLIT, $0
  CallImport
  RET

To change the import to foo.exampleImport in the go module.

oh.. sorry I should have elaborated. At least in wazero, I had planned to allow folks to configure custom host functions. I think translating from the go stack semantics to a normal signature is automatable also, but at least dealing with stack pointers should work.
Ex. in worst case:
wasm_exec.NewBuilder().ExportFunction("main.logString", func(ctx context.Context, api.Module, sp uint32) {...})

Ex. in best case we mechanically do the stack pointer thing given the signature we receive (via reflection)
wasm_exec.NewBuilder().ExportFunction("main.logString", func(ctx context.Context, api.Module, offset, len uint32) {...})

In any case, you are right. Unless something allows changing the host functions in the "go" package, either directly, or via ImportRenamer,  it wouldn't work


Use type_safe for EduProgramQueue

Description:
Use type_safe types for fields of structures EduQueueEntry and StatusHistoryEntry.
Files
Sts1CobcSw/EduProgramQueue.hpp

Fixed by 20850e634f3a6be07d17987218db54b46f6dfc91 and cf4a61cb804378a3b3f38d124fc6b490e508118f

Merged by #18


Invalid Config Error

Hi, I had to rebuild my network due to an AP failure. While fixing the issues my hive integration suddenly stopped working. I tried re-installing the hive component but got the following error, I am not sure what to do as the only config I am aware of is the inclusion of the username and password in secrets and appropriate Hive: config in the config file. Can you suggest where I might start with this issue?  Thanks for your assistance.
My HA is 0.113.3 running in a docker container on Synology NAS.
Error during setup of component hive
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 193, in _async_setup_component
result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 483, in wait_for
return fut.result()
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/hive/init.py", line 125, in setup
devices = session.core.initialise_api(username, password, update_interval)
File "/usr/local/lib/python3.8/site-packages/pyhiveapi/pyhiveapi.py", line 767, in initialise_api
if product["parent"] == device["props"]["zone"]:
KeyError: 'zone'

Sorry, a switch misconfiguration caused the problem. Now resolved.


[Bug]: Button - Background color staying after clicking with mouse

Contact Details
No response
What happened?
The background color should follow the same rules as the blue border. It should only show on focus of the keyboard.
After clicking:

See reported issue: https://workleap.slack.com/archives/C0225DYUSH1/p1704403978461659
Component
Button
Component Version
latest
Which browsers are you seeing the problem on?
No response
Mobile Device
No response
Relevant log output
No response

Completed


EventGrid Exception is fired when starting up module

When starting up the EventGrid Module on IotEdgeHub Dev, the following Exception is fired in the EventGridModule:
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.    at Microsoft.Azure.EventGridEdge.IotEdge.SecurityDaemonClient..ctor() in /home/vsts/work/1/s/tools/SecurityDaemonClient/SecurityDaemonClient.cs:line 60    at Microsoft.Azure.EventGridEdge.IoTEdgeHost.IoTEdgeEnvironment..ctor() in /home/vsts/work/1/s/src/IoTEdgeHost/IoTEdgeEnvironment.cs:line 35    at Microsoft.Azure.EventGridEdge.IoTEdgeHost.Program..ctor() in /home/vsts/work/1/s/src/IoTEdgeHost/Program.cs:line 37    at Microsoft.Azure.EventGridEdge.IoTEdgeHost.Program.Main() in /home/vsts/work/1/s/src/IoTEdgeHost/Program.cs:line 46    at Microsoft.Azure.EventGridEdge.IoTEdgeHost.Program.<Main>()
This is probably because that Environment Variables are missing in the module, since it seems that the SecurityDaemonClient tries to parse these out during startup:
IOTEDGE_MODULEID
IOTEDGE_DEVICEID
IOTEDGE_IOTHUBHOSTNAME
IOTEDGE_MODULEGENERATIONID
IOTEDGE_GATEWAYHOSTNAME
IOTEDGE_APIVERSION
IOTEDGE_WORKLOADURI
This is probaply related to IotEdgeHub Dev simulator, not being working properly. But it makes developers unable to use EventGrid On Edge module, until both teams works out a solution for this.
A suggestion on how to fix this, could be to include those variables in a configuration.json file, which the EventGrid reads, if it cannot find the Environment variables during startup. This configuration file, could be stored along with the persisted metadata on the docker volume.

Hi,
Thanks for your response - its appreciated.
I agree that the issue is actually with the IoT EdgeHub Dev Team, and I have raised the Issue on their GitHub page here: https://github.com/Azure/iotedgehubdev/issues/264
The whole problem is the fact, that IoT EdgeHub dev simulator does not work properly when it comes to Environment Variables. If I set an environment variable in any Module in its CreateOptions section like this:
             "createOptions": {                 "Env": [                   "inbound:clientAuth:clientCert:enabled=false",                   "inbound:serverAuth:tlsPolicy=enabled",                   "outbound:webhook:httpsOnly=false",                   "IOTEDGE_MODULEID=EventGrid"                 ],
It doesnt work. In my startup code of the module, if I Add the Line:
string iotHubHostName = Environment.GetEnvironmentVariable("IOTEDGE_IOTHUBHOSTNAME");
the iotHubHostName variable is null.
We hope to use EventGrid on Edge in the future, when its working properly with the development tools offered by Microsoft.


CB-8754 Introduce the createDefaultImageCatalog setup step to the E2E test

The createDefaultImageCatalog(testContext); required for the E2E tests' setup, because of
if (!resources.containsKey(key) || resources.get(key) == null) {
            throw new NoSuchElementException(
                String.format("Key: '%s' has been provided but it has no result in the Test Context's Resources map", key));
        }

However some of the setup methods do not contain this.
So the missing createDefaultImageCatalog(testContext) step has been introduced to these.

So basically this is only required for the TestContext to be aware that there is an image catalog available, but in most of the testcases I assume we are not doing much just use the default cagtalog.
Can we somehow spare the additional API call?

So basically this is only required for the TestContext to be aware that there is an image catalog available, but in most of the testcases I assume we are not doing much just use the default cagtalog.
Can we somehow spare the additional API call?

Refactored the previous solution. So we can :)


Remove references to the commercial license agreement in the distributions

Here's a list of file that refer to a "commercial license agreement (Enterprise Platform)"
Operaton never licensed anything under these agreement (it's Apache-2 only) and does not offer such a commercial license, so it must be removed from the repo.
https://github.com/operaton/operaton/blob/main/distro/run/assembly/resources/README.txt#L10
https://github.com/operaton/operaton/blob/main/distro/tomcat/assembly/src/README.txt#L10
https://github.com/operaton/operaton/blob/main/distro/wildfly/assembly/src/README.txt#L10

Also this reference to the "Enterprise Platform" should be removed in the license book https://github.com/operaton/operaton/blob/main/distro/license-book/src/main/resources/license-book.txt#L13


Changes to Jenkins build parameters take one build to queisce

If there are preexisting builds (e.g. nightly builds or 2nd+ PR build) and the Jenkins parameters defined in Jenkinsfile or Jenkinsfile.nightly change, the changes do not affect the to the next build.
Context
I noticed this when first when my preeemptible changes (#1290 ) landed, but did not affect the next build.  I dismissed this first time it as a fluke.
I then noticed this behavior again when I updated the robotest version in PR #1312 and the next build failed because it wasn't using the new container, resulting in
suite_test.go:82: failed to parse args: no such function: "upgrade"

Which stems from the backwards incompatible change in https://github.com/gravitational/robotest/pull/190
The parameters I'm talking about are here:
https://github.com/gravitational/gravity/blob/c3823b8ff7b176d38f6a5b4d50f14e6b8b890438/Jenkinsfile#L12-L44
https://github.com/gravitational/gravity/blob/c3823b8ff7b176d38f6a5b4d50f14e6b8b890438/Jenkinsfile.nightly#L55-L87
These do not apply to the first build after a change, because as Job parameters, they exist as configuration state within the Jenkins instance.  They're then set to the old defaults when propegateParamsToEnv is run:
https://github.com/gravitational/gravity/blob/c3823b8ff7b176d38f6a5b4d50f14e6b8b890438/Jenkinsfile.nightly#L2-L8
Which results to line 4 evaluating false.  This means the Jenkins job config is changed but not the local environment variables, which are set to the previously configured defaults.  With the job config changed, the next build will pick up the changes -- or in the case of PR builds, the first build will always pick up all changes.

I see a couple potential approaches:

Stop using Jenkins job parameters for PR & Nightly jobs.
Add code to force immediate parameter propagation when desired.
Live with it as is.

If you have other ideas, please let me know!
Digging into these options further:
Stop using Jenkins job parameters for PR & Nightly jobs.
This will sacrifice flexibility, as currently Gravitational employees may choose to manually re-trigger jobs and custom tweak parameters.  I don't know if anyone uses this capability currently.
The parameterization code goes back to https://github.com/gravitational/gravity.e/commit/1882698eb1bddaa0ecddcc1f2681c362e5898c6d, which doesn't offer any context as to why it was set up that way.
Add code to force immediate parameter propagation when desired.
To do this, we could add another parameter to detect when Jenkins cached parameters should be ignored/overwritten.  This couldn't be a static thing as something like `OVERWRITE_PARAMETERS=true" would be the same as option 1.  Instead, we'd need a quiescence detector.  Something like the following pseduocode:
if cached.QD != defined.QD:
    overwriteAllParameters()
else:
    overwriteUndefinedParameters()

Then with each intentional change to other parameters, QD (need a bettter name) can be updated to force the next job to immediately pick up changes.
This approach is obtuse and adds complexity to an already confusing situation.  We'd  need good inline documentation and probably links to this issue to explain what is going on.
Live with it as is, but add process/documenation to mitigate impact.
This is easy now, but means that we'll have "expected" failures each time someone edits any parameters in our Jenkinsfiles and changes other dependent code at the same time.  We can mitigate by leaving comments warning others about the risk, and establishing a manual (read: error prone) process where employees make sure they edit parameters to the new values in the Jenkins UI before the next build is run.

I surveyed Gravity developers in slack about whether they use Jenkins job parameters for PR & nightly jobs.  No one volunteered that they do.
Thus, in order to decrease complexity (and flexibility), I'm choosing to implement option 1: Stop using Jenkins job parameters for PR & Nightly jobs.
I recognize that this will have a couple consequences:

It will make it more difficult for to come back and run tests against old code.  We're more likely to need to update these variables in the code for old branches.
This also means that we can expect to need to port changes related to these variables to all active lines of development.

However, both of these were largely true anyhow, as everyone seems to stick with the defaults.  Regardless of whether we change the default in the code or the only option in the code, the amount of edits/porting will be relatively constant.

Related discussion on the more holistic jenkins issue here: https://stackoverflow.com/questions/46680573/

@eldios just hit this in #1297 after merging in c3823b8ff7b176d38f6a5b4d50f14e6b8b890438 into the PR branch  Definitely something that folks will trip on... especially for long lived PRs that may sync from master multiple times.

This same behavior bit us in https://github.com/gravitational/pithos-app/pull/134
https://jenkins.gravitational.io/job/Pithos/view/change-requests/job/PR-134/23/


104/color function adapter

Resolves #104

Changing between views, is currently done by calling the adapter function with some other parameter from the enum VIEW.
This should be changed along with adding some view/radio button ui.


Writing custom optimizers

Is there a way to extend and write custom optimizer to support other command line utility tools?

In 1.2.2 version I added a simple way to add custom optimizer. Docs: https://github.com/psliwa/image-optimizer#custom-optimizers


The app list is not updated automatically?

Any plans to maintain this any longer? Or is it abandoned?

I had to turn off the auto build feature to avoid exceeding limits in netlify. Right now the app uses netlify free plan and building for every update would eat up all the build minutes available.
I have to setup an external runner in order to build it without limitations.
I just did a manual build to update the data for now.
This project is still relevant IMO so no, it's not abandoned 🙃

@8byr0 Hey there! Mind updating the directory again? We just added our application to the list and I'd like to direct folks to its listing on this app.


Private key is present in mitmproxy-ca-cert.p12

Steps to reproduce the problem:
Private key is inserted in .p12 file, although filename says "mitmproxy-ca-cert.p12"
Output can be verified with:
openssl pkcs12 -in mitmproxy-ca-cert.p12 -nocerts -nodes
I don't have a Windows machine to test if a .p12 file would work without the private key inside.
We can generate a .p12 file without key with:
openssl pkcs12 -export -nokeys -in mitmproxy-ca-cert.pem -out mitmproxy-ca-cert.p12
-> If private key is needed, file could be renamed "mitmproxy-ca.p12" for better understanding
-> If private key is not needed, .p12 generation should be modified
System information
Mitmproxy version: 2.0.1 (release version) Precompiled Binary
Python version: 3.5.2
Platform: Darwin-16.6.0-x86_64-i386-64bit
SSL version: OpenSSL 1.0.2j  26 Sep 2016
Mac version: 10.12.5 ('', '', '') x86_64

Thanks for the useful report. I just tested this and found that the private key is not needed. Fixing this in certs.py should be quite easy, so I'll leave this open for new contributors! :)


Serve streaming on localhost by default to match k8s 1.11 default.

Ref https://github.com/containerd/cri/issues/777.
Change the default config to match Kubernetes 1.11 default behavior.
Initially, I thought we should keep default unchanged so that the default config can work with both K8s 1.10 and 1.11.
However, I talked with @dmcgowan today, and we found users don't like arbitrary fixed port listening. Given that we don't need a fixed port anymore for K8s 1.11, I think we should change the default to match the k8s 1.11 behavior to get rid of this fixed port.
We need to mention in the release note that, if you want to use containerd 1.2 with K8s 1.10, please set stream_server_address="" and stream_server_port to a fixed port if you need a fixed one.
Signed-off-by: Lantao Liu<EMAIL_ADDRESS>

Agree arbitrary not as good as specified port.. more secure.

Just to clarify, with this PR, we are going to use arbitrary (non-fixed) port on localhost. Because it is localhost, there shouldn't be security problem ideally.

Sry was typing fast. I meant Agree with arbitrary point, but specified is more secure.  Release note and maybe a note in the config.md will suffice.

Which reminds me.. can we update the comment for this up on line 105- and the config.md?

@mikebrow Make sense... Will do! Thanks for reminding!

@mikebrow Done.


Parse the output of pkg-config in a more reliable way.

On OpenBSD (and maybe other platforms), pkg-config can return a trailing newline
character. This then led the build script to think the last include directory
was "/usr/local/lib/glib-2.0/include\n" -- notice the \n! -- which wasn't found,
leading to a build error. Switching from split(' ') to split_whitespace() solves
the problem nicely, as the latter guarantees to strip out whitespace.

Thanks for the fix ! I wait for travis and then I merge.

OK, thanks!

Ok it's good. Thanks again !


[c#] Handle gbc from path on macOS

On macOS (and likely Linux), when gbc was not found under
BOND_COMPILER_DIRECTORY--typically when it was found on $PATH--the
output directory for the generated C# files ended up having inconsistent
directory separator translation applied to it.
gbc was invoked with an output directory like
--output-dir="obj/Debug/net45/\.", which placed the generated files in
a directory under net45 named \.. However, when csc was invoked,
it was given generated file paths like obj/Debug/net45//foo_types.cs,
which did not exist, causing compilation to fail.
This inconsistency occurred because when the command line for gbc from
$PATH was constructed, none of the elements look like a path, so MSBuild
didn't translate the trailing \. added to the output-dir argument:
<_BondCommand>"$(_BondExe)" $(BondCodegenMode) $(_BondImportDirs) --jobs=-2 --namespace=bond=Bond --output-dir="$(BondOutputDirectory)\."</_BondCommand>

The \. was added to guard against $(BondOutputDirectory) ending with a
slash and then having CMD treat a string like
--output-dir="obj\Debug\net45\" as having an escaped double-quote in
it.
When gbc came from BOND_COMPILER_PATH, it looked like a path, so the
added \. got translated to /.
As a fix, the codegen targets now use $(_BondOutputDirectoryNormalized),
which always has a trailing slash and always uses forward slashes.
Windows, macOS, and Linux can all handle forward slashes for paths.

Merged with eca53e2278c6ef350bbf687fd4a9a248e450d9df


Fix flaky test SegmentReplicationWithRemoteStorePressureIT.testAddReplicaWhileWritesBlocked

Description
This test fails on ensureGreen after adding a replica. This is run inside of the try with resources that blocks operations.  The block works by mocking transport calls to prevent segrep from completing until released.  This will prevent force-sync recovery of the replica from completing, block recovery, and eventually result in ensureGreen timing out.  Fixed by moving the ensureGreen until after releasing blockOperations.
This PR also reduces the doc count that is used while indexing down from max 200.  Writes wit h the remote store version of this test take a much longer time to execute whe n performed serially, and we don't need this many docs indexed to create needed checkpoints.
Related Issues
Resolves #8887
Check List

[ ] New functionality includes testing.

[ ] All tests pass

[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[ ] Commits are signed per the DCO using --signoff
[ ] Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Gradle Check (Jenkins) Run Completed with:

RESULT: FAILURE ❌
URL: https://build.ci.opensearch.org/job/gradle-check/23274/
CommitID: 67bd594
Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green.
Is the failure a flaky test unrelated to your change?

Task :test:fixtures:krb5kdc-fixture:composeBuild FAILED

Gradle Check (Jenkins) Run Completed with:

RESULT: FAILURE ❌
URL: https://build.ci.opensearch.org/job/gradle-check/23276/
CommitID: 67bd594
Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green.
Is the failure a flaky test unrelated to your change?

[org.opensearch.indices.replication.SegmentReplicationSuiteIT.testDropRandomNodeDuringReplication](https://build.ci.opensearch.org/job/gradle-check/23276/testReport/junit/org.opensearch.indices.replication/SegmentReplicationSuiteIT/testDropRandomNodeDuringReplication/)
[org.opensearch.indices.replication.SegmentReplicationSuiteIT.testFullRestartDuringReplication](https://build.ci.opensearch.org/job/gradle-check/23276/testReport/junit/org.opensearch.indices.replication/SegmentReplicationSuiteIT/testFullRestartDuringReplication/)
[org.opensearch.indices.replication.SegmentReplicationSuiteIT.testDeleteIndexWhileReplicating](https://build.ci.opensearch.org/job/gradle-check/23276/testReport/junit/org.opensearch.indices.replication/SegmentReplicationSuiteIT/testDeleteIndexWhileReplicating/)
[org.opensearch.indices.replication.SegmentReplicationSuiteIT.classMethod](https://build.ci.opensearch.org/job/gradle-check/23276/testReport/junit/org.opensearch.indices.replication/SegmentReplicationSuiteIT/classMethod/)

https://github.com/opensearch-project/OpenSearch/issues/9499


Separate crate from cli

As frens suggested, It would be best to separate crate from cli probably using cargo features:
[dependencies]
clap = { version = "4.4.12", features = ["derive"] , optional = true }

[features]
cli = ["dep:clap"]

And then mark the main function like:
#[cfg(feature = "cli")]
pub fn main() {
}

What do you think?

CLI isn't a part of the api that would be used by people using this project as a dependency. And that's why it should be not included in this crate at all imo.

that's why it should be not included in this crate at all imo.

Yup. But. do you think it is optimum to follow the suggestion above that will exclude the cli if you wanna add the crate as dep instead of splitting the project into two separate crates?
[dependencies]
ipcap = { version = "0.1.0" }

In this case, the cli will not be installed because the cli feature is not enabled like so:
[dependencies]
ipcap = { version = "0.1.0", features = ["cli"] }

Now, the question is: Will this remove clap and all its related code from compilation step? That's something we should experiment with. What do you think?


Fixes #293 - Adds Paging in Top / Bottom / Both

Implements #293 by changing table pagination into a component and making its display configurable (top and footer are now both switches, it's backwards compatible though).
I'm happy this was easier than I thought, great job with structuring the components - it was easy to jump on the task!

@koskila ,
There are now conflicts. Can you please fix this?

Should be good now @Christian-Oleson . I don't think I made any changes to BaseMatTable.cs, not sure if I inadvertedly changed the line endings (weird if that happened for most rows but not all) which marked the file as modified...

Should be good now @Christian-Oleson . I don't think I made any changes to BaseMatTable.cs, not sure if I inadvertedly changed the line endings (weird if that happened for most rows but not all) which marked the file as modified...

@koskila , you can probably close this since MatBlazor is pretty much dead

Fair enough 😐


Logout session after Twitter Share?

Is it possible to logout the Twitter account after share something?

Nope, your app doesn't have control over the Twitter app.


update to Scala 2.13.10

Recent Scala 2.13 versions deprecated the -target option which then fails the docs module compilation which has warnings as errors.
(Extracted from #81 because it was more complicated than expected)

We don't really expect behavior changes here, it should be less intrusive than all the package renamings associated changes.

We don't really expect behavior changes here, it should be less intrusive than all the package renamings associated changes.

👍 Feel free to merge, also since we are also dealing a http server I think this is less of a concern compared to pekko core


[Xcode] Stop shipping Version.xcconfig with the framework

Downstream swift clients may now use the bindings in the framework
directly, thus do not need to rely on build system trickery to set the
version information.

@swift-ci please smoke test

@swift-ci please smoke test

@swift-ci please smoke test


Make EOF in JSON.parse human-oriented.

What?
Wrap the io.EOF in JSON.parse to make it human-oriented.
Why?
Resolves: #503

Thanks!


Revisit JDK checks in ballerina executable files

Description:
Currently JDK checks are being removed in ballerina executable files.
We need to test  and verify the full ballerina distribution and then revisit JDK checks.

We have enabled these checked and tested ballerina distributions

We have enabled these checked and tested ballerina distributions


Upgrade swift quickstart to swift 3.0

question - should we have a Swift 2.x QS AND a separate Swift 3.x QS, or should we just have the one?  Let's discuss internally.


change build badge to svg

...it looks better.

Coverage remained the same at 60.68% when pulling 353f2694cd365498c3dbf009f9d2889d7bc4b872 on a0viedo:patch-1 into c0775f4f4a2e7718d3f0e1edb3a818b945485e41 on slackhq:master.

Thanks @a0viedo!
@DEGoodmanWilson this LGTM 👍


Add a basic rust-toolchain.toml

Matches the one in Zebra, although I think pinning to a specific release (e.g., channel = "1.82") would help with consistency, perhaps avoiding issues like
https://github.com/ZcashFoundation/zcash_script/pull/174#issuecomment-2445336306

Ah, good. This captures that the build failures are due to rustc 1.81, and not anything in #174. And also a reason to pin to a specific rustc version – changes outside of the repo shouldn’t cause a working repo to start failing.

@conradoplg The issue from https://github.com/ZcashFoundation/zcash_script/pull/174#issuecomment-2427737764 occurs on master, this PR tries to pin down rustc a bit to avoid it.

1.81 – works
1.82–1.84 (beta) – not working
1.85 (nightly) – working again

So, the problem seems to be fixed with just a bit of waiting … however I can’t find anything obvious in the 1.82 or 1.85 changelogs that would indicate why this started/stopped happening.
I’ve currently pinned this to 1.81 (and I would ideally pin to a specific version even if there wasn’t a bug, because it’s better for consistency). Zebra would need to be similarly pinned for it to depend on this before mid-Feb.
However (as you can see in the failing check) unsafe extern "C" wasn’t supported until 1.82, and cargo package is complaining about it. But I don’t understand why master passed the same check when it used 1.81 (and there are no changes related to that code in this PR).
I think everything would pass if I pinned to 1.85, but

I can’t actually pin to "1.85" since it’s not released yet, and
I don’t want to pin to "nightly" because it’ll keep shifting.

Maybe I can pin to today’s date?

However (as you can see in the failing check) unsafe extern "C" wasn’t supported until 1.82, and cargo package is complaining about it. But I don’t understand why master passed the same check when it used 1.81 (and there are no changes related to that code in this PR).

I understand why this failure is happening. The unsafe extern is generated by bindgen, which targets latest stable by default. When 1.81 was current, it would have generated extern instead of unsafe extern. Simply adding a rust-toolchain.toml doesn’t affect bindgen, so it was generating 1.83-compatible code, which didn’t work with our rust-toolchain.toml pinning to 1.81.
What’s confusing me now is that the Cargo.lock file pins a version of bindgen (0.69.4) that is too old to generate rustc 1.82-specific code, but one of the CI jobs (“Package (rust_toolchain.toml)”) appears to ignore the Cargo.toml and pull a newer version of bindgen that does support 1.82, which is why that was the only job that was failing.
For now, I am setting the rust_target to the newest version supported by bindgen 0.69.4, which is 1.73, and quieting the deprecation error that the one CI job triggers. But I would love to have that CI job not get a different bindgen version than everything else …


In useGoogleOneTapLogin, google one tap is still popping up after user logs in dispite disabled prop

useGoogleOneTapLogin({
onSuccess: async (credentialResponse) => {
setIsLoading(true);
let payload = {
client_id: credentialResponse?.clientId,
credential: credentialResponse?.credential,
select_by: credentialResponse?.select_by,
use_jwt: 1,
};
if (credentialResponse?.credential) {
loginWithOneTapMutate(
{ payload: payload },
{
onSuccess: async (res: any) => {
if (res?.data?.message?.signup) {
loginWithOneTapMutate(
{ payload: payload },
{
onSuccess: async (res: any) => {
handleLoginProcess(res?.data);
},
onError: (e) => {
setIsLoading(false);
toast({
title: "Error",
description:
"An error occurred while signing in with Google, please try later",
variant: "destructive",
});
},
}
);
return;
}
handleLoginProcess(res?.data);
setIsLoading(false);
},
onError: (error: any) => {
setIsLoading(false);
if (error.response.status == 409) {
toast({
title: "Error",
description: "Please sign up first",
variant: "destructive",
});
return;
}
toast({
title: "Error",
description:
"An error occurred while signing in with Google, please try later",
variant: "destructive",
});
},
}
);
}
},
onError: () => {
setIsLoading(false);
toast({
title: "Error",
description: "Login Failed",
variant: "destructive",
});
},
disabled: token !== null
});

It pops up if you go to some other page after login


Add missing comma

Missing comma above reactions class caused them to have the same color as the background.

thanks


GSD Request

--- GSD JSON ---
{
  "vendor_name": "Linux",
  "product_name": "Kernel",
  "product_version": "versions from v4.13 to before v5.10.85",
  "vulnerability_type": "unspecified",
  "affected_component": "unspecified",
  "attack_vector": "unspecified",
  "impact": "unspecified",
  "credit": "",
  "references": [
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=95e339b6e85d03438d1d9236ccaff4ecd895f3ab",
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=af7fbb8c0b5438494ef5f6474011aebbb42ee00c"
  ],
  "extended_references": [
    {
      "type": "commit",
      "value": "95e339b6e85d03438d1d9236ccaff4ecd895f3ab",
      "note": "introduced"
    },
    {
      "type": "commit",
      "value": "af7fbb8c0b5438494ef5f6474011aebbb42ee00c",
      "note": "fixed"
    }
  ],
  "reporter": "joshbressers",
  "reporter_id": 1692786,
  "notes": "",
  "description": "iio: adc: stm32: fix a current leak by resetting pcsel before disabling vdda\n\nThis is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven.\nThis ID is fixed in Linux Kernel version v5.10.85 by commit af7fbb8c0b5438494ef5f6474011aebbb42ee00c, it was introduced in version v4.13 by commit 95e339b6e85d03438d1d9236ccaff4ecd895f3ab. For more details please see the references link."
}
--- GSD JSON ---

This issue has been assigned GSD-2021-1002521


calculating stake distribution with relations

This PR presents the stake distribution calculation in a different way, by using relations:

Additionally, I've removed the PooledStake type, and no longer pass around that nested structure (which consolidated the pool owners into a single key value pair).  Now instead we pass along the (un-pooled) stake distribution together with the delegation map. Such as in the stake distribution snapshots:

When we do need to filter down to one pool, we use this new method:

Besides that, there were just a few minor edits:

there was still a reference to the ACNT rule, which is now called REWARD
there was a paragraph about how withdrawal accounts work that was describing how things used to work, so it was removed
a clarification in the prose where "delegation certificate" was vague (ie all five types or just the one type that delegates stake to a pool).

Any reason why we have assignee's instead of reviewers this time? Trying to make it hard for people to ignore your PR's :P :)

Any reason why we have assignee's instead of reviewers this time? Trying to make it hard for people to ignore your PR's :P :)

Oops, I did not mean to do that! :) Thank you for letting me know!

@dnadales thank you again for your help today! I've redone the notation for relations. I've added an UPDATE section to the PR description above.


Email field instead of name

Is it possible to use email instead of name?

Hi,
It will be when Elixir 1.2 comes out, which should be very soon. Then you'll be able to configure it.

Added unique_id value to the config. Set this to "email" and make sure that your login form returns an email field.
If you have any problems, let me know.

With version 0.12, the way you implement this has changed.
Now there is no configurable value for unique_id. You need to call unique_id when running Openmaize.Login, like this:
plug Openmaize.Login, [unique_id: :email] when action in [:login_user]

I see, thank you for implementing this!


Improve error handling for primary ECDR outputs

This PR improves how errors and log messages are handled throughout the code.

Use logger.debug more extensively, replacing the nearly universal use of logger.info. DEBUG level log statements will appear in dev, but not in other environments (set ENVIRONMENT=dev to achieve this verbose logging).
Formalizes how errors are written for outputs published by the ECDR. Now "error" files get written to a separate "errors" subdirectory of the ecdr_data_dir.
Errors are raised if errors are encountered, resulting in non-zero exit codes. I've tried to replicate the original behavior (where it mattered) of e.g., for the complete daily CLI, letting failures "go" until after an entire range of dates is completed. Instead of just logging these errors, an error gets raised after all dates have been attempted, if an error was encountered for any of the dates.

We should also add log success statements for normal processing.


*json.UnsupportedTypeError in /fllws/Bruna Briskey

Error in Go-Minitwit
*json.UnsupportedTypeError in /fllws/Bruna Briskey
json: unsupported type: func() time.Time
View on Bugsnag
Stacktrace
/app/api/api.go:282 - main.func5

View full stacktrace
Created automatically via Bugsnag

An error linked to this issue has been marked as fixed in Bugsnag
*json.UnsupportedTypeError in /fllws/Chase Leclerc

An error linked to this issue has been reopened in Bugsnag
*json.UnsupportedTypeError in /fllws/Christopher Makos

An error linked to this issue has been reopened in Bugsnag
*json.UnsupportedTypeError in /fllws/Na Boesiger

An error linked to this issue has been marked as fixed in Bugsnag
*json.UnsupportedTypeError in /fllws/Merrill Fellinger

An error linked to this issue has been reopened in Bugsnag
*json.UnsupportedTypeError in /fllws/Lissa Bastille

An error linked to this issue has been marked as fixed in Bugsnag
*json.UnsupportedTypeError in /fllws/Francisco Lavelli


python311Packages.kajiki: add input linetable

Description of changes
Fix build (https://hydra.nixos.org/build/219848489)
ZHF: #230712

Things done

Built on platform(s)

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

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

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

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

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

[ ] Fits CONTRIBUTING.md.

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

8 packages built:

python310Packages.kajiki
python310Packages.kajiki.dist
python310Packages.linetable
python310Packages.linetable.dist
python311Packages.kajiki
python311Packages.kajiki.dist
python311Packages.linetable
python311Packages.linetable.dist


How to use captureAudio.tsx file

I am having trouble integrating the mentioned function into my teams app which is based on node.
Consider me as a beginner.

@1pervysage0 - Could you please share more details and which sample code you are referring?

@Nivedipa-MSFT
samples/tab-device-permissions/nodejs/src/components/CaptureAudio.tsx

@1pervysage0 - Could you please share the error logs which you are getting?

@Nivedipa-MSFT  actually I am not able to compile because the file in typescript and I am using JavaScript. So there is always an error of some kind. I want to ask how will you proceed with the given code snippet and integrate it where? Which API will you use it to call that function?
Assume that there is a task module opening from the messaging extension and the content within the iframe of task module is coming from different source website.

@1pervysage0 - For capturing audio you need to use media capability API's from Microsoft Javascript Teams SDK.
You can use selectmedia and getmedia API's
You can refer below javascript code for capturing audio.
let mediaInput: microsoftTeams.media.MediaInputs = {
    mediaType: microsoftTeams.media.MediaType.Audio,
    maxMediaCount: 1,
};
microsoftTeams.media.selectMedia(mediaInput, (error: microsoftTeams.SdkError, attachments: microsoftTeams.media.Media[]) => {
    if (error) {
        if (error.message) {
            alert(" ErrorCode: " + error.errorCode + error.message);
        } else {
            alert(" ErrorCode: " + error.errorCode);
        }
    }
    // If you want to directly use the audio file (for smaller file sizes (~4MB))    if (attachments) {
    let audioResult = attachments[0];
    var videoElement = document.createElement("video");
    videoElement.setAttribute("src", ("data:" + y.mimeType + ";base64," + y.preview));
    //To use the audio file via get Media API for bigger audio file sizes greater than 4MB        audioResult.getMedia((error: microsoftTeams.SdkError, blob: Blob) => {
    if (blob) {
        if (blob.type.includes("video")) {
            videoElement.setAttribute("src", URL.createObjectURL(blob));
        }
    }
    if (error) {
        if (error.message) {
            alert(" ErrorCode: " + error.errorCode + error.message);
        } else {
            alert(" ErrorCode: " + error.errorCode);
        }
    }
});

Ref Doc: https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/device-capabilities/mobile-camera-image-permissions#:~:text= Integrate media capabilities  1 Advantage of,on the... 5 Code snippets.  More

@1pervysage0 - Could you please confirm if the above suggestion helped you in any way or are you still facing the issue?

Actually this is in typescript. How can i integrate the above function with JavaScript file?
Using it, server wont start.

@1mehmood0 - first you have to install the microsoft/teams-js package
You can install the package using npm or yarn:
npm install --save @microsoft/teams-js
yarn add @microsoft/teams-js

reference the entire library using a script tag. There are three ways to do this:
<!-- Microsoft Teams JavaScript API (via CDN) -->
<script src="https://statics.teams.microsoft.com/sdk/v1.5.2/js/MicrosoftTeams.min.js" crossorigin="anonymous"></script>

<!-- Microsoft Teams JavaScript API (via npm) -->
<script src="node_modules/<EMAIL_ADDRESS>
<!-- Microsoft Teams JavaScript API (copied local) -->
<script src="MicrosoftTeams.min.js"></script>

Then you can use this SDK functions.
Ref Doc: https://docs.microsoft.com/en-us/javascript/api/overview/msteams-client?view=msteams-client-js-latest

@1mehmood0 - Follow below steps:

Install the install the microsoft/teams-js package
Reference the microsoft/teams-js library using a script tag in your javascript file.
Now you can directly use the microsoft/teams-js package functions in your javascript file like below:
microsoftTeams.media.selectMedia()

@Nivedipa-MSFT  I tried doing that but in iframe of task module on clicking the function invoking button, nothing happens.
I get the error of DOMException: Permission Denied

@1mehmood0 - Have you added devicePermissions property in manifest file like below?
"devicePermissions": [
    "media",
],

@Nivedipa-MSFT yes of course it was the fist thing I did.

@1mehmood0 - Could you please share your code zip file to check at our end?

Hello @1mehmood0 - Hope you are doing well!!
Could you please confirm if your issue has resolved or still looking for any help?

We are closing this issue for now, please feel free to reopen it, if required.


Could not find a declaration file for module.

I'm trying to utilise this library within a NextJS App directly project. However, I receive the following error:
Could not find a declaration file for module '@uidotdev/usehooks'. '/Users/michaelzavattaro/Github/kachingme/node_modules/.pnpm/@uidotdev+usehooks@2.0.1_react-dom@18.2.0_react<EMAIL_ADDRESS>implicitly has an 'any' type.

Try `npm i --save-dev @types/uidotdev__usehooks` if it exists or add a new declaration (.d.ts) file containing `declare module '@uidotdev/usehooks';`ts(7016)

My current setup is:

"@uidotdev/usehooks": "^2.0.1",
"next": "13.4.6",
"react": "18.2.0",

I installed via pnpm add @uidotdev/usehooks

It is related to issue #185

Should be fixed with #206


Just an idea, not an issue.

Some people dumped and started to reverse engineer the Zero Stage BootLoader ROM used in every StarFive JH7110 SoC.
https://forum.rvspace.org/t/is-the-source-code-for-the-boot-rom-for-the-visionfive-2-available/1918/1
It would be old hat to you, but it might be the seed of an idea or two for a future chapter. Not necessary a full dump of a ROM from a JH7110 SoC (That might or might not have questionable license decisions) but the ZSBL ROM for any RISC-V SoC (hopefully one that has the source code already available),

Great idea @martin-zs however I wanted to stick to the ESP32-C3 without additional hardware but if there is ever time for another this is a perfect idea!
Id like to be able to have the hardware as well.

I understand completely. But ESP chips do come with a bootloader from the factory embedded in non-modifyable ROM, so at least in theory you could dump that, but - there is always a but, copyright might rear it's ugly head. At least with the JH7110 SoC there were some serious questions raised in that thread that I pointed you to where it appears like they may have used GPL code in their ZSBL but never released the source code.


What I studied today

learn React  at Youtube channel(velopert)
today saw React for beginner.
also, learn to webpack contents in webpack docs.
today's learning time: 1hr
total learning time: 3hr

Good job!


Split badges in beginner skillmap

This one's a doozy!  Will wait for at least one approval before merging.  Also, I think @riknoll needs to add the badges to the list of things that show up greyed out in the profile?

Added badges to beginner
Cleaned up the markdown for beginner
Turned manual layout on and removed pushers
Updated the bg to show a tutorial hat next to the intro lesson.

hmm, i'm not sure if this is an issue with github's image preview or the image itself, but it looks like the "added" beginner background image (at the bottom of the files tab) doesn't have the tutorial hat in it?

hmm, i'm not sure if this is an issue with github's image preview or the image itself, but it looks like the "added" beginner background image (at the bottom of the files tab) doesn't have the tutorial hat in it?

I switched it back. Jaq didn't like the hat.

cool, looks good to me otherwise!


ZEVA - Missing credit reduction line

Describe the Bug
The Supplementary report and Reassessment Recommendation tabs are missing a credit reduction
Expected Behaviour
All three tabs should show the same reductions.

Actual Behaviour
The totals at the bottom are al correct but the first two tabs are missing all some reduction information for the calculations to make sense.
Implications
A clear and concise description of any implications.
Steps To Reproduce
Steps to reproduce the behaviour:
User/Role:

Go to '...'
Click on '....'
Scroll down to '....'
See error

tested on dev with Ford 2022 draft report


Virtual IP Adresses (by PPPoE)

With a PPPoE Dialup i get a sinle IP Address: xxx.xxx.130.131
My PPPoE Gateay IP is xx.xxx.149.21 (pushed by pppoe)
My ISP also routes xxx.xxx.154.64/29 to me.
If i try to set up a VIP in the GUI i get the error:
/sbin/ifconfig pppoe1 inet xxx.xxx.154.67/29 alias
ifconfig: ioctl (SIOCAIFADDR): Destination address required
I think it should be:
/sbin/ifconfig pppoe1 inet xxx.xxx.154.67/29 alias ppoe-isp-gw-ip
=> Because that works and makes my vip available to the world.
my goal is this:

pppoe1: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> metric 0 mtu 1492
        inet xx.xxx.131.182 --> xx.xxx.130.131  netmask 0xffffffff                  ==> assigned by pppoe
        inet xx.xxx.154.67 --> xx.xxx.149.21  netmask 0xffffffff                    ==> assigned by my crontab script
        inet xx.xxx.154.68 --> xx.xxx.149.21  netmask 0xffffffff                    ==> assigned by my crontab script
        inet6 fe80::20d:b9ff:fe47:72b4%pppoe1 prefixlen 64 scopeid 0x9
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

Crontab script:
#!/bin/sh

# Public IP SVN Server
/sbin/ifconfig pppoe1 inet xx.xxx.154.67/32 alias xx.xxx.149.21

# Public IP OpenVPN Access Server
/sbin/ifconfig pppoe1 inet xx.xxx.154.68/32 alias xx.xxx.149.21

Ended up in a debate and was reverted, but seemed fine so we'll finally push this in 18.1.5: https://github.com/opnsense/core/pull/2112

@AdSchellevis
Hi guys,
I stumbled upon this post, while I recently tried to do a similar setup.
I am with TekSavvy at Canada, who offers me a PPPoE static IP (e.g. <IP_ADDRESS> w/ gw <IP_ADDRESS>). I also just acquired a /30 subnet from them (e.g. <IP_ADDRESS>/30).
I use current OpnSense release and wanted to setup Virtual IP (IP Alias) so that I can either do port-forwarding (preferred) or even (1:1 nat). I tried various Virtual IP, like Alias, Proxy arp, Carp, Other. It seems that I got luck sometime with internet ping coming to these IP ok, while outgoing traffic sometimes work, sometimes not, for either ICMP and http.
So, basic setup is like this,

Under Firewall-> Virtual IP-> set all four IP, <IP_ADDRESS>/32, <IP_ADDRESS>/32, <IP_ADDRESS>/32,  <IP_ADDRESS>/32 with IP Alias type. The setting has a Gateway options, I tried ISP gw <IP_ADDRESS> and it seems no effect at all with some errors in the logs. So, I left it empty.

Under Firewall-->NAT-->Port Forward, I forwarded interesting traffic, even including ICMP over from one of these four IP to one of my private IP (ubuntu).

Firewall->Rules, there's automatic generated rule permitting those traffic.

Firewall ->NAT -> outbound NAT, I manually created an entry for traffic from this internal IP to any being source natted to this public IP.

I even tried with Port forward + 1:1 NAT (without manual Outbound rule).
The results of various of these test, are sometimes incoming traffic fine, outgoing is sporadic.
Any ideas of best steps of making this work?
Thanks in advance.
Peng

no worries,.....called TekSavvy and they found it out this subnet was assigned to another person as well, which caused packet being missed.. they gave me a new subnet and with only port-forward, no 1:1 nat, things work well now. thanks


Fixed issue: Comment notification not working after implementing OAuth2 and Added PKCE code for OAuth2

Summary

Comment webhooks not working: Comment webhook notifications were not working because earlier Jira wasn't sending info about the issue on which the comment was posted. So, we were using a dummy JWT to fetch that info separately. Since we are using OAuth2 now, that part of the code was giving an error. We explored a bit and found out that issue info is now sent in the webhook payload for comments. So, we removed it.
Added PKCE along with authorization code while performing OAuth2.
Did some code refactoring.

Issue/Enhancement Links:

Add PKCE while performing OAuth
Webhook notification not working

Fixes PR
#949 (Implement OAuth2 Authentication (reopened))

Hello @raghavaggarwal2308,
Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

@raghavaggarwal2308 FWIW - I'll try and do a test from this PR branch and see if the subscription bug is solved.
Maybe @hanzei can help you push this back up into https://github.com/mattermost/mattermost-plugin-jira/pull/949 shortly.

@raghavaggarwal2308 I'm a bit confused. I compiled this branch and upgraded the same server where I found the issue and I see no change in behavior.  Updating several fields in the ticket is delivering the events but comment events do not get delivered.
I double checked my commit

{
 "caller": "app/plugin_api.go:976",
 "level": "error",
 "msg": "PostNotifications: error while getting jiraClient, err: failed to get Jira client for the user : error in getting token from token source: oauth2: token expired and refresh token is not set",
 "plugin_id": "jira",
 "timestamp": "2023-06-15 16:48:34.765 Z"
}

The error is now different. I don't know what token we're looking for here.
I also tried on a fresh server with a new installation and comments still don't work.
Please let me know if you can repro this.

@DHaussermann We tried to reproduce this on MM server version v7.8.2 but we were unable to do so. Can you please share the server version you are using? Also, it would be helpful if you can share your Mattermost and Jira test cloud server credentials so that we can adequately debug the issue here.

Hi @raghavaggarwal2308,
I will DM you a set of credentials now. I can also include an invite to a server where I see the issue.
Please ping me if you still cannot repo after.

@raghavaggarwal2308 after re-testing this. I do see comment events being delivered after the last commit.
The issue I see now is that unlike other events, comment events don't work with security levels for me. (On a project without security levels, this would not be something you can find as the case is not applicable)
Scenario A - The Jira issue has no security level set

Create a subscription that targets a project with security levels such as DKH-Project
Add events including comment events
Do not add security level filter to your subscription
Create or locate an issue in the project
Remove the security level (If it was applied at time of creation)
Add or update a comment
Observed Events are delivered

Scenario B - The Jira issue has a security level set

Create a subscription that targets a project with security levels such as DKH-Project
Add events including comment events
Add security level filter to your subscription (can be all of them so any security level will deliver)
Create or locate an issue in the project
Add a security level (If it was not already applied at time of creation)
Add or update a comment
Observed Events are delivered but other filed changes get event deliveries as expected

@DHaussermann @mickmister We explored the above issue. The reason for that is the webhook body for comment notification contains the issue details now, but they are incomplete. The custom/additional fields present on the issue are not listed in the issue details. So, when we are unable to match the filters for comment notifications when the "Security level" filter is set. To resolve this issue we need to make an extra API call to fetch the issue details separately for comment notification, but we need either the user's JiraAccountID or the MattermostUserID to get the Jira client and make an API call. The problem is that the webhook body contains only the account ID of the commenter, but that user may or may not be connected to Mattermost, so if we use that ID we won't be able to get issue details in case the user is not connected and the notification will not be posted. Can you suggest us a way to get the connected user's ID?

@jasonblais heads-up Michael is likely the person with the most knowledge to provide guidance here but he's still away.
@hanzei may have some context but has not work on this functionality as much.

I don't have context knowledge about the webhook handling in JIRA to share.

The reason for that is the webhook body for comment notification contains the issue details now, but they are incomplete. The custom/additional fields present on the issue are not listed in the issue details. So, when we are unable to match the filters for comment notifications when the "Security level" filter is set.

The problem is that the webhook body contains only the account ID of the commenter, but that user may or may not be connected to Mattermost, so if we use that ID we won't be able to get issue details in case the user is not connected and the notification will not be posted. Can you suggest us a way to get the connected user's ID?

@raghavaggarwal2308 This may be a limitation we need to accept. Can you please provide what information is missing from the payload, and what is present? Is there any way to have a superuser token / service account for Jira Cloud? If not, we may need to be clear that "any subscription post made from a comment will need to be made by a connected user."

@mickmister

According to what I have explored, I don't think Jira supports service account creation.
In the webhook body for comment notification only the default fields are present like summary, issue type, project, assignee, priority, and status. The custom fields like security level, time tracking, etc. are not sent in the body.

Comment webhook body:
{
  "issue": {
    "id": "10080",
    "self": "https://brightscout-dev.atlassian.net/rest/api/2/10080",
    "key": "TEST-68",
    "fields": {
      "summary": "Test-issue-summary",
      "issuetype": {
        "self": "https://brightscout-dev.atlassian.net/rest/api/2/issuetype/10001",
        "id": "10001",
        "description": "Created by Jira Agile - do not edit or delete. Issue type for a user story.",
        "iconUrl": "https://brightscout-dev.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10315?size=medium",
        "name": "Story",
        "subtask": false,
        "avatarId": 10315,
        "hierarchyLevel": 0
      },
      "project": {
        "self": "https://brightscout-dev.atlassian.net/rest/api/2/project/10000",
        "id": "10000",
        "key": "TEST",
        "name": "Test",
        "projectTypeKey": "software",
        "simplified": false,
        "avatarUrls": {
          "48x48": "https://brightscout-dev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10424",
          "24x24": "https://brightscout-dev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10424?size=small",
          "16x16": "https://brightscout-dev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10424?size=xsmall",
          "32x32": "https://brightscout-dev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10424?size=medium"
        }
      },
      "assignee": null,
      "priority": {
        "self": "https://brightscout-dev.atlassian.net/rest/api/2/priority/3",
        "iconUrl": "https://brightscout-dev.atlassian.net/images/icons/priorities/medium.svg",
        "name": "Medium",
        "id": "3"
      },
      "status": {
        "self": "https://brightscout-dev.atlassian.net/rest/api/2/status/10000",
        "description": "",
        "iconUrl": "https://brightscout-dev.atlassian.net/",
        "name": "Backlog",
        "id": "10000",
        "statusCategory": {
          "self": "https://brightscout-dev.atlassian.net/rest/api/2/statuscategory/2",
          "id": 2,
          "key": "new",
          "colorName": "blue-gray",
          "name": "To Do"
        }
      }
    }
  }
}

Issue details in issue created webhook body:
{
  "issue": {
    "id": "10080",
    "self": "https://brightscout-dev.atlassian.net/rest/api/2/10080",
    "key": "TEST-68",
    "fields": {
      "statuscategorychangedate": "2023-07-05T04:39:41.891-0500",
      "issuetype": {
        "self": "https://brightscout-dev.atlassian.net/rest/api/2/issuetype/10001",
        "id": "10001",
        "description": "Functionality or a feature expressed as a user goal.",
        "iconUrl": "https://brightscout-dev.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10315?size=medium",
        "name": "Story",
        "subtask": false,
        "avatarId": 10315,
        "hierarchyLevel": 0
      },
      "timespent": null,
      "customfield_10030": null,
      "project": {
        "self": "https://brightscout-dev.atlassian.net/rest/api/2/project/10000",
        "id": "10000",
        "key": "TEST",
        "name": "Test",
        "projectTypeKey": "software",
        "simplified": false,
        "avatarUrls": {
          "48x48": "https://brightscout-dev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10424",
          "24x24": "https://brightscout-dev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10424?size=small",
          "16x16": "https://brightscout-dev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10424?size=xsmall",
          "32x32": "https://brightscout-dev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10424?size=medium"
        }
      },
      "customfield_10033": [],
      "fixVersions": [],
      "aggregatetimespent": null,
      "customfield_10034": null,
      "customfield_10035": null,
      "resolution": null,
      "customfield_10036": null,
      "customfield_10037": null,
      "customfield_10027": null,
      "customfield_10028": null,
      "customfield_10029": null,
      "resolutiondate": null,
      "workratio": -1,
      "issuerestriction": {
        "issuerestrictions": {},
        "shouldDisplay": false
      },
      "lastViewed": null,
      "watches": {
        "self": "https://brightscout-dev.atlassian.net/rest/api/2/issue/TEST-68/watchers",
        "watchCount": 0,
        "isWatching": false
      },
      "created": "2023-07-05T04:39:41.497-0500",
      "customfield_10020": null,
      "customfield_10021": null,
      "customfield_10022": null,
      "customfield_10023": null,
      "priority": {
        "self": "https://brightscout-dev.atlassian.net/rest/api/2/priority/3",
        "iconUrl": "https://brightscout-dev.atlassian.net/images/icons/priorities/medium.svg",
        "name": "Medium",
        "id": "3"
      },
      "customfield_10024": null,
      "customfield_10025": null,
      "customfield_10026": null,
      "labels": [],
      "customfield_10016": null,
      "customfield_10017": null,
      "customfield_10018": {
        "hasEpicLinkFieldDependency": false,
        "showField": false,
        "nonEditableReason": {
          "reason": "PLUGIN_LICENSE_ERROR",
          "message": "The Parent Link is only available to Jira Premium users."
        }
      },
      "customfield_10019": "0|i000h3:",
      "aggregatetimeoriginalestimate": null,
      "timeestimate": null,
      "versions": [],
      "issuelinks": [],
      "assignee": null,
      "updated": "2023-07-05T04:39:41.497-0500",
      "status": {
        "self": "https://brightscout-dev.atlassian.net/rest/api/2/status/10000",
        "description": "",
        "iconUrl": "https://brightscout-dev.atlassian.net/",
        "name": "Backlog",
        "id": "10000",
        "statusCategory": {
          "self": "https://brightscout-dev.atlassian.net/rest/api/2/statuscategory/2",
          "id": 2,
          "key": "new",
          "colorName": "blue-gray",
          "name": "New"
        }
      },
      "components": [],
      "customfield_10050": null,
      "customfield_10051": null,
      "timeoriginalestimate": null,
      "customfield_10052": null,
      "description": null,
      "customfield_10010": null,
      "customfield_10014": null,
      "customfield_10015": null,
      "timetracking": {},
      "customfield_10005": null,
      "customfield_10006": null,
      "security": {
        "self": "https://brightscout-dev.atlassian.net/rest/api/2/securitylevel/10001",
        "id": "10001",
        "description": "",
        "name": "TEST_SECURITY_LEVEL"
      },
      "customfield_10007": null,
      "customfield_10008": null,
      "aggregatetimeestimate": null,
      "customfield_10009": null,
      "attachment": [],
      "summary": "Test-issue-summary",
      "creator": {
        "self": "https://brightscout-dev.atlassian.net/rest/api/2/user?accountId=6282e44146f77e006f20c3d9",
        "accountId": "6282e44146f77e006f20c3d9",
        "avatarUrls": {
          "48x48": "https://secure.gravatar.com/avatar/010054b5381598d1f6e68b4eed5a0550?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRA-2.png",
          "24x24": "https://secure.gravatar.com/avatar/010054b5381598d1f6e68b4eed5a0550?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRA-2.png",
          "16x16": "https://secure.gravatar.com/avatar/010054b5381598d1f6e68b4eed5a0550?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRA-2.png",
          "32x32": "https://secure.gravatar.com/avatar/010054b5381598d1f6e68b4eed5a0550?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRA-2.png"
        },
        "displayName": "Raghav Aggarwal",
        "active": true,
        "timeZone": "America/Chicago",
        "accountType": "atlassian"
      },
      "subtasks": [],
      "customfield_10040": null,
      "customfield_10041": null,
      "customfield_10042": null,
      "reporter": {
        "self": "https://brightscout-dev.atlassian.net/rest/api/2/user?accountId=6282e44146f77e006f20c3d9",
        "accountId": "6282e44146f77e006f20c3d9",
        "avatarUrls": {
          "48x48": "https://secure.gravatar.com/avatar/010054b5381598d1f6e68b4eed5a0550?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRA-2.png",
          "24x24": "https://secure.gravatar.com/avatar/010054b5381598d1f6e68b4eed5a0550?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRA-2.png",
          "16x16": "https://secure.gravatar.com/avatar/010054b5381598d1f6e68b4eed5a0550?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRA-2.png",
          "32x32": "https://secure.gravatar.com/avatar/010054b5381598d1f6e68b4eed5a0550?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRA-2.png"
        },
        "displayName": "Raghav Aggarwal",
        "active": true,
        "timeZone": "America/Chicago",
        "accountType": "atlassian"
      },
      "customfield_10044": null,
      "aggregateprogress": {
        "progress": 0,
        "total": 0
      },
      "customfield_10045": null,
      "customfield_10001": null,
      "customfield_10046": null,
      "customfield_10002": null,
      "customfield_10047": null,
      "customfield_10003": null,
      "customfield_10004": null,
      "customfield_10048": null,
      "customfield_10038": null,
      "customfield_10039": null,
      "environment": null,
      "duedate": null,
      "progress": {
        "progress": 0,
        "total": 0
      },
      "votes": {
        "self": "https://brightscout-dev.atlassian.net/rest/api/2/issue/TEST-68/votes",
        "votes": 0,
        "hasVoted": false
      }
    }
  }
}

@raghavaggarwal2308 In that case, I think we'll need to accept the fact that any subscription post made from a comment will need to be made by a connected user. DM mentions should still work in this case though right?

@mickmister We tested the DM notifications and turns out they are not working after the oauth changes. After debugging we found that we are making an API call to fetch the comment details and validate whether the user has permission to see the comment or not. We are making the API call on the comment URL present in the webhook payload (Ex: https://your-domain.atlassian.net/rest/api/2/issue/{issue-id}/comment/{comment-id}). But according to the Jira Documentation, the request should be made via api.atlassian.com and not https://your-domain.atlassian.net due to which the API call is getting failed. We think the other API might also fail because of this.

@raghavaggarwal2308 Can we make a post like "A new comment has been posted on (issue)" as a fallback? Also, how is it going on this issue in general?

@raghavaggarwal2308 Can we make a post like "A new comment has been posted on (issue)" as a fallback? Also, how is it going on this issue in general?

@mickmister I am a bit confused about where we need to make the change. We have two issues here:

Comment notification not working when a non-connected user adds a comment on Jira issue (Due to missing details in comment webhook payload): In this case if we add a fallback, we will end up notification even in the cases when subscription filter are not matched.

DM mentions not working (Because of invalid API call): In this case if we add a fallback, we will be sending notification without validating that the user has permission to access the issue or not. I think that might be wrong.

In general, whenever we get a webhook request from Jira, we match the subscription filters and post a notification in the channel:

Comment notification not working when a non-connected user adds a comment on Jira issue (Due to missing details in comment webhook payload): In this case if we add a fallback, we will end up notification even in the cases when subscription filter are not matched.

DM mentions not working (Because of invalid API call): In this case if we add a fallback, we will be sending notification without validating that the user has permission to access the issue or not. I think that might be wrong.

@raghavaggarwal2308 Right, I was mistaken. The issue is with the subscription filtering so there's nothing that can be done there.
For the invalid API call related to the DM notification feature, is this something we can correct by using api.atlassian.com?

Do we need to make this change for all the APIs or just for the DM comment notifications?

@raghavaggarwal2308 Sorry I don't know the answer to this. I would say if Atlassian recommends this, and it all works when making the change, then we should just change all of them.

Codecov Report
Patch coverage: 3.49% and project coverage change: -1.33% :warning:

Comparison is base (7c1b921) 31.16% compared to head (fdbdc0d) 29.83%.

:exclamation: Current head fdbdc0d differs from pull request most recent head 0186841. Consider uploading reports for the commit 0186841 to get more accurate results

Additional details and impacted files
@@                        Coverage Diff                         @@
##           MM-51310_oauth2_authentication     #953      +/-   ##
==================================================================
- Coverage                           31.16%   29.83%   -1.33%
==================================================================
  Files                                  50       52       +2
  Lines                                7409     7725     +316
==================================================================
- Hits                                 2309     2305       -4
- Misses                               4909     5228     +319
- Partials                              191      192       +1

Files Changed
Coverage Δ

server/client.go
8.04% <0.00%> (ø)

server/command.go
15.32% <0.00%> (-0.69%)
:arrow_down:

server/instance.go
89.47% <0.00%> (-10.53%)
:arrow_down:

server/instance_cloud.go
6.43% <0.00%> (-0.08%)
:arrow_down:

server/instance_cloud_oauth.go
0.00% <0.00%> (ø)

server/instance_server.go
18.88% <0.00%> (-0.43%)
:arrow_down:

server/kv.go
17.24% <0.00%> (-1.02%)
:arrow_down:

server/plugin.go
11.56% <0.00%> (-0.05%)
:arrow_down:

server/setup_flow.go
0.00% <0.00%> (ø)

server/user.go
26.70% <ø> (ø)

... and 8 more

... and 1 file with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

@mickmister Fixed both issues with the comment webhook notification:

Comment webhook notification not working for comment webhook notifications when "Security Level" filter is applied in subscription: Updated the logic to expand the issue details in the webhook notification. NOTE: The details will be expanded only when the comment is made by a connected user.

DM notification not working for comment webhook notifications: Updated the code to make API call with proper base URL.

@mickmister FIxed the review comments mentioned by you

@DHaussermann Are you testing this PR? If not, can BrightScout test it?

@raghavaggarwal2308: @DHaussermann is currently on vacation so he won't be able to respond
Also there's an unresolved discussion here #953 (comment). I'm thinking we should keep it the way it was for Jira Server, to avoid having to test with Jira Server v7. However, Jira Server v9 should be regression tested before OAuth is released.

@mickmister Sure, we will be making this today after that as @DHaussermann is not available, so should brightscout QA do the QA review if this is urgent or should we wait for Dylan to come back ?

@Kshitij-Katiyar Brightscout can do QA on this PR. FYI Dylan will be back on Monday

@DHaussermann Note that I've merged this into the main OAuth PR https://github.com/mattermost/mattermost-plugin-jira/pull/949

Tested and approved, LGTM

This PR was tested on MM version-7.8.2 with latest Jira cloud instance and server version - 9.
Comment notifications were found working during the testing of this PR.
This PR is tested and the setup of OAuth 2.0 is completely working fine.