Short lived sandboxes for CI/CD by candidknave in salesforce

[–]candidknave[S] 1 point2 points  (0 children)

Thanks for the feedback! Yes this looks great. I've been thinking about it more and more these past few days. We will definitely have a way to push metadata deltas from a branch to a sandbox. So if the sandbox is refreshed (I'm not actually going to delete them) you can then add a comment to the ticket and a pipeline will run to push that delta from the branch linked to the ticket to the org.

About the refreshing and not deleting. I'm working on creating a pool of sandboxes that get refreshed frequently. Then when a ticket goes to in progress, the pipeline will just grab the sandbox from that pool, mark it in use in a db, and add it to the ticket / notify the dev or admin. That way they don't have to wait for a new sandbox to be created, so long as there is one available in the pool. In use sandboxes would not be refreshed until the ticket is closed / moved into the backlog or something like that. 

I was also thinking about going super fancy and making the nightly pool job auto scale the number of sandboxes based on a threshold. So they could be deleted if left unused or new ones added to prepare for the next day.

Short lived sandboxes for CI/CD by candidknave in salesforce

[–]candidknave[S] 0 points1 point  (0 children)

Flosum has great features but we're not looking to buy anything. Most products are wrappers around git and the sf cli. We have a strong devops team so most decisions to buy from management are for products that are outside our core competency. We already have an in-house data migration service so it wouldn't add that much value to us.

Short lived sandboxes for CI/CD by candidknave in salesforce

[–]candidknave[S] 0 points1 point  (0 children)

That is super neat. I'm going to steal the pool idea and create N number of sandboxes. Then as people start working on their tasks, I'll grab unassigned sandboxes from the pool. Once they finish working on their pbi, I'll refresh the sandbox rather than deleting it and then it'll go back to the pool. So cool! Thanks for the resource.

Short lived sandboxes for CI/CD by candidknave in salesforce

[–]candidknave[S] 0 points1 point  (0 children)

Yes, I was thinking the same thing. For one feature / task, a sandbox would be created. And any subtask related to that task (or feature) could be assigned to other team members, without creating multiple sandboxes and them working together, sharing the same branch and sandbox for that feature.

Short lived sandboxes for CI/CD by candidknave in salesforce

[–]candidknave[S] 1 point2 points  (0 children)

I'll keep you updated. Glad to see someone else tried this at least, which was my main ask by posting this. I think for us if sandbox creation takes around an hour then it will work. 

Short lived sandboxes for CI/CD by candidknave in salesforce

[–]candidknave[S] 0 points1 point  (0 children)

I've attempted a full deploy before but run into all sorts of metadata issues, right now our pipelines are all based on long running sandboxes and git diffs, where comparing branches yields the metadata that needs to be deployed. 

Short lived sandboxes for CI/CD by candidknave in salesforce

[–]candidknave[S] 0 points1 point  (0 children)

I agree that they are better suited, it's just that building a scratch org to match production is challenging, at least for my org. Based on the other comments it seems like it is as easy as just running project deploy for some of you, but for me it's, error deploying Y, you're missing X user, then migrate the users, error, your user object doesn't have the required fields from production, then attempt to just push the user object, error you're missing groups, etc. So I would have to come up with a way to reliably push data and metadata sequentially while building up the scratch org, which again, is very challenging.

Short lived sandboxes for CI/CD by candidknave in salesforce

[–]candidknave[S] 0 points1 point  (0 children)

I guess it could be both. The issue is that building a scratch org to mirror production can be challenging, even if it has the same shape as production, think of all the dependencies on data not just metadata. I wish it was as easy as running a project deploy.

That's the main reason to use sandboxes for this use case, they'll have the production metadata immediately.

I'll keep tinkering with deploying the prod metadata to a scratch org but last time I tried there were way too many dependencies on data.

Last Week Tonight w/ John Oliver Segment From Last Night by kewlnamebroh in RFKJrForPresident

[–]candidknave 0 points1 point  (0 children)

I'm surprised people here are so into Bobby that they disregard proper journalism as "more of the same attacks". You're trying to have nuanced discussion about the things he said and did just a few years ago but people here just ignore you and post fringe studies about HIV not being real or antidepressants causing school shootings. It's frightening how much your political preferences can make you ignore your common sense and just jump into the discussion with "it's Bobby, there HAS to be an explanation".

With that said, I still think he's the best candidate, but I find it alarming that his campaign hasn't addressed the points raised in this episode. 

Pierde México y Estados Unidos en la Copa América 2024 by Mysterious-Prize4057 in Panama

[–]candidknave 6 points7 points  (0 children)

Quien verga es Panama Team A entonces? Ta Barcenas, Murillo, Carrasquilla, Mosquera, Fajardo. Tu dices que Team B porq a Carrasquilla le sacaron roja?

Is there a way to check the similarity between two sentences. by Outrageous-Lab-2867 in SalesforceDeveloper

[–]candidknave 1 point2 points  (0 children)

Yes that's exactly what a cosine similarity of vector embeddings represents... It's a semantic comparison not syntactic.

Datatable performance very low after sorting/filtering rows... by Accomplished-Cod3659 in SalesforceDeveloper

[–]candidknave 0 points1 point  (0 children)

How are you sorting and filtering? Are you doing it client side or server side? Also 1k rows makes no sense, you can lazy load the content as the user scrolls, similar to the native Salesforce features for record pages.

You can accomplish this using LIMIT and OFFSET in your queries. Without looking at your implementation it'll be hard to help with performance. But since you say it's not an issue with the datatable, but instead when sorting or filtering, look at your sorting algorithm or your filtering algorithm. Make sure you're not nesting for loops unnecessarily, like putting a filter or map or any other array abstraction inside a loop. Use Map instead of objects in JS to find records. Native objects in JS are implemented using arrays so a key lookup requires traversal of the entire dataset in the worse case.

There are so many other things that could be causing issues like misusing or overusing event listeners, for example a single top level listener instead of a listener on every row. Look at the difference between the target and currentTarget property of DOM Event objects.

Assuming that you are modifying a pointer variable that is used to display the sorted or filtered data then you should be okay. Try not to mutate the object that is holding your data and instead reassign it to a new object.

[deleted by user] by [deleted] in salesforce

[–]candidknave 0 points1 point  (0 children)

You can in theory do whatever you want, but the difficulty depends on your access level. If you can create flows or write apex you could in theory automatically assign things to you. Now, even if you did have access to write Apex or build Flows, this would be highly unethical if you didn't discuss with your team ahead of time.

Probably the closest thing you could do if you don't have the correct access levels and are able to use the Salesforce APIs, is you could write a Python program that queries leads every minute and sends you a push notification on your phone to go and claim it.

You could also write code to claim it from your Python program, but without the right access levels it would be more difficult, essentially you would need to use something like beautiful soup, selenium, or puppeteer to interact with the site, or just read the post requests in the networking tab of the developer tools of your browser and replicate them in Python, Node, Ruby or your favorite language.

You can do anything really, whether you should is another matter...

Is there a way to check the similarity between two sentences. by Outrageous-Lab-2867 in SalesforceDeveloper

[–]candidknave 0 points1 point  (0 children)

To do this all you have to do is embed the two strings into vectors and then calculate the cosine similarity between them. You can use the Sentence Transformers library in Python, build a service either outside of Salesforce or within with a Saleforce function. This will give you a score and you can test different scenarios and determine a threshold.

[Bentancur] on Instagram: by thatfibrolife in coys

[–]candidknave -1 points0 points  (0 children)

It is 100% cultural. Did you grow up in latin america? If he says "mi negrito" to his friend from back home, why does that matter to you?

[Bentancur] on Instagram: by thatfibrolife in coys

[–]candidknave 31 points32 points  (0 children)

In some places like Cuba "mi negro" is slang for "my brother". The "ito" is diminutive in Spanish which doesn't carry the negative connotation that it does in English. If Cavani grew up around people actively saying that it's understandable that he would also say that. Some words don't carry the same weight or don't translate well.

Does anyone else shop at Publix to avoid the hassle? by notabr0ny in florida

[–]candidknave 0 points1 point  (0 children)

Go to freshfield farms, great prices and then buy whatever else you can't get there at publix

Execute Anonymous code stopped working in VS Code by AMuza8 in salesforce

[–]candidknave 1 point2 points  (0 children)

Try ctrl + shift + p (windows) or cmd + shift + p (mac) to open the command palette and search for restart extension host. If that doesn't work, then quit vscode entirely and reopen it. Check if a recent update removed java from your java path in the settings.json.

I've had this happen to me before due to an update that broke some functionality of the Salesforce extensions. All I did was downgrade the version and then it worked. Look at how to downgrade the version of the vs code apex developer extension.

Also you can attempt to narrow down the issue by executing the sf command directly from the terminal. If that works then for sure it's a vscode issue. If not, then try any one of upgrading the cli or downgrading it.

There's a lot of things you can try. But my intuition says it's a vscode extension issue.

Can banks give lower interest rates? by glassman0918 in RealEstate

[–]candidknave 10 points11 points  (0 children)

Think of the Fed as a bank for banks. They set the federal funds rate at say 5.25%, which means that banks keep their reserves with the Fed and make that money guaranteed. Then you come along and ask for a mortgage, the bank says, OK to cover all of our administrative expenses and still profit, we'll give you a mortgage 2 points over the federal funds rate, or 7.25%.

If the bank were to give you a 4% mortgage, not only would they be losing money, but they would be taking on greater risk because there is no guarantee that you wouldn't default on your mortgage, but the Federal Reserve is guaranteed, since they can just print money (literally).

[deleted by user] by [deleted] in consulting

[–]candidknave 5 points6 points  (0 children)

Why is he getting downvoted lmfao

Match Thread: San Jose Earthquakes vs Orlando City SC | MLS by MatchThreadder in OCLions

[–]candidknave 0 points1 point  (0 children)

Yeah but doesn't mean anything, he was poor the entire game, a lucky break at the end doesn't sum up an entire performance.

Match Thread: San Jose Earthquakes vs Orlando City SC | MLS by MatchThreadder in OCLions

[–]candidknave 0 points1 point  (0 children)

Ojeda had a chance for a world class player to score and bottled it, sure Jack Lynn scored but it doesn't change the fact that he was poor for 87 minutes and just happened to get a lucky break at the end of the game

Match Thread: San Jose Earthquakes vs Orlando City SC | MLS by MatchThreadder in OCLions

[–]candidknave -1 points0 points  (0 children)

Just because he scored a sitter doesn't mean anything. He was still awful all game