Let's Encrypt SSL Cert Auto-Renew "Internal Error"

Checklist

Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?

Yes

Are you sure you're not using someone else's docker image?

Yes

Have you searched for similar issues (both open and closed)?

Yes

Describe the bug
Certificates issued by Lets Encrypt does not auto renew, manually clicking renew returns "Internal Error". Deleting the certificate and re-creating it works though.
Nginx Proxy Manager Version

v2.11.3 - Using Docker-Compose
To Reproduce
Steps to reproduce the behavior:

Find expired lets encrypt cert.
Click renew (returns "Internal Error")

Expected behavior

Renew the ssl certificate issued by Lets Encrypt
Screenshots

Operating System

Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

I've the same problem with the same docker version

I've the same problem with the same docker version

Im using the docker-compose version too. Forgot to mention that.

Deleting the certificate and re-creating it works though.

I added a DNS Challenge cert for a domain that I havent used before, after adding it I was able renew the other certificates without getting the Internal Error!

Deleting the certificate and re-creating it works though.

I added a DNS Challenge cert for a domain that I havent used before, after adding it I was able renew the other certificates without getting the Internal Error!
Edit: Came across this error again with another docker compose container. I recently migrated this container to a new machine and the symlink's located in the "./letsencrypt/live/npm-x/" directory were copied over as the source files, not the links. After recreating the symlinks to the ".pem" files located at "./letsencrypt/archive/npm-x/" I was able to renew the cert.

I am using the DNS Challenge and i still get this error.

I recently migrated this container to a new machine and the symlink's located in the "./letsencrypt/live/npm-x/" directory were copied over as the source files, not the links.

My links are correct (just checked). The renew just never ever worked for me. This is my second NPM and still does not work.

I checked the logs because of the same issue and I got banned from letsencrypt. I was horrified to discover that I got banned because NPM was SPAMMING the renewal requests for domains that were not even accessible, multiple times a minute. As I am quite sure this not how it worked, I believe this a bug introduced with a recent version.
" error: urn:ietf:params:acme:error:rateLimited :: There were too many requests of a given type"

I checked the logs because of the same issue and I got banned from letsencrypt. I was horrified to discover that I got banned because NPM was SPAMMING the renewal requests for domains that were not even accessible, multiple times a minute. As I am quite sure this not how it worked, I believe this a bug introduced with a recent version.
" error: urn:ietf:params:acme:error:rateLimited :: There were too many requests of a given type"

What is the location of the log file. Maybe i missed something. My log files don't show any errors.

FYI:  for anyone else that is in the same situation as me this is the fix.
I limited my CloudFlare API key to only work from certain IP addresses.  I recently moved house and changed my ISP.  Since then the Cert Renewals all failed with the same error that OP listed,  But I had forgotten this.
After checking the /var/logs/letsencrypt/letsencrypt.log file I could see multiple of the following entries:
2024-10-24 08:23:29,249:DEBUG:certbot_dns_cloudflare._internal.dns_cloudflare:Encountered error finding zone_id during deletion: Error determining zone_id: 9109 Max auth failures reached, please check your Authorization header.. Please confirm that you have supplied valid Cloudflare API credentials. (Did you enter a valid Cloudflare Token?)
This indicated an issue with my API key.  Knowing I had not changed it, I logged into the Cloud Flare and noticed I had restricted it to only be usable from certain IP addresses, as security precaution.  After entering in my new (static) IP from the new ISP the issue was resolved (for me in this very specific situation).
I hope this help anyone else that may have limited their API key to certain IP address, and forgot they did that. :)

Solved by force containers removal, pruning latest images and re-creating it again by pulling the latest version:
docker rm -f npm-app
docker rm -f npm-db
docker image prune -a
docker-compose up -d
Hope it helps!

Hello got same issue, which DNS are you using ? If its cloudflare, desactivate cloudflare proxy (test but wait a few minutes), get your ssl certs and put cloudlfare proxy again.
Otherwise for other DNS use nslookup <your_domain> and verify its your ip.

Had similar issue today, my ssl 's usual auto renew and not been an issue for a few years, today noticed one ssl needed to be renewed by 24th Nov 2024, tried to manually renew but got an internal error.
Googled and saw one post on here to say to switch off forced SSL and try, so did this and manual renew worked, not sure why its started to be an issue now and no before, Ive always had force ssl on.
Use nginx in Unraid, docker, repo: jlesage/nginx-proxy-manager
thanks

I have the same issue, switched off force SSL but still no success in renewing. And when I test server connectivity in NPM it says:
influxdb..nl: There is a server found at this domain but it returned an unexpected status code Invalid domain or IP. Is it the NPM server? Please make sure your domain points to the IP where your NPM instance is running.
The mentioned internal ip-address: <IP_ADDRESS>:8086 is valid and I can connect directly through that.


Go to function does not work for modules using xmldb: prefix

in the "at" clause of the import statement.

we should at a pending test that shows this


api: add nexo support

Actually the value of the order is not the real, since the order is not ready just after creating it.
We should instead save only the id of the order, then complete it when needed with real info from nexo pro api.

waiting the bdd improvement to do this.


cat /host/proc/[pid]/io permission dennied

I coudn't open /host/proc/[pid]/io.
I added --security-opt=apparmor:unconfined at running container found it in docker#7276.
Now it's working correctly.

What would be the complete docker run statement which you are running? I suppose that not reading the host/proc/pid/io would result in the lack of docker disk io metrics?

I'm running it with docker-compose:
version: '2'
services:
  netdata:
    image: titpetric/netdata
    volumes:
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /var/log/:/var/log/:ro
      - /var/run/docker.sock:/var/run/docker.sock
      - ./netdata/:/etc/netdata/
      - /home/server/data2:/home/server/data2:ro
      - /home/server/data1:/home/server/data1:ro
    network_mode: host
    restart: always
    cap_add:
      - SYS_PTRACE
    security_opt:
      - apparmor:unconfined

data1 and data2 is for monitoring filesystem, and /var/log for nginx_log plugin.
Not reading [/host/proc/[pid]/io] cause a block in apps.plugin log, but I don't know what metrics are affected:
Dec  6 12:32:01 server docker/netdata_netdata_1[8562]: 2016-12-06 11:32:01: apps.plugin: Too many logs (101 logs in 1 seconds, threshold is set to 100 logs in 3600 seconds). Preventing more logs from process 'apps.plugin' for 3599 seconds.

Can't confirm issue, closing. Only SYS_PTRACE is needed.


Symbolic Linker sometimes hangs when trying to delete an old link

XRTK - Mixed Reality Toolkit Bug Report
Describe the bug

When updating to a branch where a symbolic link has been deleted or removed the symbolic linker will cause the editor to hang indefinitely.
To Reproduce

Remove a symbolic link from the project and commit the change
Switch to a branch where the symbolic link exists
Close the editor
Switch back to the branch where the symbolic link was removed
Open the editor
Observe that the editor fails to fully load the project and hangs on project open

Expected behavior

Project should open without delays
Actual behavior

Project hangs when trying to open the project where a link was removed.
Your Setup

Operation System:

[x] Windows
[ ] MacOs
[ ] Linux
[ ] Other

Unity Version:  2019.4.19f
XRTK Packages

[x] com.xrtk.core 0.2.8

I tried digging into this in depth yesterday, and it seems to be a bug with the Unity AssetDatabase. The editor seems to freeze up if a folder with an directory junction (symlink) is inside the project's asset folders and the reference to that junction is no longer valid.
This typically is the case when using a SVC like GIT to change between branches and a previously valid link is removed.


Fix noBlockingAnimations: reverse it and cover fitBounds

This pull request has two commits regarding noBlockingAnimations.

Reverse meaning of noBlockingAnimations to close #428.
Apply noBlockingAnimations to fitBounds. Previously, fitBounds could block changes with animations (in some cases).

@javiertury unit tests are failing can u take a look? and thanks :)

Thanks for the warning, I forgot about them.

@javiertury thank you :) merged


Wrong Type for CertificateInfo 'notBefore' and 'notAfter'

In the CertificateInfo interface, the properties notBefore and notAfter are declared as strings.
At runtime, though, the properties seem to be Date objects.

Thanks @ChrisTalman, fixed in 3ba4bc310c4828f8c749e7809ffeaa6791813f04.


Rasa x event-service (consumer) is too slow and make rabbitmq queue is growing.

Rasa version : 2.3.4
Rasa SDK version (if used & relevant): 2.3.1
Rasa X version (if used & relevant): 0.37.1
Python version : 3.8.5
Operating system (windows, osx, ...): Linux-4.19.112+-x86_64-with-glibc2.29
Issue : I'm deploying rasa, rasa-x, rabbitmq cluster to k8s cluster. I setting up an environment for rasa experiment, and I found out that rasa-x event service is too slow to consume messages from queue.
Other than that rasa-x event-service can not be scale out. I guess it because of fanout exchange implementation. ([[https://stackoverflow.com/questions/23198144/multiple-workers-consume-same-message-from-rabbitmq-queue|| https://stackoverflow.com/questions/23198144/multiple-workers-consume-same-message-from-rabbitmq-queue|] https://stackoverflow.com/questions/23198144/multiple-workers-consume-same-message-from-rabbitmq-queue], [[https://github.com/RasaHQ/rasa/blob/2ef804000087197f070e1e6a6bd0b6f7a3925551/rasa/core/brokers/pika.py#L210|| https://github.com/RasaHQ/rasa/blob/2ef804000087197f070e1e6a6bd0b6f7a3925551/rasa/core/brokers/pika.py#L210|] https://github.com/RasaHQ/rasa/blob/2ef804000087197f070e1e6a6bd0b6f7a3925551/rasa/core/brokers/pika.py#L210] )
Here is a result when I send requests with locust (concurrent users = 1) [Unable to render embedded object: File (//user-images.githubusercontent.com/17552517/112609677-65b6bc80-8e4e-11eb-96c1-97509a0ceea8.png) not found.|| https://user-images.githubusercontent.com/17552517/112609677-65b6bc80-8e4e-11eb-96c1-97509a0ceea8.png!%7C] https://user-images.githubusercontent.com/17552517/112609677-65b6bc80-8e4e-11eb-96c1-97509a0ceea8.png]
(concurrent users = 2) event-service cannot utilize the queue here [Unable to render embedded object: File (//user-images.githubusercontent.com/17552517/112611625-a7e0fd80-8e50-11eb-8690-761b13747840.png) not found.|| https://user-images.githubusercontent.com/17552517/112611625-a7e0fd80-8e50-11eb-8690-761b13747840.png!%7C] https://user-images.githubusercontent.com/17552517/112611625-a7e0fd80-8e50-11eb-8690-761b13747840.png]
Content of configuration file (endpoint.yml) (if relevant):
tracker_store:
 type: sql
 dialect: "postgresql"
 url: $

 {DB_HOST}

 port: $

 {DB_PORT}

 username: $

 {DB_USER}

 password: $

 {DB_PASSWORD}

 db: $

 {DB_DATABASE}

event_broker:
 type: "pika"
 url: rabbit-rabbitmq.rabbitmq.svc.cluster.local
 username: "rasa-user"
 password: $

 {RABBITMQ_PASSWORD}

 port: 5672
 queues:

*   rasa_production_events
Content of configuration file (rabbitmq.yml) (if relevant) :
...
 chart:
 repository: [https://charts.bitnami.com/bitnami](https://charts.bitnami.com/bitnami)
 name: rabbitmq
 version: 8.9.2
 ...

Thanks for the issue, @TyDunn will get back to you about it soon!
You may find help in the docs and the forum, too 🤗

Hey @Cobaramin
What's the DB you're using? And how big is the dataset atm?

Hi @degiz
I used Google Cloud SQL for the database. If you mean the nlu training data it's size is 680kb.

Thank you for raising this issue about Rasa X. We decided to stop supporting the Community Edition (free version) of ‘Rasa X’ (see more info here: https://rasa.com/blog/rasa-x-community-edition-changes/). That’s why we’ve closed your issue. We suggest that Rasa Enterprise customers raise the issue with our customer support team if they haven’t done so already.


User role and Dataset model

I had a think about the user and dataset model. The user role includes basic django user model fields like name, email, password, is_superuser, is_staff and etc, so the extra fields I can think of is the latest upload to reference from the Dataset table and a list of accessible_datasets for future development when we want to enable user to download only certain datasets. Let me your thoughts. Thanks.
The design is as below:
class Dataset(models.Model):
    id = models.AutoField(primary_key=True)
    title = models.CharField(max_length=100, blank=False, null=False, unique=True)
    task_type = models.CharField(max_length=100, null=True)
    crop_type = models.CharField(max_length=100, null=True)
    weed_species = models.CharField(max_length=100, null=True)
    images_amount = models.IntegerField(null=True)
    citation = models.CharField(max_length=200, null=True)
    licence = models.CharField(max_length=100, null=True)

    upload_date = models.DateTimeField(blank=True, null=True)
    upload_user = models.ForeignKey('WeedidUser', on_delete=models.SET_NULL, blank=True, null=True)
    upload_status = models.TextChoices('None', 'Incomplete', 'Awaiting Review', 'Complete')
    upload_agcontext = JSONField(null=True)
    upload_annotation_type = models.CharField(max_length=100, default='WeedCOCO')

class WeedidUser(AbstractUser):
    latest_upload = models.ForeignKey(Dataset, on_delete=models.SET_NULL, blank=True, null=True)
    accessible_datasets = models.ManyToManyField(Dataset, blank=True)

The stuff related to crop type, task type, etc, won't necessarily be able to be stored in 100 chars, and I don't see the point of constraining ourselves to a fixed schema. Certainly not for weed species, where there will be multiple species for many datasets. We'll probably want multiple image counts, e.g. per species or per agcontext. For these reasons I think it might be best to store dataset info as a JSON blob, whether in postgres or ES. (I read a blog the other day that pointed to the merits of using Postgres as a nosql database using these dox functions, allowing it to be extended into a relational schema when needed.)
I'd put the upload data in there, but everything else I'd put in a JSON blob.

class Dataset(models.Model):
    id = models.AutoField(primary_key=True)
    title = models.CharField(max_length=50, blank=False, null=False, unique=True)
    images_amount = models.IntegerField(null=True)

    upload_date = models.DateTimeField(blank=True, null=True)
    upload_user = models.ForeignKey('WeedidUser', on_delete=models.SET_NULL, blank=True, null=True)
    upload_status = models.TextChoices('None', 'Incomplete', 'Awaiting Review', 'Complete')
    upload_agcontext = JSONField(null=True)
    upload_annotation_type = models.CharField(max_length=100, default='WeedCOCO')

class WeedidUser(AbstractUser):
    latest_upload = models.ForeignKey(Dataset, on_delete=models.SET_NULL, blank=True, null=True)
    accessible_datasets = models.ManyToManyField(Dataset, blank=True)

The field upload_agcontext is in json format. May I know what to be expected from the agconext and metadata form? I'm not sure about which field is essential for each upload, and the content rendered in frontend is definitely expecting some data following certain protocol, not something without any constraint.

Let's step back a bit. A dataset ideally includes:

publication metadata in accordance with schema.org/DataSet, which treats a dataset as a creative work with citable authorship, institutional affiliation, sponsorship, year of publication, funding information, DOI, etc. We had defined weedcoco such that a single JSON file could contain multiple datasets. For this reason we defined collections (and collection_memberships; see https://github.com/Sydney-Informatics-Hub/Weed-ID-Interchange/blob/master/weedcoco/spec_overview.md). From a relational database perspective, we might design that each Annotation to have a Collection (now called "dataset") as a foreign key. I now think this is excessive complexity for a first implementation, and we should just put metadata into the info section of the uploaded/downloaded COCO file.
one or more agcontexts, which define the collection parameters for the images within that dataset. Each image is associated with one agcontext. We allowed a single dataset to have multiple agcontexts, because we wanted to support researchers / data collectors putting together a bunch of images collected and annotated similarly, but in different crops/locations/times as a single, citable dataset. The change of crop, location or season would necessitate a different agcontext.
images
annotations, which define applicable ML tasks
(not yet implemented: train/test split)

All of this information (except for the image data) is stored in the weedcoco, and hence need not be explicitly stored in the database. However, it would be helpful to store a summary for the purposes of rapid access (parsing a full weedcoco may be prohibitive with lots of annotations), indexing for search, and aggregation. Such a summary has too much structure to store in a simple relational table as you initially proposed above, and – like the index records we are using for images – too little predefined structure that would justify writing out a relational schema and managing its migration as your understanding of what needs to be accommodated in that schema changes. This is precisely the case where NoSQL databases are valuable. If there is a consistent way of producing these summaries then it is the validity of the input, and the processing of that input to produce a summary, which ensures that it follows a protocol expected by the frontend.

Do you have a specific nosql db server to use, like the basic key-value pairs (redis, which has been created to play the message queue role for celery), document-based like MongoDB or Graph DB? MongoDB should be the best for this case right?

The reason I wanted to avoid MongoDB was that I haven't had psql and mongo server co-exist within Django, as handling multiple db includes things like migration is pretty painful, which increases the complexity and uncertainty. If storing metadata and agcontext as JSONField in psql can work, it would be more efficient for development under time pressure. If not, I can have a look how to make it work, maybe connecting to MongoDB separately and use things like pymongo.

You can use postgres as a nosql server, with a jsonfield (and indexing if needed), or elasticsearch. Happy to discuss tomorrow.

https://docs.djangoproject.com/en/2.2/ref/contrib/postgres/fields/#jsonfield
"PostgreSQL has two native JSON based data types: json and jsonb. The main difference between them is how they are stored and how they can be queried. PostgreSQL’s json field is stored as the original string representation of the JSON and must be decoded on the fly when queried based on keys. The jsonb field is stored based on the actual structure of the JSON which allows indexing. The trade-off is a small additional cost on writing to the jsonb field. JSONField uses jsonb."
I think JSONField should be all good to use.

Since it's mostly for display, while the authoritative data is stored in the on-disk repository, I don't think it matters!

Done in ?#156


Syntax error for attribute in front of statement

While looking at #2021 I noticed that the verilog standard allows attributes in more places than yosys currently accepts, such as e.g. in front of any statement (including the null statement).
module test ();
	localparam y = 1;
	always @(*)
		if (y) (* foo *) ;
endmodule

1. Executing Verilog-2005 frontend: stmt.v
Parsing Verilog input from `stmt.v' to AST representation.
stmt.v:4: ERROR: syntax error, unexpected ';'

As attributes have no defined meaning, we should accept and ignore any unknown attribute in any of the allowed locations.

Once this is fixed I think the Verilog backend should be fixed to emit attributes on individual case branches such that they apply to the statement(s) inside the case branch; currently it emits a comment instead. This is only really used for the src attribute.


fix(deploy): Add a component prefix to manifests

Parallelism at the CVO level depends on having a consistent prefix
of the form 0000_NN_COMPONENT_* - give that to OLM manifests.
OLM will now be installed in parallel with other components in
run level 50.

/assign @ecordell

We'll add a follow up for make release later.
/retest
/lgtm

/retest


"deny" caveats vs "success caveats"

an idea that could be added with the syntax change in #60: we currently have "success caveats", ie if one of the queries of the caveat produces something, the caveat succeeds.
We could have another kind of caveats where if the query succeeds, the caveat fails. It could represent easily the concept of "deny if " without having to implement negation in Datalog.
So if we had a caveat with query1 and query3 of "success" kind, and query2 of "deny" kind, we could write something like (syntax not defined yet):
check {
  allow if query1
  deny if query2
  allow if query3
}

The way multiple queries are handled in on caveat is that if one of them succeeds, we stop there and consider the caveat successful so it maps well to that kind of allow/deny rule that stops early:

an allow rule that matches makes the caveat succeed
a deny rule that matches makes the caveat fail

this would require a format change, to mark a caveat's rule as "deny"

this would require a format change, to mark a caveat's rule as "deny"

After more discussions, here is the design I arrived at:

renaming "caveats" to "checks": the meaning of caveats is not obvious, while check is largely used. In a checklist, all items must be validated, which corresponds to the meaning we want for caveats here
"allow" and "deny" are tested one by one, and the first that matches stops the validation. If an "allow" policy succeeds, we accept the request, if a "deny" policy succeeds, we fail the request
"allow" and "deny" policies can only be added on the verifier side, not in tokens. They are meant for an easier way to represent authorization policies, while checks in tokens are there to restrict the cases in which an authorization policy would apply
all checks must be validated before we test "allow" and "deny" policies (an "allow" policy matching will not prevent checks from being tested)

After more discussions, here is the design I arrived at:

renaming "caveats" to "checks": the meaning of caveats is not obvious, while check is largely used. In a checklist, all items must be validated, which corresponds to the meaning we want for caveats here
"allow" and "deny" are tested one by one, and the first that matches stops the validation. If an "allow" policy succeeds, we accept the request, if a "deny" policy succeeds, we fail the request
"allow" and "deny" policies can only be added on the verifier side, not in tokens. They are meant for an easier way to represent authorization policies, while checks in tokens are there to restrict the cases in which an authorization policy would apply
all checks must be validated before we test "allow" and "deny" policies (an "allow" policy matching will not prevent checks from being tested)

It would change the syntax as follows:
Caveats would be rewritten from:
caveat1() <- operation(#ambient, #read)

to
check if operation(#ambient, #read)

For caveats with multiple rules:
check if {
   operation(#ambient, #read)
   or operation(#ambient, #write)
}

In the same way, "allow"/"deny"policies would be written as "allow if"/"deny if":
allow if user(#authority, $user_id), role(#authority, $user_id, #admin).
deny if user(#authority, #user_1234).
allow if {
  user(#authority, $user_id), owner(#authority, $user_id, $resource), resource(#ambient, $resource)
  or
  user(#authority, $user_id), member(#authority, $user_id, $group_id), group_owner(#authority, $group_id, $resource), resource(#ambient, $resource)
}

I'm not yet fixed about the . to end lines, and the or to separate rules inside a check. I think check if, allow if, deny if and or could be in caps.
One of the goals would be the ability to write all of those in one file so that policies are easy to edit and review.

It would change the syntax as follows:
Caveats would be rewritten from:
caveat1() <- operation(#ambient, #read)

to
check if operation(#ambient, #read)

For caveats with multiple rules:
check if {
   operation(#ambient, #read)
   or operation(#ambient, #write)
}

In the same way, "allow"/"deny"policies would be written as "allow if"/"deny if":
allow if user(#authority, $user_id), role(#authority, $user_id, #admin).
deny if user(#authority, #user_1234).
allow if {
  user(#authority, $user_id), owner(#authority, $user_id, $resource), resource(#ambient, $resource)
  or
  user(#authority, $user_id), member(#authority, $user_id, $group_id), group_owner(#authority, $group_id, $resource), resource(#ambient, $resource)
}

I'm not yet fixed about the . to end lines, and the or to separate rules inside a check. I think check if, allow if, deny if and or could be in caps.
One of the goals would be the ability to write all of those in one file so that policies are easy to edit and review.


Clean up apt package cache before upgrade

This might prevent some apt issues arising due to shortage of space.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/approve


[Feat] fix the login page

Description
the current login page is not adequate as its having readbility issues and thiss will effect the potential customers.
Assign me this issue,
Screenshots

Checklist

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[X] I'm a GSSoC'24-Extd contributor
[X] I am willing to work on this issue (optional)

hey @AE-Hertz, set your screen size to 100% and then check again. It looks good and nice. I am closing the issue for now. Please raise another issue, which I am happy to assign to you, but make sure the issue is valid and addresses something important on our website. Otherwise, invalid issues will be closed. Thank you!

hey @AE-Hertz, set your screen size to 100% and then check again. It looks good and nice. I am closing the issue for now. Please raise another issue, which I am happy to assign to you, but make sure the issue is valid and addresses something important on our website. Otherwise, invalid issues will be closed. Thank you!

i think i didnot explained it properly, i was talking about the text which is not visible and can causing readability issues, if its happening with me only, than my bad.

@AE-Hertz, check out the screenshot below for proof that it looks good and is easy to read on our side. By the way, thank you for raising the issue.

@AE-Hertz, check out the screenshot below for proof that it looks good and is easy to read on our side. By the way, thank you for raising the issue.

ohh, nice . good to see its working properly. :}
closing this issue, and if their is anything i can implement please let me know


Feature runtime serialize

What current issue(s) from Github does this address?

https://github.com/CityOfZion/neo-python/issues/328

What problem does this PR solve?

adds support for Neo.Runtime.Serialize/Deserialize

How did you solve this problem?

added interop methods

How did you make sure your solution works?

added tests

Are there any special changes in the code that we should be aware of?

no

Is there anything else we should know?

this is a very powerful feature!

Coverage increased (+0.005%) to 93.386% when pulling 42ebbb0e380a834537afb3ea807e46f3261825d4 on feature-runtime-serialize into 10eecd2912c034a7812f85290275242bd8e617f0 on development.


added back to top button and fixed the title of the feedback page

Description
added the back to top button and fixed the title of the feedback page
Fixes #370
Fixes #371

Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings

ATTACH SCREEN-SHOTS / DEPLOYMENT LINK

@sk66641 please review this pull request


Can you support php 5.5+

In your httpCurl class, post function.
[ErrorException]
curl_setopt(): The usage of the @filename API for file uploading is deprecated. Please use the CURLFile class instead
I am trying the dev_master branch.
thanks!

    ///*
    //update by Alex for php 5.5+
    //var_dump ($fields);
    curl_setopt($cl, CURLOPT_SAFE_UPLOAD, FALSE);
    if ( isset($fields['media']) ) {
        $tmpFile = str_replace("@","",$fields['media']);
        $fields = array('media' => new \CURLFile($tmpFile));
    }
    //*/

Thanks, I have fixed it in https://github.com/gaoming13/wechat-php-sdk/commit/368ea5b927742c1d52a030c3a742c8663c6550f4


Scala 3 Support

Now that scala 3 is officially live, how difficult would it be to add support for it in bazel?
If it's just a matter of adding a custom toolchain, a bit of documentation would help (I tried to do it in a sample project but couldn't manage)
UPDATE: I initially said I could give a shot on trying to move this forward, but I have to back down. Both the scope of this and the demands of real life ended up being bigger than I thought. But still, support for Scala 3 would still be great!

It may not be trivial, but any help is appreciated!
What I would do:

Create a small (simple Hello World app is ok) Scala 3 project with rules_scala to learn what are the gaps. Such project will force you to learn how to configure scala toolchain with deps providers for Scala 3 libs (you can use Rules JVM External to manage deps.
Make rules_scala compatible with Scala 3. Keep in mind that we still have 2.11 users, so we need to stay compatible with old versions. This part is the most complex, it includes such complicated parts like dependency analyzer.
Add third party deps to repositories configs. This step can be a blocker for some parts of Rules Scala if there are no Scala 3 support yet for some of the dep.
Add version tests, CI config

Let me know if you get stuck or need help on any of the steps.

I started looking into this and I got it to the point where I can at least compile & run a hello world https://github.com/cocreature/rules_scala/tree/scala-3. The next big missing piece is probably the dependency analyzer. I’m also largely ignoring backwards compatibility for now since I first want to get it to work before I worry about that too much. The compiler API is completely different so some parts will just consist of duplicating the code.
Happy to share the work, the time I can spend on this atm is relatively limited.

@cocreature would you be still interested contributing your work? I experimented on your changes, you can see how to make them Scala 2.x compatible: https://github.com/liucijus/rules_scala/tree/scala3-in-progress

Unfortunately I got stuck trying to port the custom scala code for the unused deps & similar to Scala 3 so while it worked for a hello world, I couldn’t actually get it to work on our full project. I don’t expect keeping compatbiility with Scala 2 at the end will be the challenging part.
I don’t have the time at the moment to debug this further so if someone else wants to pick it up, by all means go for it. If not, I expect I’ll eventually get back to it but no idea about timelines.

@cocreature I'm planning to work on Scala 3 support, and got it working to some extent based on your changes though I had to do some modifications to select code based on Scala version. I thought it would be great to get you attributed for your initial development (ScalaWorker, Scala 3 deps, etc). Of course I can just start from scratch and open PR myself as I did in my fork. But it's up to you to decide. The only requirement is to make the Scala 2 compatible, Scala 3 code can be untested, I will take over from there. Let me know what you think.

Appreciate it but I’m perfectly happy to not be acknowledged here so just go ahead and open a PR yourself.

Reopening as it was closed unintentionally

I'd be glad to help with this issue.
I just opened #1408 for an issue I was facing with Scala3.

Has anyone created an inventory of what needs to be completed to declare victory on Scala3 compatibility? Are there Scala3 features that are not supported, yet?

I imagine at the very least, we'd want to be able to compile code and add CI to ensure that something using Scala 3 LTS (currently 3.3.4) can compile safely. And, there is some interplay between Scala 3 and 2.13 libraries for compatibility reasons, so we'll want to ensure that anything compiled using those flags doesn't break. Most adopters will be straddling for a while.
Though, now that I've said that, it looks like that's what test_crossbuild does.
Should one of us go through the list of open issues tagged with Scala 3 as a start?

I just checked. There are no open issues tagged with scala3. I did find two other issues besides this one that mention Scala3.
I pinged this thread, because I saw a scala3 example in the repo and I saw this open issue. I am mostly trying to understand what we think is missing. If anyone is using this ruleset with scala3 code, I would love to hear about it.

I'd say that Scala native is nice to have, not a requirement for Scala3 compatibility of this rule set.
It's worth seeing if that cats issue is still occurring.


Anki 2.1.40

Checklist

[x] Checked the nixpkgs master branch

[x] Checked the nixpkgs pull requests

Project name
nix search name: anki

current version: 2.1.15
desired version: 2.1.40
Notify maintainers

maintainers: @oxij @Profpatsch
Note for maintainers
Please tag this issue in your PR.

Thank you for bringing this to our collective attention! First I thought that this would be a trivial version bump, but it's not so simple as the patches no longer apply. For instance, the file aqt/anki.py no longer exists. For the moment I'm pausing my work on this issue.

I take that back, I was confused by a simple directory reorganization. Pull request fixing this issue is underway. :-)

What about the anki-bin package, version 2.1.44: https://github.com/NixOS/nixpkgs/blob/nixos-21.05/pkgs/games/anki/bin.nix
Maybe it is possible to merge this with anki even if it is a dependency.

Duplicate of https://github.com/NixOS/nixpkgs/issues/78449.


Update copy button to say copy and save resume state

Resolved by:
https://github.com/ryanAllMad/js-job-helper/commit/c1003567b9c62b9a58a7468b0a600d7666900fd0


Automatically run the network-verifier after running the CPD utility

Running the egress network-verifier is the next step after running the
Cluster Provisioning Delay subcommand, so we may as well have it run
automatically as part of the CPD subcommand.

/hold
This is somewhat taken care of by #297, which doesn't automatically run the network verifier, but does automatically select the subnet-id/security-group-id for you give a cluster-id.
I think the main problem with this current PR is that it doesn't select a security-group-id.

/hold This is somewhat taken care of by #297, which doesn't automatically run the network verifier, but does automatically select the subnet-id/security-group-id for you give a cluster-id.
I think the main problem with this current PR is that it doesn't select a security-group-id.

I've included another to select a security group ID for the network verifier (shamelessly stolen from inspired by your changes to osdctl network verify-egress)

/unhold
/lgtm
It would be nice if we could've just called https://github.com/openshift/osdctl/blob/master/cmd/network/verification.go#L100 to not duplicate logic, but we can iterate

This has been chilling for a bit so I did do:

It would be nice if we could've just called https://github.com/openshift/osdctl/blob/master/cmd/network/verification.go#L100 to not duplicate logic, but we can iterate

in #330

/close


Update Layouting Library

Please describe the task that needs to be done
We are currently depending on Dagre, and need to switch to a non-deprecated library for layouting and auto-layout choice.

implemented with https://github.com/KaotoIO/kaoto-ui/pull/951


Markoff cannot open files in the "Plain Text" format

To be honest, I just find this kind of amusing!

¯\_(ツ)_/¯
Any files with the extension .txt are greyed-out in the file chooser, and I got this error using open -a Markoff foo.txt.

+1, would be good fix.

Quick fix is in #20 and will allow attempting to open any arbitrary filetype.

@sharplet What would you expect when opening a .txt file? Be treated as if it was a Markdown file?

Yes, more or less. I find it doesn't matter if it's not actually a markdown file and produces strange markup. It's helpful to have the flexibility to preview any plain text file.

Lots of markdown files have other extensions, e.g., chained through other processors. For example my file.html.md.erb is a typical static site generator markdown file.

@balthisar I have concerns about allowing any extension though. Will force us to handle errors and whatnot and it's not user-friendly when all files can be opened but only few will yield results.

I could help take a look at this. As-is if I (for example) try to drag an image while allowing any file, it shows an appropriate warning (unable to parse the file).
To be more fancy you could tweak the CFBundleDocumentTypes entry to allow other extensions (pretty much any text extension might be acceptable; plain text is valid markdown for the most part).
I notice right now the existing entry uses CFBundleTypeOSTypes which is, while not officially deprecated, not all that useful for modern text files, especially in that it's allowing ????. Types and creators have been deprecated since 10.6 and are no longer even considered on the current deployment target.
The "modern" replacement is LSItemContentTypes which uses UTI's instead of type-creator codes.
Then it's a decision on which UTI's to support. Using public.txt should be almost automatic. There's still the problem of the markdown engine trying to parse non-markdown, but again, that's not a bad thing. Most plain text will render just fine. Some of the other system defined UTIs might be candidates, too.
John Gruber has even indicated a preferred UTI for Markdown (UTIs aren't limited to Apple's system UTIs).

net.daringfireball.markdown, which conforms to public.plain-text. The encoding should always be UTF-8.

So there's good support for arguing public.plain-text in addition to public.txt that I mentioned.

+1 The files in which I use markdown syntax are often .txt. For my (and I imagine many people's) workflows it makes the most sense to keep plain text in txt format and then let the context in which it's being used dictate how it should be rendered. (now I'm wondering why I use any extension at all...)
The whole advantage of markdown is that I can use its syntax in non-fancy plain text files without any special handling and the syntax itself communicates the markup's intention - the markdown processors I look at them with are just a luxury.

I also hit this problem when trying to open Markdown files from Jekyll that I save as .md.erb because I process some dynamic snippets within the file.

@nickdunn Have you opened up those .md.erb files in any other markdown previewer? Like Mou or something?

Yes, they are just markdown (with a tiny bit of embedded ruby) but saved as .erb.

How do the Ruby code and erb tags look in the markdown? Like like plain
text? I don't have any similar files handy to look at myself but I'd assume
there would be some weirdness with the erb code not being fenced or
back-ticked and the characters being used by the markdown processor
erroneously.
On Fri, Mar 11, 2016 at 9:49 AM Nick Dunn<EMAIL_ADDRESS>wrote:

Yes, they are just markdown (with a tiny bit of embedded ruby) but saved
as .erb.
—
Reply to this email directly or view it on GitHub
https://github.com/thoughtbot/Markoff/issues/4#issuecomment-195397032.

--
Vinney Cavallo http://vinneycavallo.com/

Something simply like:
Here is a paragraph.

<% code('js') do %>
Here is some JavaScript
<% end %>

Here is another paragraph.

Markoff renders the ERB as plain text as expected in this example. I'm not expecting Markoff to deal with this gracefully, but I'd like to be able to view the file as-is while editing the plain text parts.

I absolutely agree. Sorry for the tangent :)
On Fri, Mar 11, 2016 at 9:55 AM Nick Dunn<EMAIL_ADDRESS>wrote:

Something simply like:
Here is a paragraph.
<% code('js') do %>
Here is some JavaScript
<% end %>
Here is another paragraph.
Markoff renders the ERB as plain text as expected in this example. I'm not
expecting Markoff to deal with this gracefully, but I'd like to be able to
view the file as-is while editing the plain text parts.
—
Reply to this email directly or view it on GitHub
https://github.com/thoughtbot/Markoff/issues/4#issuecomment-195399995.

--
Vinney Cavallo http://vinneycavallo.com/

:)


GET /{donorID}/aidPackages invalid received amounts

Is your feature request related to a problem? Please describe.
GET /{donorID}/aidPackages is sending invalid received amounts.
This is how the same package data in two different endpoints:
GET /{donorID}/aidPackages

GET /{donorID}/aidPackages

@AmilaJ @anupama-pathirage Could you please look into this?


Last_Modified_Date - can it be based on last git commit for that page?

We are using your theme as a remote theme for a documentation site at a research institution (https://sciwiki.fredhutch.org/).  We have used the last modified date to show when a page was updated so readers know how current the info is.  BUT we'd much rather it be not manual but rather based on the date of the last git commit on that file.
I can't quite figure out if there already is a variable/plugin to make this work along with your theme.  Are you aware of a way to do this?
Thanks (for both any guidance and also for a great theme)!

Unfortunately the theme can't help with regards to this. You'll need some sort of tooling that automatically updates last_modified_at for you in your Markdown files.
There's a Jekyll plugin that may help you but it hasn't been updated in years and almost certainly doesn't work with GitHub Pages hosted sites.
https://github.com/gjtorikian/jekyll-last-modified-at
Closing as this isn't a theme concern. You may find some suggestions from other users on the Jekyll Talk forum if you ask.

Thanks.  I did look into that plugin but you're right, it doesn't work in the modern day. ;)  Worth a shot!

Thanks. I did look into that plugin but you're right, it doesn't work in the modern day. ;) Worth a shot!

Have you seen this?
https://mademistakes.com/notes/adding-last-modified-timestamps-with-git/


Description for octobors project disappears

This is quite odd, the description for the octobors project is not visible neither on Firefox or Chrome:

It is defined in https://github.com/EmbarkStudios/opensource-website/blob/main/static/data/data.json, and even more odd: if you refresh the browser you will briefly see it until it disappears!
There are some other oddities with the site just after refresh also

Hi,
that's a good catch.
Currently the site works as following.
When building the static site while deploying zola takes the data from the data.json file you linked and inserts values like the project description for the cards in your screenshot.
To get the current values for github stars, issues count and project description JavaScript code will fetch this data from the GitHub API and insert the values if given.
Now in the case of octobors there is a description in the data.json file and thats why you see the description briefly when you load the site.
The GitHub API returns null for the octobors description so the JavaScript code will update the description with an empty one.
Thats unwanted behaviour tho.
You can see my updates in the linked PR #110  where I disabled updating the project description if the GitHub API returns null for it.
Maybe this explanation of how the site's content gets updated relating to the GitHub API response also shines some light on the other oddities you recognized or did you also observe some other weird behaviour?
We can think about not updating the description via JavaScript at all and keeping the static descriptions that are written in the data.json file.


~/Library/Preferences should not be used on macOS

please complete the following information:

OS version:	macOS 11.3
Editor:	vscode
Editor version:	1.55.2
TabNine extension version: 3.4.1
Engine version (could be located within Tabnine Hub): 3.3.108

Issue Details:
This is not really an issue, but I'd like to bring it up in hope of a change. Pardon me if there's any duplicate, since this title not easy to check.
About the title, this has been discussed in other places, like dirs-dev/directories-rs#62.
The basic idea is that this folder should only be interacted via macOS's native API, otherwise apps should use ~/Library/Application Support.
I'm aware that TabNine data is already stored in ~/Library/Application Support, but perhaps it can coexist with preferences (since most likely you are using a library to handle this), or ~/.config (XDG_CONFIG_HOME) could also be used as it's common for developer tools on macOS.

There are two other questions about TabNine that I don't feel like opening separate issues for them:

I noticed in recent VSCode extension updates, location of TabNine binaries has been moved to VSCode's global storage (<VSCode data directory>/User/globalStorage/tabnine.tabnine-vscode/binaries) from the extension directory (<VSCode extension directory>/binaries).
This is a welcoming change, but does this mean the VSCode extension will start to clean up old versions of binaries? Before the change, they would stack up in the extension directory, but it's not a problem since VSCode will clean old versions of extensions.
Obsolete lock files are stacking up in preferences directory. This won't cause any space shortage, but it would be good if they would also be cleaned up.
(However there maybe different versions of TabNine running across different editors/extensions, which may cause implementation issues for cleaning. If this is the case then it's fine!)$ ls ~/Library/Preferences/TabNine
3.3.101  3.3.103  3.3.104  3.3.108  cloud.settings  last_heartbeat  local.settings  tabnine_config.json  TabNineExample.toml

That's all, thanks for you amazing work on TabNine. 😃

Regarding the general issue, thank you for bringing it to our attention, we will look into it.
Regarding the 1st point, we've implemented a delete mechanism for old versions a while ago, so it will only ever keep the last 3 versions of Tabnine locally.
Regarding the 2nd point, you are right, we need to make sure old lock files are removed as well.

Thanks for your reply! Feel free to close the issue when you find it appropriate.


Bump versions

@ftomassetti
After a lot of nuisances with e.g. github tags being incorrect docker tags etc. I now have a script that does the following interactively using changesets:

Ask which packages to  include (answer by SPACE-RETURN for all packages)
Ask which packages get a major version bump

SPACE-RETURN will result in a major version bump
RETURN will ask a new question which packages get a minor version bump

SPACE-RETURN will get a minor version bump
RETURN will get a new patch version

A short description.

Don’t leave this empty, it requires some text. The text ends up in a CHANGELOG.md file (per package) cumulatively for each version. I have not yet checked in this file, but we can do that

Question whether this all is ok:

ENTER (is yes)

The script then automatically:

updates the versions of all packages, and also the versions of the internal dependencies between  the packages (both in the package.json).
Creates a tag @lionweb/repository@

(Actually changesets creates tags for each package, but I delete all but the top one)

Commits all changes to the package.json files and the new tag to git
Pushes this commit

On the CI this results in the tag being added to the repository and a docker image to be published on github.
Note that the update of the version numbers is done at release time, just before releasing.

Hi Jos,
This looks very convenient!
Regarding what you wrote in the description, these two parts seem in contradiction:

Ask which packages to include (answer by SPACE-RETURN for all packages)
Ask which packages get a major version bump

and this:

updates the versions of all packages, and also the versions of the internal dependencies between the packages (both in the package.json).

Why ask about which packages to include if later all the packages are updated? Or do you mean all the packages that need to be updated, as they were selected at the previous step?
I think that it would be simpler to always update the version of all packages, even if just one of them changed. Otherwise, the different packages could progress independently and we could end up having different versions for each package. As a user, I would then need to figure out which versions of which packages work together

All packages will be bumped together as described in the config.json.

It seems a great addition to the project! I just added comments about convenience, but my understanding of changeset is limited and I tend to think in the terms of the equivalent gradle plugin, so I may be wrong on some comments

changesets can do much more, like e.g. publishing and automatically creating release notes.  The nice thing about it is that you can do most steps separately, and I used only a small part of what is available.


Feature request: Decouple using managed identity from updating sql network settings

I am trying to apply migrations from a self hosted runner. The runner has network access to the sql server via private endpoint and does not need any new network openings. The SQL server denies public access.
It seems as the sql-action is hard coded to attempt adding network rules if azure/login is found
(...)
  deployToDev:
    needs: [buildandtest]
    runs-on: [self-hosted, my-runner] # Deployment must happen through a self-hosted agent with network access.
    environment: "dev"
    permissions:
      id-token: write
      contents: read
      packages: read
    steps:
      #Run migrations

      - uses: azure/login@v1
        with:
          client-id: ${{ vars.AZURE_SQL_CLIENT_ID }}
          tenant-id: ${{ vars.TENANT_ID }}
          subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}

      - name: "Download migrations script"
        uses: actions/download-artifact@v3
        with:
          name: "migrations"
          path: "./SQLScripts"

      - name: Run migrations script
        uses: azure/sql-action@v2
        with:
          connection-string: "Server=xxxxl;Initial Catalog=yyyyy;Authentication=Active Directory Default; Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
          path: "./SQLScripts/migrations.sql"

I end up with a
The client 'zzzzzzzz' with object id 'zzzzzzzzzzzzzzzz' does not have authorization to perform action 'Microsoft.Sql/servers/firewallRules/write' over scope (..)

I would like there to be an input var to skip this step entirely, as I have no interest in ad-hoc openings towards the sql server.
I also tried not granting the managed identity access to any subscriptions, setting this
      - uses: azure/login@v1
        with:
          client-id: ${{ vars.AZURE_SQL_CLIENT_ID }}
          tenant-id: ${{ vars.TENANT_ID }}
          allow-no-subscriptions: true

this however failed with this error:
Error: The subscription 'MY-TENANT-ID could not be found.
Error: {"statusCode":404,"message":"The subscription 'MY-TENANT-ID' could not be found.","code":"SubscriptionNotFound"}

This is definitely unexpected. Any changes to Azure resource state should be explicitly opt-in rather than implicit as a result of some earlier run action.

bump.

The action attempts to add a firewall rule if it cannot login to the SQL instance.  It first tries the master db, then the user db from the connection string.
https://github.com/Azure/sql-action/blob/master/src/SqlUtils.ts#L26
You may get more insights to the initial login failures with debug logging enabled: https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging

The action attempts to add a firewall rule if it cannot login to the SQL instance

It appears this is not functioning correctly though - in my build I can successfully deploy the database (as a managed identity) but I still get the warning about the firewall.
I'd like to be able to opt out of the firewall behaviour altogether (per https://github.com/Azure/sql-action/issues/205#issuecomment-2117904521) - I don't like that the action silently attempts to change a security-sensitive azure config with no way to opt out


Unable to upload files to the server on certain browsers

The method MultipartFile#getOriginalFilename is used to name an uploaded file on the server. The problem is that the method is acting differently depending on which browser is being used. This is what the method documentation says: "This may contain path information depending on the browser used, but it typically will not with any other than Opera.".
Instead of using the original name, Castle Mock should use a temporary file name.

This issue has been resolved and will be part of the 1.19 release.


New version: JetBrains.DataSpell version 2023.3.4

[ ] Have you signed the Contributor License Agreement?
[ ] Have you checked that there aren't other open pull requests for the same manifest update/change?
[ ] This PR only modifies one (1) manifest
[ ] Have you validated your manifest locally with winget validate --manifest <path>?
[ ] Have you tested your manifest locally with winget install --manifest <path>?
[ ] Does your manifest conform to the 1.6 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

Hi @PckgrBot,
Are these significant?

=== manifests\j\JetBrains\DataSpell\2023.3.4 ===
Missing Properties value based on version 2023.3:
CopyrightUrl
Scope
InstallModes

Close with reason: Duplicate of #140224;


Incompatibility with Lingo plugin

Looks like Plugin Monster is causing issues with https://www.lingoapp.com.
Screencap:
https://www.dropbox.com/s/tfxhnaib4i64w10/Lingo %26 plugin monster.mov?dl=0

Hey man, I have try to reproduce this issue according to your video(Plugin Monster V0.31 and LingoV3.3.2), and no problem occurred. I guess it's caused by the Lingo's beta version. Suggest you upgrade this APP to the latest version.  : )

Yep it works now.


restic: 0.12.1 -> 0.13.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/restic/versions.
meta.description for restic is: "A backup program that is fast, efficient and secure"
meta.homepage for restic is: "https://restic.net"
meta.changelog for restic is: ""
Updates performed

Golang update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
Warning: no invocation of /nix/store/i1qm2072l09apw6ha8gpj0fg41rk7w5m-restic-0.13.0/bin/restic had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/i1qm2072l09apw6ha8gpj0fg41rk7w5m-restic-0.13.0/bin/.restic-wrapped had a zero exit code or showed the expected version
0 of 2 passed binary check by having a zero exit code.
0 of 2 passed binary check by having the new version present in output.
found 0.13.0 with grep in /nix/store/i1qm2072l09apw6ha8gpj0fg41rk7w5m-restic-0.13.0
found 0.13.0 in filename of file in /nix/store/i1qm2072l09apw6ha8gpj0fg41rk7w5m-restic-0.13.0

Rebuild report (if merged into master) (click to expand)

3 total rebuild path(s)

2 package rebuild(s)

2 x86_64-linux rebuild(s)
1 x86_64-darwin rebuild(s)

First fifty rebuilds by attrpath
restic
restique

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/i1qm2072l09apw6ha8gpj0fg41rk7w5m-restic-0.13.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A restic https://github.com/r-ryantm/nixpkgs/archive/f31038ab7f728ca3de54cbc1966aaaa8283f24cd.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/i1qm2072l09apw6ha8gpj0fg41rk7w5m-restic-0.13.0
ls -la /nix/store/i1qm2072l09apw6ha8gpj0fg41rk7w5m-restic-0.13.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages built:

restic
restique

Maintainer pings
cc @mbrgm @kalbasit for testing.

@bachp @mbrgm @kalbasit  restic 0.13.1 has been released for over a month. how is this automatic update working?

@r-ryantm  too


Getting the right bits

Hey Folks.  How can one get the correct IML bits to deploy Lustre running on CentOS 6.9?  If CentOS 6.9 is not possible within this project, what would be the steps to download the IML bits to deploy another specific version of CentOS?  Thanks!

Thanks Joe!  I'll certainly give it a try when deploying a RHEL 7.5 instance.
Hey, what's the best way to determine which RHEL release(s) is supported by which IML release?


Need definitive example of audit policy use

This is a Feature Request

What would you like to be added

In the "Audit Policy" section on this page:
https://kubernetes.io/docs/tasks/debug-application-cluster/audit/
...there needs to be an explicit example of how to implement the audit policy.  In other words, there should be an example showing how to pass the file to correctly create a policy.
Why is this needed
If the user simply copies the file "audit/audit-policy.yaml" to a file and then tries to pass it to a create, you get the following error:
$ kubectl create -f ./audit.yaml
error: unable to recognize "./audit.yaml": no matches for kind "Policy" in version "audit.k8s.io/v1"

This does not appear to be a functionality bug, but rather an error in proper use.  Therefore, the documentation should spell out exactly how this policy file should be used.
Comments

i am also facing it

/priority backlog


WIP: Add getSnapshotBeforeUpdate lifecycle hook

[x] Add getSnapshotBeforeUpdate tests
[ ] Port unit tests from react
[ ] Add unit tests

Coverage remained the same at 100.0% when pulling bd86a23dc8f8981945bc83f93c60012a17e84f81 on marvinhagemeister:snapshot_lifecycle into b4d7aeefed67bd015c24fd769a2803104fe7c4a6 on developit:master.

This PR is now ready to review 🎉


A parameter cannot be found that matches parameter name "automationAccountName".

Hi!
When I try to run your scripts with already declared variables, it gives me following error:

Have any ideas what I could be doing wrong?

Hi @Joao-Ribeiroo - without knowing what the script "createazureautomationaccount.ps1" looks like it will be hard to help you troubleshoot. It appears that the parameter you passed in doesn't quite line up with what the script is expecting.


hspec-golden-aeson <IP_ADDRESS>

hspec-golden-aeson-<IP_ADDRESS> (James M.C. Haver II<EMAIL_ADDRESS>@mchaver) is out of bounds for:

[ ] wai-middleware-rollbar-0.6.0 (>=0.2 && < 0.4). Hardy Jones<EMAIL_ADDRESS>@joneshf. @joneshf. Used by: test-suite

Rather than constrain hspec-golden-aeson, I'm going to add wai-middlewarew-rollbar to the skipped-tests section.

Thanks for the heads up!
Relaxed upper bound in <IP_ADDRESS>: https://github.com/joneshf/wai-middleware-rollbar/compare/<IP_ADDRESS>^^...<IP_ADDRESS>.
CI passed with hspec-golden-aeson-<IP_ADDRESS>: https://travis-ci.org/joneshf/wai-middleware-rollbar/jobs/314236406#L644
Should be fine to run tests after it uploads to stackage.

Awesome, thanks!


Make install step fails

Hello
I ran into 2 issues when running make

1st issue

Error:
   0: "/xxx/foundry-starter-kit/lib/chainlink-brownie-contracts/src/v0.8/ChainlinkClient.sol": No such file or directory (os error 2)

Which can be solved by completing the install step in Makefile . It Shoud be:
install :; forge install dapphub/ds-test && forge install rari-capital/solmate && forge install brockelmore/forge-std && forge install ZeframLou/clones-with-immutable-args && forge install smartcontractkit/chainlink-brownie-contracts

2nd issue: Also, the dappbuild step failed with this error

ParserError: Source "ds-test/test.sol" not found: File not found.
 --> src/test/APIConsumer.t.sol:7:1:
  |
7 | import "ds-test/test.sol";

A remapping has to be added to the remappings.txt file

Thank you!!


feat: log all database changes

Fixes Issue
Closes #7660
Changes proposed

Check List (Check all the applicable boxes)

[ ] My code follows the code style of this project.
[ ] My change requires changes to the documentation.
[ ] I have updated the documentation accordingly.
[ ] All new and existing tests passed.
[ ] This PR does not contain plagiarized content.
[x] The title of my pull request is a short description of the requested changes.

Screenshots

Note to reviewers

It is looking really good 👍
Is it possible to have a field in the model to show the diff for easier viewing?

Is it possible to have a field in the model to show the diff for easier viewing?

Just the difference between the changesBefore and changesAfter!? I'll look into that ✌🏾

Is it possible to have a field in the model to show the diff for easier viewing?

Just the difference between the changesBefore and changesAfter!? I'll look into that ✌🏾

That would be great! I think something like...
BEFORE
// ...
bio: "aaaa"
// ...

AFTER
// ...
bio: "bbbb"
// ...

DIFF (new field)
// ...
bio: "bbbb"
// ...

I think so only the changes fields with their new values are stored in the new diff property

Exactly what I had in mind @eddiejaoude , so here's what I've got...
I tried 3 options... 1 failed❌, 1 tried❔ , 1 worked✅!
I will start with the one that worked with its caveat and I want your confirmation before I commit this!
Option 1 - Implementation Using lodash ✅
if (isUpdateOperation) {
  const { _doc, ...docDiffs } = _.omitBy(changesAfter, (value, key) => _.isEqual(value, changesBefore[key]));
  diff = docDiffs;
} else {
  diff = doc;
}

I was able to compute my differences using the omitBy() function to remove all properties in changeAfter that are equal to properties in changeBefore (using the isEqual() function)
I realise that was a return of the original document copy too in a _doc property with the differences, so I exclude '_doc' property and spread other differences properties into a new object docDiffs which I inturn assigned as value for our all new diff Changelog model property
It is important to state the differences detection operation will only run when isUpdateOperation because changeBefore at this point will be null so we return the doc as value for diff.

Result - Desired ✅
username: "babblebey"
collectionName: "links"
collectionId: "64d385107a9cd8bca6a08bbe"
changesBefore: {
   ...
  "name": "HRMOffice Website",
  "url": "https://hrmoffice.org",
  "icon": "FaFacebook",
  "isEnabled": true,
  "isPinned": true,
  ...
}
changesAfter: {
  ...
  "name": "HRMOfficE",
  "url": "https://hrmoffice.org",
  "icon": "FaGithub",
  "isEnabled": false,
  "isPinned": false,
  ...
}
diff: {
  "name": "HRMOfficE",
  "icon": "FaGithub",
  "isEnabled": false,
  "isPinned": false,
  "updatedAt": "2023-08-15T19:03:41.750Z"
}

Caveat: This implementation requires adding a new package lodash to the project.

Option 2 - Implementation with custom getChangesDiff function ❔
function getChangesDiff(chngB, chngA) {
  const diff = {};
  for (const key in chngA) {
    if (chngB[key] !== chngA[key]) {
      diff[key] = chngA[key];
    }
  }
  return diff;
}

// Usage
if (isUpdateOperation) {
  diff = getChangesDiff(changesBefore._doc, changesAfter._doc);
} else {
  diff = doc;
}

I implemented the function that pretty much work the same, it add properties from changeAfter that are not equal to (i.e. not with same value) properties in changeBefore to a new object diff.
Now, I had to use the ._doc property I weirdly founding output as pointer to access the document within the changesBefore/After.

Result - Not Exactly❔
username: "babblebey"
collectionName: "links"
collectionId: "64d385107a9cd8bca6a08bbe"
changesBefore: {
   ...
  "name": "HRMOffice Website",
  "url": "https://hrmoffice.org",
  "icon": "FaFacebook",
  "isEnabled": true,
  "isPinned": true,
  ...
}
changesAfter: {
  ...
  "name": "HRMOfficE",
  "url": "https://hrmoffice.org",
  "icon": "FaGithub",
  "isEnabled": false,
  "isPinned": false,
  ...
}
diff: {
  "_id": "64d385107a9cd8bca6a08bbe", // ?? Unwanted !!
  "name": "HRMOfficE",
  "icon": "FaGithub",
  "isEnabled": false,
  "isPinned": false,
  "profile": "64ce7e0146acee92873d99ee", // ?? Unwanted !!
  "createdAt": "2023-08-09T12:22:40.424Z", // ?? Unwanted !!
  "updatedAt": "2023-08-15T19:03:41.750Z"
}

The diff property object continues to come with the _id, profile and createdAt properties no matter what property is updated in the Link model for example, It does the same thing for the Profile model, there are some properties that just comes with the model.

Note: I would've really preferred this option, because it would've been more lightweight. I assume the undesired output to be a result of some edge cases with in getChangesDiff func implementation, that maybe I just need to figure out.

Option 3 - Implementation using the mongoose getUpdate() function ❌
diff = isUpdateOperation ? (this.getUpdate()).$set : this;

Pretty straightforward write in attempt to compute the difference by picking out the value from the $set property used in the update action conditions.

Result - Undesired ❌
username: "babblebey"
collectionName: "links"
collectionId: "64d385107a9cd8bca6a08bbe"
changesBefore: {
   ...
  "name": "HRMOffice Website",
  "url": "https://hrmoffice.org",
  "icon": "FaFacebook",
  "isEnabled": true,
  "isPinned": true,
  ...
}
changesAfter: {
  ...
  "name": "HRMOfficE",
  "url": "https://hrmoffice.org",
  "icon": "FaGithub",
  "isEnabled": false,
  "isPinned": false,
  ...
}
diff: {
  "updatedAt": "2023-08-15T19:03:41.750Z",
  "isPinned": false,
  "isEnabled": false,
  "icon": "FaGithub",
  "url": "https://hrmoffice.org",
  "name": "HRMOfficE",
  "group": ""
}

The result pretty much just carries the state of the form fields value at submission, changed or unchanged, I guess as it should.

So No Way for this Implementation!

Wow very well thought out @babblebey 💪 I think we should try to not include lodash, as we are close to the Vercel file limit already.
I think option 2 is a great start, even if it has some extra fields - we can improve this further later in another pull request

Great stuff @eddiejaoude, I found a fix!
Since hearing you subscribed to (my preferred) Option 2, I said I was gonna make it work i.e. make sure it produces our desired result before in this PR, haha I can't procrastinate to another PR to make it work.

...I assume the undesired output to be a result of some edge cases with in getChangesDiff func implementation, that maybe I just need to figure out.

So here's what I've discovered as the Edge Case that the getChangesDiff wasn't addressing.

The changesBefore/After documents are obviously of their mongoDB Document type, hence they maintain their ObjectId and some Maps related thing within them.

 _id: new ObjectId("64d385107a9cd8bca6a08bbe"),
username: 'babblebey',
group: '',
name: 'HRMOffice',
url: 'https://hrmoffice.org',
icon: 'FaFacebook',
isEnabled: true,
isPinned: true,
clicks: 0,
profile: new ObjectId("64ce7e0146acee92873d99ee"),
createdAt: 2023-08-09T12:22:40.424Z,
updatedAt: 2023-08-16T19:55:48.449Z,
__v: 0

Meanwhile, the comparison conditions chngB[key] !== chngA[key] inside the getChangesDiff function is only able to compare the properties of type number, strings and boolean (I guess the primitives), leaving out object i.e. other types like Date, Array, Object etc.

 _id: new ObjectId("64d385107a9cd8bca6a08bbe"),       // Mongo ObjectId type SKIPPED AT CHECK
username: 'babblebey',
group: '',
name: 'HRMOffice',
url: 'https://hrmoffice.org',
icon: 'FaFacebook',
isEnabled: true,
isPinned: true,
clicks: 0,
profile: new ObjectId("64ce7e0146acee92873d99ee"),       //  ObjectId type SKIPPED AT CHECK
createdAt: 2023-08-09T12:22:40.424Z,       // Date Object type SKIPPED AT CHECK
updatedAt: 2023-08-16T19:55:48.449Z,       // Date Object type SKIPPED AT CHECK - THOUGH this should make it into `diff` because it will change
__v: 0

...for this reason the checks for these non-primitive property types are skipped at check, hence making their way back into the diff. There are more types in the Profile model changes doc too, these are normal nested Object and Array object types, they all also skipped checks.
The Fix
function getChangesDiff(chngB, chngA) {
  const diff = {};
  for (const key in chngA) {
    if (JSON.stringify(chngB[key]) !== JSON.stringify(chngA[key])) {
      diff[key] = chngA[key];
    }
  }
  return diff;
}

I implemented a JSON.stringify, the compared value of the changes*** documents, ensuring that they are flatten fairly to JSON string to aid easy comparison.

Haha, JSON object and its methods are stuffs that mongoose uses quite frequently behind the hood to make docs readable, so I assumed that using it on our own side for the getChangesDiff shouldn't really cause a sweat for performance, hence I threw it in considering it got the job done.
Now, we have got a working diff property.
username: "babblebey"
collectionName: "links"
collectionId: "64d385107a9cd8bca6a08bbe"
changesBefore: {
  "_id": "64d385107a9cd8bca6a08bbe",
  "username": "babblebey",
  "group": "",
  "name": "HRMOffice",
  "url": "https://hrmoffice.org",
  "icon": "FaFacebook",
  "isEnabled": false,
  "isPinned": false,
  "clicks": 0,
  "profile": "64ce7e0146acee92873d99ee",
  "createdAt": "2023-08-09T12:22:40.424Z",
  "updatedAt": "2023-08-16T19:33:44.382Z",
  "__v": 0
}
changesAfter: {
  "_id": "64d385107a9cd8bca6a08bbe",
  "username": "babblebey",
  "group": "",
  "name": "HRMOffice",
  "url": "https://hrmoffice.org",
  "icon": "FaFacebook",
  "isEnabled": true,
  "isPinned": true,
  "clicks": 0,
  "profile": "64ce7e0146acee92873d99ee",
  "createdAt": "2023-08-09T12:22:40.424Z",
  "updatedAt": "2023-08-16T19:55:48.449Z",
  "__v": 0
}
diff: {
  "isEnabled": true,
  "isPinned": true,
  "updatedAt": "2023-08-16T19:55:48.449Z"
}

Wow that looks great! Btw there is a build error
error models/Link.js (52:26) @ LinkSchema
error Error [TypeError]: (0 , _dbChangesLogger.default) is not a function
    at eval (webpack-internal:///(api)/./models/Link.js:56:30)

Wow that looks great! Btw there is a build error
error models/Link.js (52:26) @ LinkSchema
error Error [TypeError]: (0 , _dbChangesLogger.default) is not a function
    at eval (webpack-internal:///(api)/./models/Link.js:56:30)

Oh, I noticed this in the Build, I thought to keep till later.
I will work on this now!

I have fixed the Build / build (build) (pull_request) @eddiejaoude with the commits above..
Now, there are 2 failing tests... which can be traced to the routes.

page/search.js - search.spec.js test failed justifies that no user (which accounts for the main li) is getting listed on the search page, though its listed in my local dev but very slow to render.

page/discover.js - discover.spec.js test failed justifies that no user (which accounts for the main li) is getting listed on the discover page, though its listed in my local dev also very slow to render.

Please have a look!

Thank you for fixing those 👍  Sure I will take a look tomorrow

Hey @eddiejaoude
PR is ready for review, on the last note, I just really need your input to address this concern I have in regard the collectionId naming.
see comment https://github.com/EddieHubCommunity/LinkFree/issues/7660#issuecomment-1675863310

Yes ObjectId would be better if it is possible but I don't think it is a blocker

Great, I will look to implement the ObjectId in the collectionId?. Blocker!? sure I know it shouldn't be, I just thought it'd be smooth for DX when it used straight without the need to convert types.

Just something I thought of, can the changelog middleware ignore some updates? For example like profile views incremented?

Hmm, true.. Profile view isn't a form input update! I will first need to look at how the Profile view increments and see what I can come up with!

I have discovered that the Profile View action doesn't trigger the dbChangesLogger middleware function, and this is because the view property is incremented using the updateOne query/model function as implemented in the getUserApi.

The updateOne function as said in the mongoose docs...

Note: updateOne will not fire update middleware. Use pre('updateOne') and post('updateOne') instead.
...does not fire the update middleware, so our middleware findOneAndUpdate is safe off the action.

Great 🎉

During testing I noticed that the stats incrementing on the profile does record a changelog, can we exclude this?
https://github.com/EddieHubCommunity/LinkFree/blob/605f233d2529786e3768d972f9fe484fb2576d93/pages/api/profiles/[username]/index.js#L160-L176

What's the action that triggers that?

When the profile views are increment here LinkFree/pages/api/profiles/[username]/index.js

When the profile views are increment here LinkFree/pages/api/profiles/[username]/index.js

Hey @eddiejaoude
I have done further investigation, I want to insist that the views or stats increment doesn't trigger the dbChangesLogger middleware neither does it add a Changelog.
I assumed a visit to a user link page, on the /[username] route triggers the required action in that /api/profiles/[username]/index.js route and I tested! That part of the code base you pointed to, seem like it's just been introduced, But the stats increment doesn't add a Changelog.
It is important to point this certain behavior to you and state that you should not confuse it with the changelog you might have seen recorded.
The certain behaviour is one that I have noted on the Profile model

on Link Edit, a Changelog is recorded for Profile too after one is already recorded for Link, but the diff in their will be just the updatedAt

...this is because on add new/edit link action the Profile model links property gets updated accordingly, so in the case where its an update action, the are no new item added to the Profile model but the document gets update, hence the diff being just updatedAt.
If this is the changelog you have seen, kindly note that its not from that part of the codebase.

I get similar test failures locally, I am still trying to figure out why 🤔

I get similar test failures locally, I am still trying to figure out why 🤔

Its in fact worse on my end, I'm not even able to run e2e tests locally, so I have limited variable to help me debug. I get the timeout all the time, hence my reliance is on the PR actions build/tests.
I am also still tryna figure out what's causing the build/tests failure.
Has anyone or have you experienced this build/tests failure in any other PR recently?

I have been chatting with the maintainers, Dan mentioned this You added middleware into it, so there is something the middleware is doing that breaks things. and this is the error Dan shared
ERROR (1474): failed loading profiles
    err: {
      "type": "TypeError",
      "message": "Cannot read properties of undefined (reading 'find')",
      "stack":
          TypeError: Cannot read properties of undefined (reading 'find')
              at getProfiles (webpack-internal:///./pages/api/profiles/index.js:43:77)
              at async fetchRandomUsers (webpack-internal:///./pages/search.js:52:19)
              at async getServerSideProps (webpack-internal:///./pages/search.js:77:37)
    }

I have will try to dig into it.
Btw how come you can't run the tests locally?

I am struggling to fix this issue, maybe for the moment, we don't use the middleware and we manually save the changes in the API when we need it? What do you think?

Btw how come you can't run the tests locally?

It's weird 😐

I am struggling to fix this issue, maybe for the moment, we don't use the middleware and we manually save the changes in the API when we need it? What do you think?

Hmmm, I think I subscribe to that as a make due for now.
So this means we will be consuming this functionality within the page/api/account/manage/link/[[...data]] and page/api/account/manage/profile route!?
Kindly confirm if there's any other place where the functionality will be implemented apart from this!?

Thanks for understanding!
I think all the CRUD on the manage pages

profile
links
milestones
events
testimonials
repos

https://github.com/EddieHubCommunity/BioDrop/tree/main/pages/api/account/manage

I think all the CRUD on the manage pages

Hi @eddiejaoude, I would've implemented this like so..

Create a new function that replicates the dbChangeLogger function's functionality, but
The BIG BUT
The function MAY not be able to compute the document changesBefore & changesAfter due to the position it seats in the operation (not in the middle, like the middleware), but it will be able to accept the changesBefore & changesAfter as arguments, then it can compute a value for the diff property with these and save to the changelog model.
Now this means we will have to do a findOne in each endpoint (atleast for the DELETE & PUT methods) to compute value for changesBefore and we can use the returned doc from the endpoints main operation as value for changesAfter.

The function will accept 4 atleast for arguments, i.e. username, collection, and the aforementioned changesBefore & changesAfter.

We will then call this function in every endpoint operation as needed.

This means the work of the function will be limited strictly to...

Computing value for the diff property
Saving changes to the changelog model
...and logging changes to the console

My Reservation
Having a function that does this operation seating in the middle of the system still looks best for this, because I don't really subscribe to the repetitive call on the function and outside computation of the changesBefore & changesAfter in each endpoint.
Way forward
I will go ahead and implement this though and see if it even works!
But I kinda recalled a certain functionality in my experience working with firebase, it's known as snapshots firebase holds this by default keeping the most previous state of each document and after a change. It got me to research, seeking similar functionality in mongodb, hence I found the MongoDB Change Stream Pre- and Post-Images for Documents...
https://www.mongodb.com/docs/v6.0/changeStreams/#change-streams-with-document-pre--and-post-images
...introduced in mongoDB 6.0, they are said to be...

Unlike middleware, change streams are a MongoDB server construct, which means they pick up changes from anywhere.
Quoted from Change Stream - Mongoose

...sounds like the dream, but in order to enable them.. we'd need to enable it at database level, this will mean that you'd need to enable something in the production database at merge. Hence I thought to ask to look at it first.
While you take a look, I will work on our make due functionality anyways like I said!

Thank you for the great explanation! I wonder if we could step in this direction incrementally, to allow us to get value out quicker and also de-risk the changes
What about a function that only saves the new changes? We can add further functionality later

Thank you for the great explanation! I wonder if we could step in this direction incrementally, to allow us to get value out quicker and also de-risk the changes
What about a function that only saves the new changes? We can add further functionality later

So I have implemented the handy function logChange with the specification I initially stated..
export default async function logChange({ username, collection, changesBefore, changesAfter }) {
  let diff;

  const collectionName = collection;
  const docId = changesAfter._id || changesBefore._id;

  if (changesBefore && changesAfter) {
    diff = getChangesDiff(changesBefore, changesAfter);
  } else {
    diff = changesAfter;
  }

  const change = {
    username,
    docId,
    collectionName,
    changesBefore,
    changesAfter,
    diff,
  };

  if (changesBefore !== changesAfter) {
    await Changelog.create({ ...change });
    logger.info(change);
  } else {
    logger.info(`No changes occured in: ${collection}`);
  }
}

function getChangesDiff(chngB, chngA) {
  ...
}

and it work exactly as expected. I have only implemented it in Enpoint with "PUT" and "POST" method, because I thought we need add a Changelog for deleted (DELETE method) documents.
Here's the PUT Method implementation style in updateLinkApi endpoint
export async function updateLinkApi(username, id, data) {
  ...

  // get Link before Update action
  let beforeUpdate = await getLinkApi(username, id);

  // ... update action occurs

  // Add to Changelog
  logChange({
    username,
    collection: "links",
    changesBefore: beforeUpdate,
    changesAfter: getLink
  });

  return JSON.parse(JSON.stringify(getLink));
}

...and POST Method implementation style in addLinkApi endpoint
export async function addLinkApi(username, data) {
  ...

  getLink = await getLinkApi(username, getLink[0]._id);

  // Add to Changelog
  logChange({
    username,
    collection: "links",
    changesBefore: null,
    changesAfter: getLink
  });

  return JSON.parse(JSON.stringify(getLink));
}

I have done this implementation for the following account manage api routes

profile
links
milestones
events
repos

I have left out the testimonial because I think that updatingTestimonialOrder and its Pinned status isn't much worthy of an addition to the changelog as much as links click incrementation doesn't.

I have left out the testimonial because I think that updatingTestimonialOrder and its Pinned status isn't much worthy of an addition to the changelog as much as links click incrementation doesn't.

Good idea 👍  Thank you for the great work, I will take a look over the next few days - I am at a conference so might be a bit slower than usual

I will take a look over the next few days - I am at a conference so might be a bit slower than usual

Well noted Eddie!
I hope you have them good sessions.

Hi @eddiejaoude
Following some commit and update I performed on the branch, I have been having challenge spinning up the local dev server, I get the error below
./config/stripe.js:1:0
Module not found: Can't resolve 'stripe'
Did you mean './stripe'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (node_modules, C:\Users\Bode\Documents\Projects\Open Source\LinkFree).
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.
> 1 | import Stripe from "stripe";
  2 |
  3 | import { serverEnv } from "@config/schemas/serverSchema";
  4 |

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./pages/api/auth/[...nextauth].js

I noted that there's been some new package added for the premium BioDrop, stripe been one I noted and for this reason I have ran npm install in attempt to ensure I have all dependencies files up to date, But the error persists even after restarting the server multiple time.
Kindly confirm, is there an extra step in configuration I should be taking to allow be set-up properly?

@babblebey I think your .env file is out of date. I think it is best to have a look at the .env.example file and add the missing params to your .env - the new stripe values can be left empty but they need to exist in your .env file

I suggest update your branch from main and I think your .env file is out of date. I think it is best to have a look at the .env.example file and add the missing params to your .env - the new stripe values can be left empty but they need to exist in your .env file

Hahaha @eddiejaoude, I did do this! I added the Stripe Variable to my .env with empty value but I didn't restart my dev server to even see whether it was gonna work, before I left the screen to drop the comment, lazy me... I knew to do that when I got the error in the stack trace pointing to the server env schema, I notice the zod definition for the Stripe variable's .optional().
Well I'll do and proceed!

During testing, when I update my profile name, I get the following error

Yea, that was the error I noticed and I wanted to fix before I came across the Stripe issue that got me to stop working. But I know exactly what to work on...
The error is from within the getDiff, the document it's getting inside the changesBefore/After arguments, has present within them some mongo hardened stuffs that the JSON.stringify cannot work on.
My fix will be to convert the changesBefore/After document argument to plain object with the toObject() mongoose method, that way the getDiff receives a plain flattened object with no mongo stuffs for the function to work with.

Ok cool, let me know how it goes. Thanks again for working through the challenges of this difficult issue

Hi @eddiejaoude,
This should hopefully conclude the process.
I ended up not using the toObject() function, as I uncovered that my data for the changesAfter in the Update endpoint were somewhat late, not getting the latest doc after change, I sorted that and saw that I was in fact getting the right document format after implementing a call that compute for the new doc, so no need for the toObject() function.
Discovered Edge Case
I have also discovered a situation where changelog gets registered for a document anyway even when there isn't any intentionally inputted new value detected. This is because when a user saves the same info as is on a form without change, the updatedAt property on the document changes and that is recorded as a change, registered by the getChangesDiff function hence trigger an insert to the changelogs collection...
The Fix ✅
I fixed this by removing the updatedAt property from the returned diff object from the getChangesDiff function hence ensuring an empty object is returned when the updatedAt property is the only registered difference.
function getChangesDiff(chngB, chngA) {
  const diff = {};

  for (const key in chngA) {
    if (JSON.stringify(chngB[key]) !== JSON.stringify(chngA[key])) {
      diff[key] = chngA[key];
    }
  }

  const { updatedAt, ...cleanedDiff } = diff;     // <- RIGHT HERE - Destructure out the `updatedAt` property if present

  return cleanedDiff;     // <- and returning the other changes, could be no change at all leading to empty object -> {}
}

I then proceed to append an extra check to the changelog save condition which confirm whether the return returned diff object from the getChangesDiff function is empty, hence taking the necessary step to either record a new changelog or ignore...
export default async function logChange({ userId, collection, changesBefore, changesAfter }) {
  let diff;

  .....

  if (changesBefore !== changesAfter && JSON.stringify(diff) !== "{}") {    // <- Check whether `diff` is not an empty object
    await Changelog.create({ ...change });
    logger.info(change);
  } else {
    logger.info(`No changes occured in: ${collection}`);   // <- Logs message when `diff` is an empty object
  }
}

BOOM 💥

Thank you so much! It looks like a great idea 👍 I will test today and hopefully we can merge 🎉 Your efforts on this challenge have been amazing 💪

I just had a test/play, it works really great! 👍  thank you
I think it is just the userId remaining to be done. If you need any help on this let me know.
I did notice, that collection is probably better renamed to model, as most of these changes are to the collection profile - otherwise this will become confusing.
Also can the testimonials and premium toggles be added to the changelog? This can come in a later PR though

I just had a test/play, it works really great! 👍  thank you

😁

I think it is just the userId remaining to be done. If you need any help on this let me know.

Yea, I'm working on that, I've been experimenting with getSession function (accepts only req as args) which turns out to as not advised to use in SSR from NextAuth v4.***, So I am opting for getServerSession (accepts req, res & authOptions) and working on a manner that reduces the number in lines of code to write per endpoints as we try get the userId through the session.user.id.

I did notice, that collection is probably better renamed to model, as most of these changes are to the collection profile - otherwise this will become confusing.

Hmmm, maybe!? I struggle to understand the profile example though, do you want to give me another example of make this simpler for me 🥲

Also can the testimonials and premium toggles be added to the changelog? This can come in a later PR though

Hmmm, I seriously struggled to find the area where testimonials had a need for changelog addition in the initial phase, and are testimonials editable after getting added too??
Also, what are the premium toggles!? Sounds very new to me!

Oh yes you are right, the userId is in the session 👍  session.user.id - I think using this is find on those pages because the user must be logged in to go to the manage pages - good spot 💯
Testimonials and Premium features only have toggles, they are all set to "off" to begin with but the user can enable them - it would be good to log when these are toggled on/off
If you need more clarification or want to discuss let me know - we can always continue on EddieHub Discord it might be easier

Great stuff @eddiejaoude,
I now see the user's accountId directly as the value user.id in session object,
{
  user: {
    name: 'Olabode Lawal-Shittabey',
    email<EMAIL_ADDRESS>    image: 'https://avatars.githubusercontent.com/u/25631971?v=4',
    id: '64d6c69f1111111a3934ba94' // <- HERE
  },
  expires: '2023-10-30T12:50:08.590Z',
  accessToken: 'gho_*******u8rF***ucsr********************p***',
  username: 'babblebey',
  accountType: 'free',
  stripeCustomerId: undefined
}

I think that's pretty straightforward, instead of having the session.user.id value be the providerId. It has now indeed shaped better the way the endpoint function will call the logChanges function and how other parts of the project will call the endpoint function directly in SSR or GetServerSideProps.
The logChanges will not look like this...
async function logChange(session, { model, changesBefore, changesAfter }) {
  // Take that user `accountId` -> `64d6c69f1111111a3934ba94` straightforward.
  let userId = session.user.id

  .....

  const change = {
    userId,
    .....
  };
}

and it will be callable from with the endpoint functions like so...
logChange(await getServerSession(context.req, context.res, authOptions), {
  collection: "links",
  changesBefore: beforeUpdate,
  changesAfter: afterUpdate
});

this means whenever the function is call directly directly in SSR or GetServerSideProps, it can simple just take in the context object as the first argument or maybe an object that holds { req, res }, like so...
export async function getServerSideProps(context) {
  await updateLinkApi(context, [username], [id], {data})
  ....
}

Testimonials and Premium features only have toggles, they are all set to "off" to begin with but the user can enable them - it would be good to log when these are toggled on/off

I am attempting to experience the toggles, I am getting the below error on the /account/manage/profile route...
Server Error
Error: Error serializing `.PREMIUM_SUPPORT_URL` returned from `getServerSideProps` in "/account/manage/premium".
Reason: `undefined` cannot be serialized as JSON. Please use `null` or omit this value.

This error happened while generating the page. Any console logs will be displayed in the terminal window.

Well, I am still tryna trace the endpoint to integrate the logChange into for the toggles anyway, and I have uncovered the  updateSettingsApi function in the api/account/manage/settings route, kindly confirm if I am looking at the right function or maybe you could point me in the right direction.

I now see the user's accountId directly as the value user.id in session object,

note that accountId, userId and profileId are all different, we should use userId (user.id) here

So, I am attempting to experience the toggles, but I am getting the below error

I think the error is because you are missing environment variables in your .env file, please compare with .env.example file - this value can be empty but the property needs to exist in the .env

note that accountId, userId and profileId are all different, we should use userId (user.id) here.

Yea, for sure I knew that... I was just talking about the exact value in the session.user.id as it differs from the one that I thought used to be there.

I think the error is because you are missing environment variables in your .env file, please compare with .env.example file - this value can be empty but the property needs to exist in the .env

PREMIUM_SUPPORT_URL!? Okay, I'll appropriate that.

The Implementation works as expected! All tests I've done passed! You should give it a whirl too 😁

Great work! I will take a look shortly.

I was just talking about the exact value in the session.user.id as it differs from the one that I thought used to be there.

Here is me logging out the token.sub or session.user.id and it matches my user._id in the database

Here is me logging out the token.sub or session.user.id and it matches my user._id in the database

Yea, exactly the id I was taking about.
That was thesame value I'd tried to get using the getAccountByProviderId function with the session.user.id as args... At that point, the value of the session.user.id was the GitHub providerId instead.

Following the integration into the Premium Setting Toggle, I discovered a certain edge case.
Edge Case
A Premium User is most certainly gonna want to hide both the Footer and Header, now In order to perform this operation, the toggle on each setting makes separate http-requests to the endpoint, making it at least of 2 requests to perform a one way operation (i.e. false-to-true) on both toggles. This in turn also records at least 2 changelogs, which IMO is somewhat unnecessary.

Fix Proposal
I think we can reduce the number of http-requests and recorded changelog to just 1. This will be the case if we implement a Save Change button which only makes the http-request and trigger a changelog when the user assumes satisfaction with their toggle preferences, and clicks on the Save Changes button to confirm their selection/preferences, then the state of the toggles (true or false on both Footer and Header) can be sent together in 1 request. This change might be insignificant but I think it will reduce the number of changelog to record for this Premium toggle and come'on we are making atleast 1 less http-request ahahaha 😃

We can just just have the button there in disabled state by default or not even present at all to start with, then as soon as any of the toggle state changes, we can enable the button to give a visual que to user notifying them the need to confirm their toggle selection/preferences.
What'd you think @eddiejaoude???

Good suggestion, but I think we can leave it for now, as I am keen to get this PR merged as soon as possible
Thank you for making the changes, I can't wait to have a play

Great stuff 😃
I can't wait either hahaha 😃
So the last leg would be to figure out every instance where the endpoints was indeed called via non-http means in SSR.
But judging by the fact that we experience no error at build time, I will conclude that there isn't any of these instances yet.
Give this a whirl and let's see what we got! 😁
Quick Question
Are you tryna work on some administrator dashboard where this model will be implemented to track changes!? 🤓
Or better still, what's the use of this!? I'm just curious

I noticed that (I think) testimonial is missing?

I noticed that (I think) testimonial is missing? This an come in another PR

I saw testimonials wasn't controlled via Form Input, testimonials were linked to creating an Issue on the repository.
Or is that somewhere I should be looking that I didn't look at?? 🤔

I mean for the manage testimonials (not create), they are toggled on/off - it would be good to record those changes to people's profiles
Could you raise an issue? You don't have to work on it, someone else can use your examples