问:
Run elasticsearch 7.17 on Openshift error chroot: cannot change root directory to '/': Operation not permitted
When starting the cluster Elasticsearch 7.17  in Openshift . Cluster writes an error
chroot: cannot change root directory to '/': Operation not permitted`
Kibana started ok.

Code :
`apiVersion: apps/v1
kind: StatefulSet
metadata:
name: elasticsearch
namespace: elasticsearch-pp
spec:
serviceName: elasticsearch
replicas: 3

selector:
matchLabels:
app: elasticsearch
template:
metadata:
labels:
app: elasticsearch
spec:
containers:
- name: elasticsearch

```<code>    image: NEXUS/elasticsearch:7.17.7
    env:
      - name: cluster.name
        value: k8s-logs
      - name: node.name
        valueFrom:
          fieldRef:
            fieldPath: metadata.name
      - name: discovery.seed_hosts
        value: "es-cluster-0.elasticsearch,es-cluster-1.elasticsearch,es-cluster-2.elasticsearch"
      - name: cluster.initial_master_nodes
        value: "es-cluster-0,es-cluster-1,es-cluster-2"
      - name: ES_JAVA_OPTS
        value: "-Xms4012m -Xmx4012m"
    ports:
    - containerPort: 9200
      name: client
    - containerPort: 9300
      name: nodes
    volumeMounts:
    - name: data-cephfs
      mountPath: /usr/share/elasticsearch/data

  initContainers:
  - name: fix-permissions
    image: NEXUS/busybox
    command: ["sh", "-c", "chown -R 1000:1000 /usr/share/elasticsearch/data"]
    volumeMounts:
    - name: data-cephfs
      mountPath: /usr/share/elasticsearch/data

  - name: increase-vm-max-map
    image: NEXUS/busybox
    imagePullPolicy: IfNotPresent
    command: ["/bin/sh"]
    args: ["-c", "sysctl -w vm.max_map_count=262144; echo vm.max_map_count=262144 >> /etc/sysctl.conf ; sysctl -p"]

  #   image: NEXUS/busybox
  #   command: ["sysctl", "-w", "vm.max_map_count=262144"]

  - name: increase-fd-ulimit
    image: NEXUS/busybox
    command: ["sh", "-c", "ulimit -n 65536"]

  serviceAccount: elk-anyuid
  serviceAccountName: elk-anyuid
  restartPolicy: Always
  volumes:
  - name: data-cephfs
    persistentVolumeClaim:
      claimName: data-cephfs          `
</code>```

I tried changing the cluster settings, disabled initContainers , the error persists

Body:
When starting the cluster Elasticsearch 7.17  in Openshift . Cluster writes an error
chroot: cannot change root directory to '/': Operation not permitted`
Kibana started ok.

Code :
`apiVersion: apps/v1
kind: StatefulSet
metadata:
name: elasticsearch
namespace: elasticsearch-pp
spec:
serviceName: elasticsearch
replicas: 3

selector:
matchLabels:
app: elasticsearch
template:
metadata:
labels:
app: elasticsearch
spec:
containers:
- name: elasticsearch

    image: NEXUS/elasticsearch:7.17.7
    env:
      - name: cluster.name
        value: k8s-logs
      - name: node.name
        valueFrom:
          fieldRef:
            fieldPath: metadata.name
      - name: discovery.seed_hosts
        value: "es-cluster-0.elasticsearch,es-cluster-1.elasticsearch,es-cluster-2.elasticsearch"
      - name: cluster.initial_master_nodes
        value: "es-cluster-0,es-cluster-1,es-cluster-2"
      - name: ES_JAVA_OPTS
        value: "-Xms4012m -Xmx4012m"
    ports:
    - containerPort: 9200
      name: client
    - containerPort: 9300
      name: nodes
    volumeMounts:
    - name: data-cephfs
      mountPath: /usr/share/elasticsearch/data

  initContainers:
  - name: fix-permissions
    image: NEXUS/busybox
    command: ["sh", "-c", "chown -R 1000:1000 /usr/share/elasticsearch/data"]
    volumeMounts:
    - name: data-cephfs
      mountPath: /usr/share/elasticsearch/data

  - name: increase-vm-max-map
    image: NEXUS/busybox
    imagePullPolicy: IfNotPresent
    command: ["/bin/sh"]
    args: ["-c", "sysctl -w vm.max_map_count=262144; echo vm.max_map_count=262144 >> /etc/sysctl.conf ; sysctl -p"]

  #   image: NEXUS/busybox
  #   command: ["sysctl", "-w", "vm.max_map_count=262144"]

  - name: increase-fd-ulimit
    image: NEXUS/busybox
    command: ["sh", "-c", "ulimit -n 65536"]

  serviceAccount: elk-anyuid
  serviceAccountName: elk-anyuid
  restartPolicy: Always
  volumes:
  - name: data-cephfs
    persistentVolumeClaim:
      claimName: data-cephfs          `

I tried changing the cluster settings, disabled initContainers , the error persists


来源: stackexchange

问:
Problems with variable definition in Powerapps
the issue is that the variable definition is incorrect in some way.
varTischNr was set with Set() and now with "=". Both unfortunately achieved the effect when replicating the code that varTableNr either always remains 1 or something else happens. Not sure. Before, instead of varTischNr, there was the respective number, in this case a 1.
The code should show the name of the logged in user when clicking on the image and should create an entry in the table 'tbl_S4.E2.03-05'.

Translaions:

Tisch = Table

Buchungen = Bookings

Anzahl Eintraege = Number of entries

Buchungsdatum = Booking date

Part of the Code:

```<code>varTischNr="1";;

If(Concat(Filter(colBuchungenTag;Tisch2=varTischNr);Title)=(
    Left(User().FullName;1) &
    Mid(
        User().FullName;
        Find(" "; User().FullName) + 1;
        2)
    );

    Set(varAnzahlEintraege;Count(Filter('tbl_S4.E2.03-05';Tisch2=varTischNr;Buchungsdatum=varTag.Datum).ID)
);;

If(varAnzahlEintraege>0;
    Remove('tbl_S4.E2.03-05';
    Filter('tbl_S4.E2.03-05';Tisch2=varTischNr;Buchungsdatum=varTag.Datum));;
;
    ClearCollect(colBuchungenTag;Filter('tbl_S4.E2.03-05';Buchungsdatum=varTag.Datum));;Select(btn_Refresh);;
);;

Notify("Buchung erfolgreich gelöscht";NotificationType.Error);;

ClearCollect(colBuchungenTag;Filter('tbl_S4.E2.03-05';Buchungsdatum=varTag.Datum));;

Select(btn_Refresh)

;Notify("Der Tisch kann nur vom Besitzer freigegeben werden";NotificationType.Information))
</code>```

The goal should be that varTischNr works and the entries for 'tbl_S4.E2.03-05' are replaced by variables.

ContentLicense: CC BY-SA 4.0

Body:
the issue is that the variable definition is incorrect in some way.
varTischNr was set with Set() and now with "=". Both unfortunately achieved the effect when replicating the code that varTableNr either always remains 1 or something else happens. Not sure. Before, instead of varTischNr, there was the respective number, in this case a 1.
The code should show the name of the logged in user when clicking on the image and should create an entry in the table 'tbl_S4.E2.03-05'.

Translaions:

Tisch = Table

Buchungen = Bookings

Anzahl Eintraege = Number of entries

Buchungsdatum = Booking date

Part of the Code:

varTischNr="1";;

If(Concat(Filter(colBuchungenTag;Tisch2=varTischNr);Title)=(
    Left(User().FullName;1) &
    Mid(
        User().FullName;
        Find(" "; User().FullName) + 1;
        2)
    );

    Set(varAnzahlEintraege;Count(Filter('tbl_S4.E2.03-05';Tisch2=varTischNr;Buchungsdatum=varTag.Datum).ID)
);;

If(varAnzahlEintraege>0;
    Remove('tbl_S4.E2.03-05';
    Filter('tbl_S4.E2.03-05';Tisch2=varTischNr;Buchungsdatum=varTag.Datum));;
;
    ClearCollect(colBuchungenTag;Filter('tbl_S4.E2.03-05';Buchungsdatum=varTag.Datum));;Select(btn_Refresh);;
);;

Notify("Buchung erfolgreich gelöscht";NotificationType.Error);;

ClearCollect(colBuchungenTag;Filter('tbl_S4.E2.03-05';Buchungsdatum=varTag.Datum));;

Select(btn_Refresh)

;Notify("Der Tisch kann nur vom Besitzer freigegeben werden";NotificationType.Information))

The goal should be that varTischNr works and the entries for 'tbl_S4.E2.03-05' are replaced by variables.


问:
Average time difference for user each day and each week Pandas
I have a data frame of user activity, with user ID's and time of activity.
I'm trying to calculate the average time difference between activities for each user.

for example:

User ID
Activity Date
week

1
7/25/2021  8:29:01 PM
1

1
7/26/2021  8:29:01 PM
1

1
7/26/2021  8:32:01 PM
1

1
7/25/2021  8:28:01 PM
1

1
7/30/2021  8:32:01 PM
2

1
7/30/2021  8:30:01 PM
2

I would like to first compute the average for each day, and than compute the average of averages, and to do that for each user for each week, so that the output will be:

for week 1: 2 minutes (for 25/07- 1 minute difference, for 26/07- 3 minute difference=> so the mean is 2 minutes).

for week 2: 2 minutes

With the help of someone in this forum I used this code:

```<code>df['Activity Date'] = pd.to_datetime(df['Activity Date'])

day = df['Activity Date'].dt.normalize()

out = (df
   .sort_values(by=['User ID', 'Activity Date'])
   .groupby(['User ID', day])
   .diff()
   .groupby(df['User ID']).mean()
)
</code>```

my issue is that I get an error:

```<code>TypeError: unsupported operand type(s) for -: 'str' and 'str'
</code>```

I would really appreciate your help or any suggestions!

Thanks!!

Body:
I have a data frame of user activity, with user ID's and time of activity.
I'm trying to calculate the average time difference between activities for each user.

for example:

User ID
Activity Date
week

1
7/25/2021  8:29:01 PM
1

1
7/26/2021  8:29:01 PM
1

1
7/26/2021  8:32:01 PM
1

1
7/25/2021  8:28:01 PM
1

1
7/30/2021  8:32:01 PM
2

1
7/30/2021  8:30:01 PM
2

I would like to first compute the average for each day, and than compute the average of averages, and to do that for each user for each week, so that the output will be:

for week 1: 2 minutes (for 25/07- 1 minute difference, for 26/07- 3 minute difference=> so the mean is 2 minutes).

for week 2: 2 minutes

With the help of someone in this forum I used this code:

df['Activity Date'] = pd.to_datetime(df['Activity Date'])

day = df['Activity Date'].dt.normalize()

out = (df
   .sort_values(by=['User ID', 'Activity Date'])
   .groupby(['User ID', day])
   .diff()
   .groupby(df['User ID']).mean()
)

my issue is that I get an error:

TypeError: unsupported operand type(s) for -: 'str' and 'str'

I would really appreciate your help or any suggestions!

Thanks!!


问:
Setting state in component vs setting state in a hook

The crux of the issue

I'm not able to understand why setting a recoil state in a component has a different behaviour than setting it in a hook.

The details of the issue

Our codebase had a component which looked somewhat like this

```<code>const ComponentThatReturnsNothing = () => {
    const [, setSomeRecoilState] = useRecoilState(someStateAtom);
    useEffect(() => {
        window.Bridge = {
            // the following function is called by Android, as the code runs inside a webview
            functionThatSetsRecoilState: () => setSomeRecoilState('A_VALUE');
        }
    }, []);

    return null;
}
</code>```

However, I did not like the fact that there was a component with pure logic inside it, which never returned anything, so I converted it into a hook instead. The hook looks the same, except that it has a different name according to hook conventions, and is called at the top of the App component, instead of inside the render of App.

This brought about an interesting problem, which I haven't been able to figure out the cause of.

So the recoil state is actually used in a component named SMSSender like this:

```<code>const SMSSender = () => {
    const [someRecoilState] = useSomeRecoilState(someStateAtom);

    return (
        someRecoilState === 'B_VALUE'
        ? <FirstChild />
        : <SecondChild />
    );
}
</code>```

Furthermore, the SMSSender is being used in another called CustomerInitiate. So the component tree looks like this:

```<code>.
└── App
    ├── ComponentThatReturnsNothing
    └── CustomerInitiate
        └── SMSSender
</code>```

CustomerInitiate looks somewhat like this:

```<code>const CustomerInitiate = () => {
    const isConditionTrue = AndroidInterface.androidMethod(); // returns false before we set the recoil state, returns true afterwards

    return (
        isConditionTrue ? <UnrelatedComponent /> : <SMSSender />
    );
}
</code>```

Important thing to know

At the point of time where functionThatSetsRecoilState is called by Android, we are rendering SMSSender. However, after it is called, androidMethod() starts returning true, which means the next time CustomerInitiate re-renders, we change screens.

The difference between behaviour in component vs hook

When ComponentThatReturnsNothing was a component, we could successfully render SecondChild in SMSSender after the recoil state was set to A_VALUE. SecondChild makes an API call which we need to happen before CustomerInitiate changes screens.

However, after changing ComponentThatReturnsNothing to a hook, CustomerInitiate starts rendering UnrelatedComponent before SecondChild can be called and the API call made. Since UnrelatedComponent makes another API that counts on SecondChild's API call being made first, this is an issue.

My guess

My current guess is that if a child component of App is subscribed to a recoil state that changes, it doesn't re-render the whole App component, which means that CustomerInitiate isn't re-rendered immediately.

However, if a hook inside the App component is subscribed to a recoil state which changes, it is re-rendering the whole App component, causing CustomerInitiate to re-render and not giving a chance to the SMSSender to render SecondChild.

Update

I solved the problem by moving the SecondChild up to CustomerInitiate along with the check required to render it, however, answers regarding why this problem occurred in the first place and whether or not my guess is correct are still welcome.

Body:
The crux of the issue

I'm not able to understand why setting a recoil state in a component has a different behaviour than setting it in a hook.

The details of the issue

Our codebase had a component which looked somewhat like this

const ComponentThatReturnsNothing = () => {
    const [, setSomeRecoilState] = useRecoilState(someStateAtom);
    useEffect(() => {
        window.Bridge = {
            // the following function is called by Android, as the code runs inside a webview
            functionThatSetsRecoilState: () => setSomeRecoilState('A_VALUE');
        }
    }, []);

    return null;
}

However, I did not like the fact that there was a component with pure logic inside it, which never returned anything, so I converted it into a hook instead. The hook looks the same, except that it has a different name according to hook conventions, and is called at the top of the App component, instead of inside the render of App.

This brought about an interesting problem, which I haven't been able to figure out the cause of.

So the recoil state is actually used in a component named SMSSender like this:

const SMSSender = () => {
    const [someRecoilState] = useSomeRecoilState(someStateAtom);

    return (
        someRecoilState === 'B_VALUE'
        ? <FirstChild />
        : <SecondChild />
    );
}

Furthermore, the SMSSender is being used in another called CustomerInitiate. So the component tree looks like this:

.
└── App
    ├── ComponentThatReturnsNothing
    └── CustomerInitiate
        └── SMSSender

CustomerInitiate looks somewhat like this:

const CustomerInitiate = () => {
    const isConditionTrue = AndroidInterface.androidMethod(); // returns false before we set the recoil state, returns true afterwards

    return (
        isConditionTrue ? <UnrelatedComponent /> : <SMSSender />
    );
}

Important thing to know

At the point of time where functionThatSetsRecoilState is called by Android, we are rendering SMSSender. However, after it is called, androidMethod() starts returning true, which means the next time CustomerInitiate re-renders, we change screens.

The difference between behaviour in component vs hook

When ComponentThatReturnsNothing was a component, we could successfully render SecondChild in SMSSender after the recoil state was set to A_VALUE. SecondChild makes an API call which we need to happen before CustomerInitiate changes screens.

However, after changing ComponentThatReturnsNothing to a hook, CustomerInitiate starts rendering UnrelatedComponent before SecondChild can be called and the API call made. Since UnrelatedComponent makes another API that counts on SecondChild's API call being made first, this is an issue.

My guess

My current guess is that if a child component of App is subscribed to a recoil state that changes, it doesn't re-render the whole App component, which means that CustomerInitiate isn't re-rendered immediately.

However, if a hook inside the App component is subscribed to a recoil state which changes, it is re-rendering the whole App component, causing CustomerInitiate to re-render and not giving a chance to the SMSSender to render SecondChild.

Update

I solved the problem by moving the SecondChild up to CustomerInitiate along with the check required to render it, however, answers regarding why this problem occurred in the first place and whether or not my guess is correct are still welcome.


问:
add animation style in react
Im getting error on adding below styles in react code

im expecting to get animation results
but getting "Style prop value must be an object" error

Title: add animation style in react


问:
How to deposit $CAKE in a pool on pancakeswap through solidity smart contract?
I am developing a smart contract on solidity where user can deposit $CAKE in my pool and after depositing, the deposited $CAKE will be automatically redirected to some other pool. But I don't know how to write this! Can anyone help?

I don't have any clue on how to do this or even if it is possible?


问:
Pimcore : The current system user is not allowed to execute this script. Allowed users: 'root' Executing user: 'xxx'
I am facing issue with execute script in pimcore and getting below error :

The current system user is not allowed to execute this script. Allowed users: 'root' Executing user: 'XXX'.

My system user is : root

I have checked my user setting and this is root. so how to solve this issue


问:
Fetch Facebook friends with Graph API
I need your help...

I have one application in which I can create friends (Send and Accept Request).
What to do If I need a friend's suggestion in the below scenario...

If I'm user A on Facebook, and I have friends named B , C , D , E , F , G
and among these friends D , E and F have created account in my application with the use of Facebook login. But we are not friends in my application. So, what to do to get friends suggestions of D , E and F in my application ?

Is there any way to get details of those 3 Users (D , E and F) using Graph API ?

Title: Fetch Facebook friends with Graph API


问:
How to control the concurrency in flask?
I have developed the Flask application, live on AWS EC2 Instance and i have increased the number of worker and threads like below:

```<code>gunicorn.... --worker=2 --thread=4
</code>```

What i understand so far from sites that it may create the 4 parallel request for single worker in 1 core of CPU and same for other. Eventually you will be getting 8 requests per second.
As i am multithreading so i was bit hesitated that my app responses should not get mixed up or does not overwrite some other requests results as i am saving some things on disk too:
Here is brief overview of app

```<code>app = Flask(__name__)
app.route('/route1'):
    #ML Model processing
    return jsonify{'Result'}
app.route('/route2'):
    #ML Model 2 processing
    #Save image to folder and then process ml model on it
    return jsonify{'Result'}

</code>```

Note: Here i have created only single folder which will gonna overwrite image for each request.

So to not get mixed up for any results not for just this one but also for first one , I want to know what is good ?
I have heard about Lock, Semaphores but what you suggest ?. Which method is best ? I think i am doing concurrency and I want to take control

Body:
I have developed the Flask application, live on AWS EC2 Instance and i have increased the number of worker and threads like below:

gunicorn.... --worker=2 --thread=4

What i understand so far from sites that it may create the 4 parallel request for single worker in 1 core of CPU and same for other. Eventually you will be getting 8 requests per second.
As i am multithreading so i was bit hesitated that my app responses should not get mixed up or does not overwrite some other requests results as i am saving some things on disk too:
Here is brief overview of app

app = Flask(__name__)
app.route('/route1'):
    #ML Model processing
    return jsonify{'Result'}
app.route('/route2'):
    #ML Model 2 processing
    #Save image to folder and then process ml model on it
    return jsonify{'Result'}

Note: Here i have created only single folder which will gonna overwrite image for each request.

So to not get mixed up for any results not for just this one but also for first one , I want to know what is good ?
I have heard about Lock, Semaphores but what you suggest ?. Which method is best ? I think i am doing concurrency and I want to take control


问:
How to dynamically create an event OnClick for a Groupbox?
I am new in Delphi and I am using the Altium PCB IDE not RAD Studio !!!
I created the form and added a Panel name : ListObject.
Then I created the button and added the OnClick event for this button.
When I clicked the button, It will create the groupbox inside the Panel 'ListObject'.
And I dont know how to Add the OnClick event to this groupbox.
The compiler show the error can not indentify the OnClick event.
Here is my code :

```<code>type

   TDynamicClick = class(TDynamicClick)

   public

      procedure ShowMessage(Sender: TObject);

   end;

implementation

{$R *.dfm}

procedure TDynamicClick.ShowMessage(Sender: TObject);

begin

     TGroupbox(Sender).Caption := 'Clicked';

end;
procedure TForm1.ButtonClick(Sender: TObject);
var
     gb     : TGroupbox;
begin
       gb   := TGroupBox.Create(ListObject);
       gb.Parent := ListObject;
       gb.Height := 38;
       gb.align  := alTop;
       gb.OnClick:= ShowMessage;
end;
</code>```

I dont know why !!!

Body:
I am new in Delphi and I am using the Altium PCB IDE not RAD Studio !!!
I created the form and added a Panel name : ListObject.
Then I created the button and added the OnClick event for this button.
When I clicked the button, It will create the groupbox inside the Panel 'ListObject'.
And I dont know how to Add the OnClick event to this groupbox.
The compiler show the error can not indentify the OnClick event.
Here is my code :

type

   TDynamicClick = class(TDynamicClick)

   public

      procedure ShowMessage(Sender: TObject);

   end;

implementation

{$R *.dfm}

procedure TDynamicClick.ShowMessage(Sender: TObject);

begin

     TGroupbox(Sender).Caption := 'Clicked';

end;
procedure TForm1.ButtonClick(Sender: TObject);
var
     gb     : TGroupbox;
begin
       gb   := TGroupBox.Create(ListObject);
       gb.Parent := ListObject;
       gb.Height := 38;
       gb.align  := alTop;
       gb.OnClick:= ShowMessage;
end;

I dont know why !!!


问:
Sklearn: Multiclass Problem with Model for each class
I have the following problem:

I want to make a binary classification (yes/no) for a given dataset. This dataset contains X classes. Now I want to create a model for each class and predict yes/no for each class. Afterwards I want to return the top n classes sorted by probability (I will solve this with the proba-method). The reason I want to create a model for each class is, that the amount of classes is very big and for some classes a single model for their own might be better.

I want to create a separate model for each class and feed it only with its own data

The class itself is not an argument to pass for the ml model, it is just needed for the initialisation of models

I want to perform hyperparameter tuning for each submodel separately, because each class could have their own properties

Do you know of any viable solution for sklearn? OneVsOne or Multioutput seem to be viable solutions, but from my understanding both of them consume all datapoints not separated by class.
Do I need to create my own solution?


问:
Cannot run Airflow on Docker using MacOS - Even with more memory allocated
I am trying to run Airflow on Docker (using a MacOS, Version 12.6.2, with 8 GB of Memory). I have downloaded the docker-compose.yaml file here (apache/airflow:2.4.2), and have set my .env file to this:

```<code>AIRFLOW_IMAGE_NAME=apache/airflow:2.4.2
AIRFLOW_UID=50000
</code>```

When I run docker-compose up -d, and wait, the webserver containers never become healthy:

As suggested by numerous people on MacOS, I have upped my Docker memory:

I have tried numerous combinations of Docker memory (all 8GB of Memory, 7 GB of Memory, 6 GB of Memory, 5 and 4 GB of Memory) as well as testing different combinations of CPU, Swap, and Virtual Disk Limit (I have not tried going higher than 160 GB in the Virtual Disk Limit). I have also seen that it is a bad idea to use all 4 CPUs, so I have not tried that.

Here is the log I get for the webserver container:

```<code>2023-01-12 03:26:30 [2023-01-12 11:26:30 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:215)
2023-01-12 03:26:31 [2023-01-12 11:26:31 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:216)
2023-01-12 03:26:33 [2023-01-12 11:26:32 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:217)
2023-01-12 03:26:33 [2023-01-12 11:26:33 +0000] [79] [WARNING] Worker with pid 215 was terminated due to signal 9
2023-01-12 03:26:34 [2023-01-12 11:26:34 +0000] [262] [INFO] Booting worker with pid: 262
2023-01-12 03:26:36 [2023-01-12 11:26:36 +0000] [79] [WARNING] Worker with pid 217 was terminated due to signal 9
2023-01-12 03:26:36 [2023-01-12 11:26:36 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:219)
2023-01-12 03:26:36 [2023-01-12 11:26:36 +0000] [263] [INFO] Booting worker with pid: 263
2023-01-12 03:26:37 [2023-01-12 11:26:37 +0000] [79] [WARNING] Worker with pid 216 was terminated due to signal 9
2023-01-12 03:26:38 [2023-01-12 11:26:38 +0000] [265] [INFO] Booting worker with pid: 265
2023-01-12 03:26:39 [2023-01-12 11:26:39 +0000] [79] [WARNING] Worker with pid 219 was terminated due to signal 9
2023-01-12 03:26:40 [2023-01-12 11:26:40 +0000] [266] [INFO] Booting worker with pid: 266
2023-01-12 03:28:34 [2023-01-12 11:28:33 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:262)
2023-01-12 03:28:36 [2023-01-12 11:28:36 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:263)
2023-01-12 03:28:38 [2023-01-12 11:28:38 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:265)
2023-01-12 03:28:39 [2023-01-12 11:28:39 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:266)
</code>```

...And the "worker timeout-booting worker-worker timeout" cycle continues forever.
Now, if I comment out (remove) the redis, airflow-workflow, and airflow-triggerrer parts of the compose file as suggested by this article under the "Airflow Installation -- Lite Version" section of the article, everything runs fine and everything is healthy. But, I know that I'm going to need those containers in the future.

If I've maxed out my MacOS resources, what do you suggest I do?

(NOTE: This question on Stack Overflow mentions improving Docker Memory when running on desktop as the solution. However, as you can see by my screenshot and text above, I have already tried that and it did not work.)

Body:
I am trying to run Airflow on Docker (using a MacOS, Version 12.6.2, with 8 GB of Memory). I have downloaded the docker-compose.yaml file here (apache/airflow:2.4.2), and have set my .env file to this:

AIRFLOW_IMAGE_NAME=apache/airflow:2.4.2
AIRFLOW_UID=50000

When I run docker-compose up -d, and wait, the webserver containers never become healthy:

As suggested by numerous people on MacOS, I have upped my Docker memory:

I have tried numerous combinations of Docker memory (all 8GB of Memory, 7 GB of Memory, 6 GB of Memory, 5 and 4 GB of Memory) as well as testing different combinations of CPU, Swap, and Virtual Disk Limit (I have not tried going higher than 160 GB in the Virtual Disk Limit). I have also seen that it is a bad idea to use all 4 CPUs, so I have not tried that.

Here is the log I get for the webserver container:

2023-01-12 03:26:30 [2023-01-12 11:26:30 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:215)
2023-01-12 03:26:31 [2023-01-12 11:26:31 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:216)
2023-01-12 03:26:33 [2023-01-12 11:26:32 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:217)
2023-01-12 03:26:33 [2023-01-12 11:26:33 +0000] [79] [WARNING] Worker with pid 215 was terminated due to signal 9
2023-01-12 03:26:34 [2023-01-12 11:26:34 +0000] [262] [INFO] Booting worker with pid: 262
2023-01-12 03:26:36 [2023-01-12 11:26:36 +0000] [79] [WARNING] Worker with pid 217 was terminated due to signal 9
2023-01-12 03:26:36 [2023-01-12 11:26:36 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:219)
2023-01-12 03:26:36 [2023-01-12 11:26:36 +0000] [263] [INFO] Booting worker with pid: 263
2023-01-12 03:26:37 [2023-01-12 11:26:37 +0000] [79] [WARNING] Worker with pid 216 was terminated due to signal 9
2023-01-12 03:26:38 [2023-01-12 11:26:38 +0000] [265] [INFO] Booting worker with pid: 265
2023-01-12 03:26:39 [2023-01-12 11:26:39 +0000] [79] [WARNING] Worker with pid 219 was terminated due to signal 9
2023-01-12 03:26:40 [2023-01-12 11:26:40 +0000] [266] [INFO] Booting worker with pid: 266
2023-01-12 03:28:34 [2023-01-12 11:28:33 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:262)
2023-01-12 03:28:36 [2023-01-12 11:28:36 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:263)
2023-01-12 03:28:38 [2023-01-12 11:28:38 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:265)
2023-01-12 03:28:39 [2023-01-12 11:28:39 +0000] [79] [CRITICAL] WORKER TIMEOUT (pid:266)

...And the "worker timeout-booting worker-worker timeout" cycle continues forever.
Now, if I comment out (remove) the redis, airflow-workflow, and airflow-triggerrer parts of the compose file as suggested by this article under the "Airflow Installation -- Lite Version" section of the article, everything runs fine and everything is healthy. But, I know that I'm going to need those containers in the future.

If I've maxed out my MacOS resources, what do you suggest I do?

(NOTE: This question on Stack Overflow mentions improving Docker Memory when running on desktop as the solution. However, as you can see by my screenshot and text above, I have already tried that and it did not work.)


问:
WhatsApp Link Preview Images different dimensions depending on sender device
A webpage I am currently working on needs to have preview images when sending a link through WhatsApp. That by itself is not an issue, as I am following the OG Protocol specified here. The issue is that depending on which device the link is sent from, the images are displayed differently. Here are a few examples:

WhatsApp Desktop on MacOS Ventura 13.1

WhatsApp Web (Chrome 108.0.5359.124) and WhatsApp on Android

WhatsApp on IOS

(For some reason, this time it decided to take the Favicon instead of the specified image.)

Here are the relevant Meta-Tags from the Page

<meta name="description" content="Wir treten mit Regierungsrätin Jacqueline Fehr und Nationalrätin Priska Seiler Graf zu den Regierungsratswahlen an – ein hochkarätiges Duo mit langjähriger Erfahrung und ausgewiesener Kompetenz.">
<meta property="og:image" content="https://wahlen-kanton-zuerich.ch/wp-content/uploads/2023/01/SPZH-KR-Wahlen23-RR-Bilder-–-WEB4-Kopie.jpg">
<meta property="og:image:width" content="1720">
<meta property="og:image:height" content="1200">
<meta property="og:locale" content="de_DE">
<meta property="og:type" content="website">
<meta property="og:title" content="Priska Seiler Graf und Jacqueline Fehr in den Regierungsrat!">
<meta property="og:description" content="Wir treten mit Regierungsrätin Jacqueline Fehr und Nationalrätin Priska Seiler Graf zu den Regierungsratswahlen an – ein hochkarätiges Duo mit langjähriger Erfahrung und ausgewiesener Kompetenz.">
<meta property="og:url" content="https://wahlen-kanton-zuerich.ch/regierungsrat/">
<meta property="og:site_name" content="Wir ergreifen Partei.">
```

It is baffling to me that the same code would result in different preview Images depending on the sender. Am I missing something?

Body:
A webpage I am currently working on needs to have preview images when sending a link through WhatsApp. That by itself is not an issue, as I am following the OG Protocol specified here. The issue is that depending on which device the link is sent from, the images are displayed differently. Here are a few examples:

WhatsApp Desktop on MacOS Ventura 13.1

WhatsApp Web (Chrome 108.0.5359.124) and WhatsApp on Android

WhatsApp on IOS

(For some reason, this time it decided to take the Favicon instead of the specified image.)

Here are the relevant Meta-Tags from the Page

<meta name="description" content="Wir treten mit Regierungsrätin Jacqueline Fehr und Nationalrätin Priska Seiler Graf zu den Regierungsratswahlen an – ein hochkarätiges Duo mit langjähriger Erfahrung und ausgewiesener Kompetenz.">
<meta property="og:image" content="https://wahlen-kanton-zuerich.ch/wp-content/uploads/2023/01/SPZH-KR-Wahlen23-RR-Bilder-–-WEB4-Kopie.jpg">
<meta property="og:image:width" content="1720">
<meta property="og:image:height" content="1200">
<meta property="og:locale" content="de_DE">
<meta property="og:type" content="website">
<meta property="og:title" content="Priska Seiler Graf und Jacqueline Fehr in den Regierungsrat!">
<meta property="og:description" content="Wir treten mit Regierungsrätin Jacqueline Fehr und Nationalrätin Priska Seiler Graf zu den Regierungsratswahlen an – ein hochkarätiges Duo mit langjähriger Erfahrung und ausgewiesener Kompetenz.">
<meta property="og:url" content="https://wahlen-kanton-zuerich.ch/regierungsrat/">
<meta property="og:site_name" content="Wir ergreifen Partei.">

It is baffling to me that the same code would result in different preview Images depending on the sender. Am I missing something?


问:
Error: Unable to parse parameter in github workflow to deploy bicep with an inline script
I have the following in the GitHub Actions workflow:

- name: Deploy bicep
  uses: azure/CLI@v1
  with:
    inlineScript: |
      az group create -g ifms-gmt-demo-westeurope -l westeurope
      az deployment group create -g ifms-gmt-demo-westeurope -f ./deploy/containerapps/main.bicep \
       -p sqlAdministratorLoginPassword = ${{secrets.SQL_ADMINISTRATOR_LOGIN_PASSWORD}}
```
<p>I'm trying to pass the parameter <code>${{secrets.SQL_ADMINISTRATOR_LOGIN_PASSWORD}}</code> that is stored in the GitHub workflow secrets but I get the following error when the workflow runs:</p>
```ERROR: Unable to parse parameter: sqlAdministratorLoginPassword
```
<p><code>main.bicep</code> file:</p>
```param location string = resourceGroup().location
param sqlAdministratorLogin string = 'super_admin'
@secure()
param sqlAdministratorLoginPassword string

module sqlServer 'modules/infra/sql-server.bicep' = {
  name: '${deployment().name}-infra-sql-server'
  params: {
    location: location
    sqlAdministratorLogin: sqlAdministratorLogin
    sqlAdministratorLoginPassword: sqlAdministratorLoginPassword
  }
}
```

Body:
I have the following in the GitHub Actions workflow:

- name: Deploy bicep
  uses: azure/CLI@v1
  with:
    inlineScript: |
      az group create -g ifms-gmt-demo-westeurope -l westeurope
      az deployment group create -g ifms-gmt-demo-westeurope -f ./deploy/containerapps/main.bicep \
       -p sqlAdministratorLoginPassword = ${{secrets.SQL_ADMINISTRATOR_LOGIN_PASSWORD}}

I'm trying to pass the parameter ${{secrets.SQL_ADMINISTRATOR_LOGIN_PASSWORD}} that is stored in the GitHub workflow secrets but I get the following error when the workflow runs:

ERROR: Unable to parse parameter: sqlAdministratorLoginPassword

main.bicep file:

param location string = resourceGroup().location
param sqlAdministratorLogin string = 'super_admin'
@secure()
param sqlAdministratorLoginPassword string

module sqlServer 'modules/infra/sql-server.bicep' = {
  name: '${deployment().name}-infra-sql-server'
  params: {
    location: location
    sqlAdministratorLogin: sqlAdministratorLogin
    sqlAdministratorLoginPassword: sqlAdministratorLoginPassword
  }
}


问:
Rendring every word as a span in DraftJS
I want to use DraftJS for a project but I want every word to be wrapped in a span tag and have some attributes like this

    like
    this

```

I don't think there is a way to do something like this in draftJS so I want know how I can change the source code of draftJS to do it (after forking)

Body:
I want to use DraftJS for a project but I want every word to be wrapped in a span tag and have some attributes like this

    like
    this

I don't think there is a way to do something like this in draftJS so I want know how I can change the source code of draftJS to do it (after forking)


问:
Is there a way to create a button in discord server on bot ready?
I am trying to create a button in discord channel upon bot ready and without a command. It's like sending a button in the channel and then wait listening for the interaction. After successfull interaction, I want to invoke a function in my python code.</p>
```<code>import discord
from discord.ext import commands
from discord_webhook import DiscordWebhook

bot = commands.Bot(command_prefix='!', intents=discord.Intents.all())

@bot.event
async def on_ready():
  print("Bot Is Online")
  channel = bot.get_channel()
  await channel.send('!menu')

class Menu(discord.ui.View):

  def __init__(self):
    super().__init__()
    self.value = None

  @discord.ui.button(label="Purchase", style=discord.ButtonStyle.green)
  async def menu1(self, interaction: discord.Interaction,
                  button: discord.ui.Button):
    await interaction.response.send_message(
      "Purchase bot has starting ordering your product in bulk...")

@bot.command()
async def menu(ctx):
  view = Menu()
  await ctx.reply(view=view)

bot.run()
</code>```

Body:
I am trying to create a button in discord channel upon bot ready and without a command. It's like sending a button in the channel and then wait listening for the interaction. After successfull interaction, I want to invoke a function in my python code.

import discord
from discord.ext import commands
from discord_webhook import DiscordWebhook

bot = commands.Bot(command_prefix='!', intents=discord.Intents.all())

@bot.event
async def on_ready():
  print("Bot Is Online")
  channel = bot.get_channel()
  await channel.send('!menu')

class Menu(discord.ui.View):

  def __init__(self):
    super().__init__()
    self.value = None

  @discord.ui.button(label="Purchase", style=discord.ButtonStyle.green)
  async def menu1(self, interaction: discord.Interaction,
                  button: discord.ui.Button):
    await interaction.response.send_message(
      "Purchase bot has starting ordering your product in bulk...")

@bot.command()
async def menu(ctx):
  view = Menu()
  await ctx.reply(view=view)

bot.run()


问:
Installing old app versions as beta tester for migration testing
In our app we updated the database from one version to another.
Now for testing I want to jump between older versions that were officially released at some point in time.

In the Android developer console we can find the previous releases under

Production / Tab "Releases" / Section "Release history" / Dropdown "Show"

and a direct installation link for internal testers under

Blue rightarrow "Details" of the version to install / Section "App Bundles" / Blue rightarrow "Details" of the desired APK / Tab "Downloads" / Link "Copy Sharable link"

The link looks like this:

```<code>https://play.google.com/apps/test/<name.of.my.app>/<release versionCode number>
</code>```

Now if I open this link on my target device (where "Internal app sharing" is activated in the settings) one of two things can happen:

a) everything works fine:
Google offers me to install the old app version with the hint

This version of this app (<versionCode number>) may be old. Turn off auto-update for this app to keep it from getting updated.

b) I get the following notification:

You're an internal tester. This app may be unsecure or unstable.

In this case, the most recent version available to internal testers (typically the future version) is installed.

I have several different Google accounts for alpha testers, and all of them are listed in the same group (Email list) under Testing / Internal testing / Testers

All accounts are in "developer mode" in the Play store and have "Internal app sharing" active in the Play store settings

I typically uninstall old app versions before clicking on the APK link which I sent to my tester accounts via Email

I have several phones with various Android versions, screen sizes etc. I could not recognize a deterministic pattern for ending up in situation "b)"

How can I install the older versions when the second situation "b)" appears?

Body:
In our app we updated the database from one version to another.
Now for testing I want to jump between older versions that were officially released at some point in time.

In the Android developer console we can find the previous releases under

Production / Tab "Releases" / Section "Release history" / Dropdown "Show"

and a direct installation link for internal testers under

Blue rightarrow "Details" of the version to install / Section "App Bundles" / Blue rightarrow "Details" of the desired APK / Tab "Downloads" / Link "Copy Sharable link"

The link looks like this:

https://play.google.com/apps/test/<name.of.my.app>/<release versionCode number>

Now if I open this link on my target device (where "Internal app sharing" is activated in the settings) one of two things can happen:

a) everything works fine:
Google offers me to install the old app version with the hint

This version of this app (<versionCode number>) may be old. Turn off auto-update for this app to keep it from getting updated.

b) I get the following notification:

You're an internal tester. This app may be unsecure or unstable.

In this case, the most recent version available to internal testers (typically the future version) is installed.

I have several different Google accounts for alpha testers, and all of them are listed in the same group (Email list) under Testing / Internal testing / Testers

All accounts are in "developer mode" in the Play store and have "Internal app sharing" active in the Play store settings

I typically uninstall old app versions before clicking on the APK link which I sent to my tester accounts via Email

I have several phones with various Android versions, screen sizes etc. I could not recognize a deterministic pattern for ending up in situation "b)"

How can I install the older versions when the second situation "b)" appears?


问:
Tableau datasource connect to other datasource
everyone.
We are using tableau and found slow down in case of using single datasource with multiple workbooks with various filters.

We have created multiple datasources with their own filters. But currently we have a headache when we need to update tds due to updated db schema.

Example

```<code>table organizations ddl changed -> added new column that should be added to tds
</code>```

Is there a possibility to create datasource with db connection (master). And then child tds that will connect to master tds?

Body:
everyone.
We are using tableau and found slow down in case of using single datasource with multiple workbooks with various filters.

We have created multiple datasources with their own filters. But currently we have a headache when we need to update tds due to updated db schema.

Example

table organizations ddl changed -> added new column that should be added to tds

Is there a possibility to create datasource with db connection (master). And then child tds that will connect to master tds?


问:
Is there a way to "flatten" a Chessboard pattern apart from lense correction?
I checked the tutorials here and here, and I'm looking for something similar.

So far, I managed to solve lense distortion using a Chessboard pattern, just as below (this is an average result example, i made it quickly just for this question, but you get the point):

Here

To this

The "barrel" distortion due to the cyllindrical surface from which the chessboard is in is partially fixed. But, more than the lense/distortion correction, I wanted the camera_matrix to "flatten" the chessboard pattern (i.e., to make all squares same size), similarly as the unwrap wine label similarly as used in Nepherhotep/unwrap_labels, but using the Chessboard rather than the markers instead.

Is there anything similar?


问:
Kubernetes egress doesnt work for active database connection (jdbc)
I would like to deny outgoing connections from existing pods for specific IP address. I created the following network policy (NP) in which I restricted the IP range of the database server (10.16.0.0/16). The policy only works after the pod is restarted (jdbc erros in log). If I apply Network Policy to a running pod, the pod is still able to communicate with the database.
In case of other system (ldap) NP will block the communication immediately without having to restart the pod.

```<code>kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: egress-deny-ip
  namespace: <namespace>
spec:
  podSelector:
      matchLabels:
  policyTypes:
  - Egress
  egress:
  - to:
    - ipBlock:
        cidr: 0.0.0.0/0
        except:
        - <cidr>
  - to:
    - namespaceSelector:
        matchLabels:
          kubernetes.io/metadata.name: "kube-system"
    - podSelector:
        matchLabels:
          k8s-app: "kube-dns"
    ports:
    - protocol: TCP
      port: 53
    - protocol: UDP
      port: 53
</code>```

I assumed that communication would be blocked immediately and errors would appear in the log. I tried blocking all communication from the pod, but it didn't affect the database (no error in log, only ldap errors). I also tried block ingress and egress for specific cidr, but nothing changed.

Has anyone encountered this behavior?

Body:
I would like to deny outgoing connections from existing pods for specific IP address. I created the following network policy (NP) in which I restricted the IP range of the database server (10.16.0.0/16). The policy only works after the pod is restarted (jdbc erros in log). If I apply Network Policy to a running pod, the pod is still able to communicate with the database.
In case of other system (ldap) NP will block the communication immediately without having to restart the pod.

kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: egress-deny-ip
  namespace: <namespace>
spec:
  podSelector:
      matchLabels:
  policyTypes:
  - Egress
  egress:
  - to:
    - ipBlock:
        cidr: 0.0.0.0/0
        except:
        - <cidr>
  - to:
    - namespaceSelector:
        matchLabels:
          kubernetes.io/metadata.name: "kube-system"
    - podSelector:
        matchLabels:
          k8s-app: "kube-dns"
    ports:
    - protocol: TCP
      port: 53
    - protocol: UDP
      port: 53

I assumed that communication would be blocked immediately and errors would appear in the log. I tried blocking all communication from the pod, but it didn't affect the database (no error in log, only ldap errors). I also tried block ingress and egress for specific cidr, but nothing changed.

Has anyone encountered this behavior?


问:
After upgrading Spring Boot to 2.7.7 getting ClassNotFoundException: org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata
In my Kotlin Maven project am trying to upgrade Spring Boot from 2.3.12.RELEASE to 2.7.7 but when I try to build the project, I am getting:

```<code>Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.context.properties.ConfigurationPropertiesBeans] from ClassLoader [sun.misc.Launcher$AppClassLoader@75b84c92]
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:485)
        at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:321)
        at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.buildPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:417)
        at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:388)
        at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:335)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1116)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
        ... 104 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2729)
        at java.lang.Class.getDeclaredMethods(Class.java:2003)
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:467)
        ... 110 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata
        at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        ... 114 common frames omitted
</code>```

I tried to find the solution on the existing topic springboot Upgrade from 2.3.5.RELEASE to 2.4.1- ClassNotFoundException: org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata but I actually don't have dependency for spring-cloud-dependencies. What I have in my pom.xml that is related to spring cloud is this:

```<code><dependency>
   <groupId>org.springframework.cloud</groupId>
   <artifactId>spring-cloud-starter-oauth2</artifactId>
   <version>2.2.5.RELEASE</version>
</dependency>
</code>```

Is there an easy way to avoid these exceptions?

I read about Spring Cloud Security reaching end of life but I am not sure how to do the migration.

I tried adding

```<code><dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-dependencies</artifactId>
    <version>2021.0.5</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>
</code>```

but it didn't help.

Here is my full pom.xml (some company data removed):

```<code><?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.7</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <groupId>...</groupId>
    <artifactId>...</artifactId>
    <version>...</version>
    <description>
        ...
    </description>

    <properties>
        <java.version>1.8</java.version>
        <kotlin.version>1.8.0</kotlin.version>
        <kotlinx-coroutines.version>1.6.4</kotlinx-coroutines.version>
        <start-class>...</start-class>

        <micrometer.version>1.10.3</micrometer.version>

        <jjwt.version>0.11.5</jjwt.version>
        <karate.version>0.9.6</karate.version>
        <hibernate-types.version>2.21.1</hibernate-types.version>

        <junit-jupiter.version>5.9.2</junit-jupiter.version>
        <mockito.project.version>3.12.4</mockito.project.version>

        <spring-security.version>5.3.1.RELEASE</spring-security.version>
        <cucumber-reporting.version>5.7.4</cucumber-reporting.version>
        <woodstox-core.version>6.4.0</woodstox-core.version>
        <jackson-dataformat-xml.version>2.11.4</jackson-dataformat-xml.version>
        <trimou.version>2.5.1.Final</trimou.version>
    </properties>

    <scm>
        <connection>...</connection>
        <url>...</url>
        <tag>HEAD</tag>
    </scm>

    <distributionManagement>
        <repository>
            <id>...</id>
            <name>...</name>
            <url>...</url>
        </repository>
        <snapshotRepository>
            <id>...</id>
            <name>...</name>
            <url>...</url>
        </snapshotRepository>
    </distributionManagement>

    <dependencies>

        <!-- Spring -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-webflux</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>

        <!-- Prometheus monitoring endpoint -->
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-core</artifactId>
            <version>${micrometer.version}</version>
        </dependency>
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-registry-prometheus</artifactId>
            <version>${micrometer.version}</version>
        </dependency>

        <!-- Spring Security -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-oauth2</artifactId>
            <version>2.2.5.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-data</artifactId>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-api</artifactId>
            <version>${jjwt.version}</version>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-impl</artifactId>
            <version>${jjwt.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-jackson</artifactId>
            <version>${jjwt.version}</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <!-- Kotlin -->
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-kotlin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-reflect</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jdk8</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlinx</groupId>
            <artifactId>kotlinx-coroutines-core</artifactId>
            <version>${kotlinx-coroutines.version}</version>
        </dependency>

        <!-- Data -->
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.flywaydb</groupId>
            <artifactId>flyway-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.vladmihalcea</groupId>
            <artifactId>hibernate-types-52</artifactId>
            <version>${hibernate-types.version}</version>
        </dependency>

        <!-- XML, Atom/RSS -->
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-xml</artifactId>
            <version>${jackson-dataformat-xml.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.woodstox</groupId>
            <artifactId>woodstox-core</artifactId>
            <version>${woodstox-core.version}</version>
        </dependency>

        <!-- JSON handling-->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit-jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit-jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>${mockito.project.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Karate Testing -->
        <dependency>
            <groupId>com.intuit.karate</groupId>
            <artifactId>karate-apache</artifactId>
            <version>${karate.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.intuit.karate</groupId>
            <artifactId>karate-junit5</artifactId>
            <version>${karate.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.masterthought</groupId>
            <artifactId>cucumber-reporting</artifactId>
            <version>${cucumber-reporting.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Template Engine -->
        <dependency>
            <groupId>org.trimou</groupId>
            <artifactId>trimou-core</artifactId>
            <version>${trimou.version}</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <id>...</id>
            <name>Public-Mirror</name>
            <url>...</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>...</id>
            <name>Public-Mirror</name>
            <url>...</url>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
        <testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>

        <!-- Config for the Karate testing framework -->
        <testResources>
            <testResource>
                <directory>src/test/kotlin</directory>
                <excludes>
                    <exclude>**/*.kt</exclude>
                </excludes>
            </testResource>
        </testResources>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>3.0.0-M7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.0-r1585899</version>
                </plugin>

            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <configuration>
                    <args>
                        <arg>-Xjsr305=strict</arg>
                    </args>
                    <compilerPlugins>
                        <plugin>spring</plugin>
                        <plugin>jpa</plugin>
                        <plugin>all-open</plugin>
                    </compilerPlugins>
                    <pluginOptions>
                        <option>all-open:annotation=javax.persistence.Entity</option>
                        <option>all-open:annotation=javax.persistence.Embeddable</option>
                        <option>all-open:annotation=javax.persistence.MappedSuperclass</option>
                    </pluginOptions>
                </configuration>
                <executions>
                    <execution>
                        <id>compile</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.jetbrains.kotlin</groupId>
                        <artifactId>kotlin-maven-allopen</artifactId>
                        <version>${kotlin.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.jetbrains.kotlin</groupId>
                        <artifactId>kotlin-maven-noarg</artifactId>
                        <version>${kotlin.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>skip-deploy-if-non-master-branch</id>
            <activation>
                <activeByDefault>false</activeByDefault>
                <property>
                    <name>env.GIT_BRANCH</name>
                    <value>!master</value>
                </property>
            </activation>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <configuration>
                            <skip>false</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>integrationtest</id>
            <build>
                <plugins>
                    <!--
                    Wait for the Spring Boot app to be ready.
                    -->
                    <plugin>
                        <groupId>com.github.slem1</groupId>
                        <artifactId>await-maven-plugin</artifactId>
                        <version>1.2.2</version>
                        <executions>
                            <execution>
                                <id>wait-for-application-startup</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>Await</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <poll>
                                <attempts>10</attempts>
                                <sleep>3000</sleep>
                            </poll>
                            <httpConnections>
                                <httpConnection>
                                    <url>http://localhost:18090</url>
                                    <statusCode>200</statusCode>
                                </httpConnection>
                            </httpConnections>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
</code>```

Body:
In my Kotlin Maven project am trying to upgrade Spring Boot from 2.3.12.RELEASE to 2.7.7 but when I try to build the project, I am getting:

Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.context.properties.ConfigurationPropertiesBeans] from ClassLoader [sun.misc.Launcher$AppClassLoader@75b84c92]
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:485)
        at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:321)
        at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.buildPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:417)
        at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:388)
        at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:335)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1116)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
        ... 104 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2729)
        at java.lang.Class.getDeclaredMethods(Class.java:2003)
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:467)
        ... 110 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata
        at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        ... 114 common frames omitted

I tried to find the solution on the existing topic springboot Upgrade from 2.3.5.RELEASE to 2.4.1- ClassNotFoundException: org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata but I actually don't have dependency for spring-cloud-dependencies. What I have in my pom.xml that is related to spring cloud is this:

<dependency>
   <groupId>org.springframework.cloud</groupId>
   <artifactId>spring-cloud-starter-oauth2</artifactId>
   <version>2.2.5.RELEASE</version>
</dependency>

Is there an easy way to avoid these exceptions?

I read about Spring Cloud Security reaching end of life but I am not sure how to do the migration.

I tried adding

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-dependencies</artifactId>
    <version>2021.0.5</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>

but it didn't help.

Here is my full pom.xml (some company data removed):

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.7</version>
        <relativePath/>
    </parent>

    <groupId>...</groupId>
    <artifactId>...</artifactId>
    <version>...</version>
    <description>
        ...
    </description>

    <properties>
        <java.version>1.8</java.version>
        <kotlin.version>1.8.0</kotlin.version>
        <kotlinx-coroutines.version>1.6.4</kotlinx-coroutines.version>
        <start-class>...</start-class>

        <micrometer.version>1.10.3</micrometer.version>

        <jjwt.version>0.11.5</jjwt.version>
        <karate.version>0.9.6</karate.version>
        <hibernate-types.version>2.21.1</hibernate-types.version>

        <junit-jupiter.version>5.9.2</junit-jupiter.version>
        <mockito.project.version>3.12.4</mockito.project.version>

        <spring-security.version>5.3.1.RELEASE</spring-security.version>
        <cucumber-reporting.version>5.7.4</cucumber-reporting.version>
        <woodstox-core.version>6.4.0</woodstox-core.version>
        <jackson-dataformat-xml.version>2.11.4</jackson-dataformat-xml.version>
        <trimou.version>2.5.1.Final</trimou.version>
    </properties>

    <scm>
        <connection>...</connection>
        <url>...</url>
        <tag>HEAD</tag>
    </scm>

    <distributionManagement>
        <repository>
            <id>...</id>
            <name>...</name>
            <url>...</url>
        </repository>
        <snapshotRepository>
            <id>...</id>
            <name>...</name>
            <url>...</url>
        </snapshotRepository>
    </distributionManagement>

    <dependencies>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-webflux</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>

        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-core</artifactId>
            <version>${micrometer.version}</version>
        </dependency>
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-registry-prometheus</artifactId>
            <version>${micrometer.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-oauth2</artifactId>
            <version>2.2.5.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-data</artifactId>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-api</artifactId>
            <version>${jjwt.version}</version>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-impl</artifactId>
            <version>${jjwt.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-jackson</artifactId>
            <version>${jjwt.version}</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-kotlin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-reflect</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jdk8</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlinx</groupId>
            <artifactId>kotlinx-coroutines-core</artifactId>
            <version>${kotlinx-coroutines.version}</version>
        </dependency>

        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.flywaydb</groupId>
            <artifactId>flyway-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.vladmihalcea</groupId>
            <artifactId>hibernate-types-52</artifactId>
            <version>${hibernate-types.version}</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-xml</artifactId>
            <version>${jackson-dataformat-xml.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.woodstox</groupId>
            <artifactId>woodstox-core</artifactId>
            <version>${woodstox-core.version}</version>
        </dependency>

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit-jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit-jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>${mockito.project.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.intuit.karate</groupId>
            <artifactId>karate-apache</artifactId>
            <version>${karate.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.intuit.karate</groupId>
            <artifactId>karate-junit5</artifactId>
            <version>${karate.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.masterthought</groupId>
            <artifactId>cucumber-reporting</artifactId>
            <version>${cucumber-reporting.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.trimou</groupId>
            <artifactId>trimou-core</artifactId>
            <version>${trimou.version}</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <id>...</id>
            <name>Public-Mirror</name>
            <url>...</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>...</id>
            <name>Public-Mirror</name>
            <url>...</url>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
        <testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>

        <testResources>
            <testResource>
                <directory>src/test/kotlin</directory>
                <excludes>
                    <exclude>**/*.kt</exclude>
                </excludes>
            </testResource>
        </testResources>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>3.0.0-M7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.0-r1585899</version>
                </plugin>

            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <configuration>
                    <args>
                        <arg>-Xjsr305=strict</arg>
                    </args>
                    <compilerPlugins>
                        <plugin>spring</plugin>
                        <plugin>jpa</plugin>
                        <plugin>all-open</plugin>
                    </compilerPlugins>
                    <pluginOptions>
                        <option>all-open:annotation=javax.persistence.Entity</option>
                        <option>all-open:annotation=javax.persistence.Embeddable</option>
                        <option>all-open:annotation=javax.persistence.MappedSuperclass</option>
                    </pluginOptions>
                </configuration>
                <executions>
                    <execution>
                        <id>compile</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.jetbrains.kotlin</groupId>
                        <artifactId>kotlin-maven-allopen</artifactId>
                        <version>${kotlin.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.jetbrains.kotlin</groupId>
                        <artifactId>kotlin-maven-noarg</artifactId>
                        <version>${kotlin.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>skip-deploy-if-non-master-branch</id>
            <activation>
                <activeByDefault>false</activeByDefault>
                <property>
                    <name>env.GIT_BRANCH</name>
                    <value>!master</value>
                </property>
            </activation>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <configuration>
                            <skip>false</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>integrationtest</id>
            <build>
                <plugins>

                    <plugin>
                        <groupId>com.github.slem1</groupId>
                        <artifactId>await-maven-plugin</artifactId>
                        <version>1.2.2</version>
                        <executions>
                            <execution>
                                <id>wait-for-application-startup</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>Await</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <poll>
                                <attempts>10</attempts>
                                <sleep>3000</sleep>
                            </poll>
                            <httpConnections>
                                <httpConnection>
                                    <url>http://localhost:18090</url>
                                    <statusCode>200</statusCode>
                                </httpConnection>
                            </httpConnections>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>


问:
How can I specify 'failureReason' in failure message of SageMaker Async Endpoint?
I have set up my SageMaker endpoint using Async Endpoint and provided SNS Topic ARN for the SuccessTopic and ErrorTopic parameters. I am receiving success and failure messages from these SNS Topics without error but I want the failure messages to be more verbose. The failure message looks like this:

{
    "awsRegion": "...",
    "eventTime": "...",
    "receivedTime": "...",
    "invocationStatus": "Failed",
    "failureReason": "ClientError: Received server error (500) from model. See the SageMaker Endpoint logs in your account for more information.",
    "requestParameters": {
        "endpointName": ...,
        "inputLocation": ...
    },
    "inferenceId": "...",
    "eventVersion": "1.0",
    "eventSource": "aws:sagemaker",
    "eventName": "InferenceResult"
}
```

There might be different reasons for the service to throw error such as CUDA OOM errors or an assertion error that I have thrown. I would love to see this information from the SNS message. However, the only way to see any additional information for the error is to see the SageMaker Endpoint logs.

Each time I receive an error from sagemaker service, The failureReason is the same. Is there a way to specify failureReason parameter in this message?

I have tried adding Exception messages to all exceptions that I raised in the code but the message never changed. I have no access to SNS topic during the execution. I have created an SNS client using boto3 and sent a notification before raising any assertion error but I don't know any way to stop executing the sagemaker execution without throwing an error, which sends another failure message automatically.

Body:
I have set up my SageMaker endpoint using Async Endpoint and provided SNS Topic ARN for the SuccessTopic and ErrorTopic parameters. I am receiving success and failure messages from these SNS Topics without error but I want the failure messages to be more verbose. The failure message looks like this:

{
    "awsRegion": "...",
    "eventTime": "...",
    "receivedTime": "...",
    "invocationStatus": "Failed",
    "failureReason": "ClientError: Received server error (500) from model. See the SageMaker Endpoint logs in your account for more information.",
    "requestParameters": {
        "endpointName": ...,
        "inputLocation": ...
    },
    "inferenceId": "...",
    "eventVersion": "1.0",
    "eventSource": "aws:sagemaker",
    "eventName": "InferenceResult"
}

There might be different reasons for the service to throw error such as CUDA OOM errors or an assertion error that I have thrown. I would love to see this information from the SNS message. However, the only way to see any additional information for the error is to see the SageMaker Endpoint logs.

Each time I receive an error from sagemaker service, The failureReason is the same. Is there a way to specify failureReason parameter in this message?

I have tried adding Exception messages to all exceptions that I raised in the code but the message never changed. I have no access to SNS topic during the execution. I have created an SNS client using boto3 and sent a notification before raising any assertion error but I don't know any way to stop executing the sagemaker execution without throwing an error, which sends another failure message automatically.


问:
Apache Avro does not print BigDecimal into parquet file Error : java.math.BigDecimal cannot be cast to java.nio.ByteBuffer
I need to create parquet file with using apache-avro library in Java8. the POJO created automatically from ".avsc" file with maven generation-resource. but I have trouble with BigDecimal fields in the file. I researched apache-avro library documentation(apache-avro).
I was able to created successfully POJO with the field types that I need. but I got exception while write phase. I saw similar problems that already asked but there is no solution to solve my problem.

here is the code that I'm working on github code

Employee_schema.avsc

```<code>{"type": "record",
  "namespace": "com.avro.example",
  "name": "Employee",
  "fields": [
    {"name": "name","type": "string"},
    {"name": "email","type": "string"},
    {"name": "salary",
      "type": { "type": "bytes",
                "logicalType": "decimal",
                "precision": 4,
                "scale": 2
      }}]
}
</code>```

Main.class

```<code>public static void main(String[] args) throws IOException {

    File outputParquet = new File("./output.parquet");
    Files.deleteIfExists(outputParquet.toPath());
    Employee employee = new Employee("john", "john.doe@mail.com",BigDecimal.TEN);
    ParquetWriter<Employee> writer = AvroParquetWriter.<Employee>builder(new Path(outputParquet.getAbsolutePath()))
            .withCompressionCodec(CompressionCodecName.SNAPPY)
            .withSchema(employee.getSchema())
            .build();
    try {
        writer.write(employee);
    } catch (Exception e) {
        e.printStackTrace();
    }
    writer.close();
}
</code>```

pom.xml

```<code><?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.avro.example</groupId>
    <artifactId>avro-example</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.parquet</groupId>
            <artifactId>parquet-avro</artifactId>
            <version>1.11.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.avro</groupId>
            <artifactId>avro</artifactId>
            <version>1.11.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-core</artifactId>
            <version>1.2.1</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.avro</groupId>
                <artifactId>avro-maven-plugin</artifactId>
                <version>1.11.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>schema</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
                            <sourceDirectory>${project.basedir}/src/main/avro/</sourceDirectory>
                            <outputDirectory>${project.basedir}/src/main/java/</outputDirectory>
                            <enableDecimalLogicalType>true</enableDecimalLogicalType>
                            <fieldVisibility>private</fieldVisibility>
                            <stringType>String</stringType>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
</code>```

Body:
I need to create parquet file with using apache-avro library in Java8. the POJO created automatically from ".avsc" file with maven generation-resource. but I have trouble with BigDecimal fields in the file. I researched apache-avro library documentation(apache-avro).
I was able to created successfully POJO with the field types that I need. but I got exception while write phase. I saw similar problems that already asked but there is no solution to solve my problem.

here is the code that I'm working on github code

Employee_schema.avsc

{"type": "record",
  "namespace": "com.avro.example",
  "name": "Employee",
  "fields": [
    {"name": "name","type": "string"},
    {"name": "email","type": "string"},
    {"name": "salary",
      "type": { "type": "bytes",
                "logicalType": "decimal",
                "precision": 4,
                "scale": 2
      }}]
}

Main.class

public static void main(String[] args) throws IOException {

    File outputParquet = new File("./output.parquet");
    Files.deleteIfExists(outputParquet.toPath());
    Employee employee = new Employee("john", "john.doe@mail.com",BigDecimal.TEN);
    ParquetWriter<Employee> writer = AvroParquetWriter.<Employee>builder(new Path(outputParquet.getAbsolutePath()))
            .withCompressionCodec(CompressionCodecName.SNAPPY)
            .withSchema(employee.getSchema())
            .build();
    try {
        writer.write(employee);
    } catch (Exception e) {
        e.printStackTrace();
    }
    writer.close();
}

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.avro.example</groupId>
    <artifactId>avro-example</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.parquet</groupId>
            <artifactId>parquet-avro</artifactId>
            <version>1.11.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.avro</groupId>
            <artifactId>avro</artifactId>
            <version>1.11.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-core</artifactId>
            <version>1.2.1</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.avro</groupId>
                <artifactId>avro-maven-plugin</artifactId>
                <version>1.11.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>schema</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
                            <sourceDirectory>${project.basedir}/src/main/avro/</sourceDirectory>
                            <outputDirectory>${project.basedir}/src/main/java/</outputDirectory>
                            <enableDecimalLogicalType>true</enableDecimalLogicalType>
                            <fieldVisibility>private</fieldVisibility>
                            <stringType>String</stringType>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>