youngmon/atlassian-qna huggingface dataset:
Can parallel steps inherit the state of the previous step?
Asked by AS:

Im struggling with using steps to persist information/state.

<br />

I had assumed the parallel steps inherit their container from the previous step. This is correct, I can not get it to work.  
If this, isnt correct doest that mean parallel steps, are meant to have lots of duplicate code (for example installing packages, and prepring envs to run tests etc..)  
My current approach to have the first step run an ansible playbook - which provisions the container in pipeline similar to our local dev, and production envs.  
Part of that process is configuring the mysql DB and downloading some dummy data for it to use, while also installing some other libs (awscli for example)  
Finally it installs poetry so I can test our packages in this env, against the DB, before deployment.  

<br />

But when ever the next steps (in parallel) "poetry is not found".  
I added the artifacts: dist/\*\* - from seeing an example elsewhere about preserving whats installed to the next steps, but that didnt work.  
Have I miss understood the purpose of parallel steps here?


Answers:
author: Caroline R
body: Hi, [@AS](/t5/user/viewprofilepage/user-id/3697186)!

Thank you for reaching out to Atlassian Community!

First, I would like to explain how containers work. Your assumption was:

    I had assumed the parallel steps inherit their container from the previous step.

Actually, for every step in the YAML file, a Docker container starts. The repo is cloned in that container, and then the script commands are executed. Then, the container gets destroyed. For the next step, a new container will start. So, if you install some tools in one step, they won't be available in the next step. If you generate files in one step, they will only be available in the next steps if you define them as artifacts.

You mentioned parallel steps. Artifacts defined in a certain parallel step are not available in steps of the same parallel set. Only in subsequent steps that are not part of the parallel set.

I don't know how this tool (Poetry) is installed, and whether simply defining as artifacts certain directories it generates will make it available in the next steps or not. So, if you could let us know how you do the installation, we can check this further.

Looking forward to hearing from you.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud

parallel
bitbucket pipeline yaml file not working
Asked by simone_gasparella:

Hi ..

I have already a bitbucket yaml file working for compiling an embedded project ...

I tried to run the compile step only for a specific branches ..

But it is not working .. .

How can I fix it ?

Thanks a lot

# This is an example Starter pipeline configuration  
# Use a skeleton to build, test and deploy using manual and parallel steps  
# -----  
# You can specify a custom docker image from Docker Hub as your build environment.  
image:  
name: lpodkalicki/stm32-toolchain  
username: simogaspa84  
password: \*\*\*\*\*\*\*\*\*\*\*\*\*\*  
email: simogaspa84@gmail.com

pipelines:  
branches:  
'{master,feature/development}':  
default:  
- parallel:  
- step:  
name: 'Build and Test'  
script:  
- sed -i -E 's/\[A-Z\]:\\\\.\*\\\\workspace_\[\^\\\\\]+\\\\\[\^\\\\\]+\\\\/..\\//' Debug/makefile  
- make -C Debug all  
- step:  
name: 'Lint'  
script:  
- echo "Your linting"  
- step:  
name: 'Security scan'  
script:  
- echo "Your security scan goes here..."

# The following deployment steps will be executed for each pipeline run. To configure your steps and conditionally deploy see <https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/>  
- step:  
name: 'Deployment to Staging'  
deployment: staging  
script:  
- echo "Your deployment to staging script goes here..."  
- step:  
name: 'Deployment to Production'  
deployment: production  
trigger: 'manual'  
script:  
- echo "Your deployment to production script goes here..."


Answers:
author: Caroline R
body: Hi, [@simone_gasparella](/t5/user/viewprofilepage/user-id/4507459)!

Thank you for reaching out to Atlassian Community!

I understand that you would like to run Pipelines on specific branches, but that is running on all branches, is that correct?

Checking the YML file you shared with us, it doesn't seem to be valid as you are specifying "branches" and "default" in the same section.

Could you please remove the **default** word from the YML and see if the pipeline works for {master,feature/development} branches?

I hope this helps, but do let me know if you have any questions.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
REST API request-changes
Asked by Lior Mizrahi:

Hey,

after setting the user with permissions to pullrequest:write the end point:

/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes

using post returns 400 something went wrong.

all other end points that i use seem to work fine.

the user is using a app password.

any suggestions why?

i noticed you have : "Check that no changes are requested" as well as "Reset requested changes when the source branch is modified" perhaps i need to turn these on?


Answers:
author: Lior Mizrahi
body: ok i understand what i did wrong. i was sending a wrong header.

i was using: {"Content-Type": "application/json"}

instead of: {'Accept': 'application/json'}

hence the bad request.

++**BUT**++

if the pull request was created by the same user as the user that is sending the api call it just returns a success without informing that nothing really happened because the pull request is owned by same user. i think api should either return failure or some sort of message that states that this is an invalid request because the PR is owned by same user or api should allow it that the owner of the PR can also request changes.

regards, Lior.

comments: author: Syahrul
body: Hi [@Lior Mizrahi](/t5/user/viewprofilepage/user-id/4606707)

Glad to hear that you were able to locate the issue with the request.

Can you share with me the full cURL command and header user use so I can reproduce it? I did try on my end using application/json and was unable to reproduce it as it return a bad request error on my test.

I look forward to hearing from you.

Cheers,  
Syahrul


author: Lior Mizrahi
body: as stated,

the user has both "write access" and "merge via pull request" access types on the branch.

it is using a a app password to communicate via rest api.

for some reason all other end points seem to work fine except this one.

i'm not sure why but i'm getting a "something went wrong response"

comments: author: Syahrul
body: Hi [@Lior Mizrahi](/t5/user/viewprofilepage/user-id/4606707)

Thanks for the update.

I am unable to reproduce the issue on my end with the same behavior. I am leaning towards user API calls, maybe a **Bad request** on the body or the endpoint since 400 error means we receive a bad request.

Would it be possible for you to share user API calls so I can review them? Please mask/remove any unnecessary information before sharing.  

Cheers,  
Syahrul


author: Syahrul
body: Hi [@Lior Mizrahi](/t5/user/viewprofilepage/user-id/4606707)

Welcome to the community.

Could you share with me how you configure the user permission to pull requests? I want to try reproducing this issue so it'd be great if you can share the steps you took from granting the user permission and running the API endpoint.

I look forward to hearing from you.

Cheers  
Syahrul


Tags: bitbucket-cloud

cloud

rest-api
Git: Suddenly receiving "You need to verify your account" 403 error
Asked by Nathan Caldwell:

We have a custom software that periodically checks a Bitbucket repository via https. It always uses the same user and password.

Out of nowhere, it has begun receiving this error when attempting to talk to the remote:

```
remote: You need to verify your account before logging in. Please check your inbox for the verification email.
fatal: unable to access '<remote url>': The requested URL returned error: 403
```

(replaced actual remote url with brackets)

Unfortunately, the person who created this account left the company long ago, and ++I don't know the email associated with the account++.

Questions:

* Does anyone know **why** this may have started? I believe it began today, after being reliable for years.
* Any tips for resolving this issue?

Thank you!


Answers:
author: Nathan Caldwell
body: Here is the resolution:

* Finding the email associated with the account
  * As it turned out, this was super easy for our Bitbucket admin to do.
* Why this started happening on 10/28
  * According to Atlassian support, we were seeing this error because Bitbucket says you can only go so long without logging in to the account before they will stop letting you pull and push using that credential.
  * We had gone an unknown--but probably very long--amount of time without signing in.

There was an additional complication for us when we tried to sign in to Bitbucket:

* When I tried to sign in to Bitbucket as prompted by the error message received by Git, I discovered that Bitbucket was saying "We sent a signup link to you" instead of letting us log in.
* Atlassian support explained that this was actually **Atlassian**sending a signup link, not Bitbucket. Basically we had created this account in Bitbucket a very long time ago, and at that time you could create a Bitbucket account independently of creating an Atlassian account.
* At some point since we created that account in Bitbucket, Atlassian made it so that you had to have an Atlassian account in order to access Bitbucket.
* Once we followed the signup link and created an **Atlassian**account for our KetraCM email account, we were able to sign in to Bitbucket.

After that, we were able to "verify" the account. Then we could pull from the repo again using the existing remote URL.

Thanks to Philipe Trinh on the support team for working through this with us!


author: Caroline R
body: Hi, [@Nathan Caldwell](/t5/user/viewprofilepage/user-id/1812643),

I saw that you created a ticket with our support related to the same question, so to avoid any possible misunderstandings or miscommunication that may arise from discussing the same matter on two different platforms, let's focus on the ticket instead.

Once the ticket is resolved, feel free to share the resolution here to help other community members that may have the same issue.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
I don't get invite email
Asked by Artur Kano?in:

My supervisor is trying to add me to a project repository, but I do not get an invite email.

I used another account, created an empty repository there, invited my primary account -- the issue remained the same. There is definitely some problem with notifications from bitbucket

P.S. I checked the spam folder.


Answers:
author: Mikael Sandberg
body: Hi [@Artur Kano?in](/t5/user/viewprofilepage/user-id/4615722),

Welcome to Atlassian Community!

There is currently an active incident involving email notifications, have a look at <https://status.atlassian.com/>. I would also recommend subscribing to updates so you will be notified of future issues.


Tags: bitbucket-cloud

cloud
Can't host my repository as static website
Asked by Rafael Santos:

Following the guide described in [here](https://support.atlassian.com/bitbucket-cloud/docs/publishing-a-website-on-bitbucket-cloud/)

I created the workspace **gleechiapi** that has workspace ID**gleechiapi**:

Then I created the repository named **gleechiapi.bitbucket.io**

I pushed all my html/css/js files there and the index.html is there

Yet when I try to open [**https://gleechiapi.bitbucket.io**](https://gleechiapi.bitbucket.io)

it does not work. Can someone help?


Answers:
author: Syahrul
body: Hi [@Rafael Santos](/t5/user/viewprofilepage/user-id/820441)

Welcome to the community!

Can you confirm that index.html is created under your repositories root directory? Also, please ensure that the index.html filename is in lowercase since Bitbucket only recognizes the lowercase filename for index.html

I hope this helps.

Cheers,  
Syahrul

comments: author: Rafael Santos
body: yes I can confirm that it is. I'm attaching a screenshot where you can see the file and also the url in the address bar showing the root path ![Screenshot 2021-11-02 at 22.12.42.png](https://community.atlassian.com/t5/image/serverpage/image-id/167677i8A46EE304369D1B0/image-size/large?v=v2&px=999 "Screenshot 2021-11-02 at 22.12.42.png")


author: Syahrul
body: Hi [@Rafael Santos](/t5/user/viewprofilepage/user-id/4615564)

Thanks for the update. I suspect that this is an issue with the index.html so can you use a simple HTML as below and see if you are able to access your static website?

```
<html><title>Test</title><body>This is test</body></html>
```

Let me know how it goes

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
custom merge checks for Bitbucket Cloud?
Asked by Max DeCurtins:

Is there any possibility for custom merge checks in Bitbucket Cloud? Currently, merge checks seem very half-baked; we only have a limited number of options, all of them features (approvals, tasks, builds) predefined by Atlassian.

For example, I would like to ensure that all of the commits in a feature branch exist in other branches (e.g. development and QA) before a PR from the feature branch can be merged into a release branch.

I suppose I might be able to achieve this with a pipeline, but then Bitbucket treats the pipeline run as a "build", which feels very wrong from a cognitive standpoint. "Builds" are things attached to individual commits, which do something *with the code* , because they are triggered by *changes to code*.

In this case, however, all I want to do is some Git checks at the time a PR is opened/updated from one branch to another (matching a pattern for the branch name). This feels more like a merge check, because the script is triggered by a non-commit Git action.

This is just one case; I can also imagine wanting, say, to make an HTTP request to another service and wait for the response as part of a merge check.

Any ideas? Thanks in advance.


Answers:
author: Ulrich Kuhnhardt _IzymesCo_
body: ATM there are no custom merge checks.

It's a very powerful feature which many developers and app vendors have requested/voted for. Please add your comments and vote here <https://jira.atlassian.com/browse/BCLOUD-19885>

Appreciate your support.


Tags: bitbucket-cloud

cloud
How to delete a workspace and/or repository
Asked by Eric Poole:

I have created two new repositories, one in a workspace I created and another in a workspace owned by another team member. Now I find that I have to delete one or both of them.

In the first case, how would I delete both the repository and its workspace?

In the second case, how would I delete just my new repository?


Answers:
author: Eric Poole
body: Disregard, I found it...

comments: author: Eric Poole
body: In case anyone else asks...

To delete a repository:

1. From the repository you want to delete, click Repository settings in the sidebar on the left side of the Repositories page.

2. Once you're in the Repository details page, click Manage repository, which is located at the top of the page.

3. Select Delete repository.

To delete a workspace:

1. Navigate to the workspace

2. Click Settings-\>Workspace Settings

3. Click "Delete workspace" (hard to see, really small font but it's there)


Tags: bitbucket-cloud

cloud
Merge checks: Ensure all build are passing
Asked by Dave Weber:

We recently configured our CircleCI to use dynamic build steps. Based on the files included in the branch, certain build steps may or may not run. For example, if we have a branch that updates only frontend code, only our frontend tests will run; if we have a branch that updates only backend code, only backend tests will run. So for Bitbucket, there are a variable number of build steps.

That causes trouble with the merge check ensuring that a certain number of builds pass. We have to set the number to be the minimum number of builds that will run each time, but for some branches, we'll have more that could fail.

Is there a way to set a merge check that all builds have passed?


Answers:
author: Ulrich Kuhnhardt _IzymesCo_
body: Hi Dave,

I understand you have a variable number of builds that pass depending on the depth of code changes.

It would be good to have a configurable merge check that adjusts the number of required builds according the file paths in the PR changeset.

Unfortunately custom merge checks are not available (yet) in BBCloud despite the high interest <https://jira.atlassian.com/browse/BCLOUD-19885> in this feature (please vote!)

As a work-around you could define PR target branches including required builds that can be used as PR targets for backend, front-end or back+frontend pull requests. Depending on where changes are present create a PR from the feature/bugfix branch to the appropriate target branch. Then create a formal PR from that branch to develop without checking build results.

Best, Ulrich

[Izymes](https://marketplace.atlassian.com/vendors/1210584/izymes-pty-ltd) - Remove boring from work!


Tags: bitbucket-cloud

cloud
Elasticsearch not working after upgrading bitbucket from 4.14.4 to 7.6.2
Asked by Bibin Varghese:

Hi,  

I need a help associated with Elasticsearch. I've upgraded bitbucket from 4.14.4 to 7.6.2 recently. After the upgrade, the elasticsearch is not working. When running the start script, the console shows that "bundled elasticsearch has started successfully" but it is exiting somehow. I've gone through the logs and the logs show that  
"Unable to establish a connection to Elasticsearch during index synchronisation."


Answers:
author: Fernando De La Cruz Garelli
body: Hello Bibin,

Can you verify if in the server's terminal the following pid file is present and if bitbucket's user has permissions to it:

elasticsearch.pid

After verifying, can you perform the following:

* Stop Bitbucket server
* Delete elasticsearch.pid file
* Restart Bitbucket server
* Confirm if Elasticsearch connects successfully

comments: author: Bibin Varghese
body: Hi [@Fernando De La Cruz Garelli](/t5/user/viewprofilepage/user-id/3514063) ,  

I've searched for elasticsearch.pid file in the server, but I couldn't find it. Any specific location to search for it?


Tags: bitbucket-server

elastic-search

server
Is there a way to skip pull/push dialogs?
Asked by Jaex:

Is there a way to skip pull/push dialogs when i press pull or push button in Sourcetree toolbar? Because there is nothing i need to change in this dialogs and will be very handy to have optional setting to not show those dialogs.


Answers:
author: stevestreeting
body: The problem with this is that you could quite easily accidentally click the Push or Pull buttons on the toolbar, and especially with Push this is not something you can undo later (realistically if you're working in a team anyway).
subtree in SourceTree
Asked by m:

I know you can use submodules, can you use subtree commands in SourceTree?

Thanks


Answers:
author: Aditya Sreekumar
body: any updates on this yet Kieran?

comments: author: KieranA
body: Hey Aditya,

As my last comment said:

"It won't be in the next release as that development stream is in lockdown, so the release after that. We release pretty frequently for Windows so you won't be waiting too long."

Cheers!


author: Eric Newton
body: Bump.   

Just wondering if this is present in the Windows versions yet? I peeked at the issue and it "acts" like its in, but I see no "Subtrees" section in my repository after establishing a subtree

comments: author: KieranA
body: It's being actively worked on, that much I can tell you ;)


author: Eric Newton
body: This is good to hear, and I hope it gets released post-haste...   

I literally just approved using git-subtree due to SourceTree's support of it, until we realized the gotcha is that its not on the Windows version.   

Anyways, thanks for the quick response. I would love to find out a planned release date if you can find that out.


author: KieranA
body: It won't be in the next release as that development stream is in lockdown, so the release after that. We release pretty frequently for Windows so you won't be waiting too long.

Cheers


author: KieranA
body: It's being actively worked on, watch this space :)

comments: author: m
body: OK. Cool. In both Mac and PC?

Cheers


author: KieranA
body: Mac first, Windows to follow (as is usually the case at the moment). Which one are you looking for?


author: m
body: Both. We use it in both OS
Undo gitflow
Asked by joostfontein:

I applied gitflow in sourcetree. However, I reconsidered my git structure and don't need that anymore. Not that it actually in the way, but still would like to undo the whole gitflow thing.

I did not create features or releases yet. I do have master and develop and want to keep them.

Could I just delete the gitflow entries in the config file in .git?

\[gitflow "branch"\]

master = master

develop = develop

\[gitflow "prefix"\]

feature = feature/

release = release/

hotfix = hotfix/

support = support/

versiontag =


Answers:
author: RicardoA
body: The \[gitflow ...\] sections are only read by the gitflow special command. It is safe to remove them if you do not use the gitflow command anymore. Pure "Git" has no use for those sections.


Tags: git

git-flow
How do I delete all local branches in SourceTree
Asked by ryuuguu:

My local branches in SourceTree seem to be out of sync. When I check out a branch from the origin some files are missing. So I would like to delete all local branches so that sourctree(git) does not think there any local files and will copy all files from origin repository. I can not delete the local branch that is is active (option is greyed out). Is there any way to totally delete the local branches so I can start cleanly and get a full check out?


Answers:
author: Jeff Thomas
body: What about deleting the local repository and re-cloning it from the remote server? That would wipe out the local branches and let you have a clean copy of the repository. This would delete any local commits you've made that have not been pushed to the server.  

If you remove the bookmark in SourceTree, you'll also being given the option to remove it from the disk, which will wipe it out.

comments: author: ryuuguu
body: That does it. I was hoping to just do some sort of forced resync but I can't find anything git like that.
fatal: could not read Username for 'https://code.google.com': Device not configured
Asked by Dylan Greene:

Upon attempting to push to my project repo, I receive the following message:

fatal: could not read Username for 'https://code.google.com': Device not configured

<br />

This is similar to the following question: [https://answers.atlassian.com/questions/128009/how-can-i-fix-the-error-fatal-could-not-read-username-for-https-github-com-device-not-configured](/questions/128009/how-can-i-fix-the-error-fatal-could-not-read-username-for-https-github-com-device-not-configured), I'm not sure whether or not this is impacted based on the fact that the repo is Google Code and not Github.

I made sure the username and password for this was correct in the keychain and tried using both the embedded Git and the system Git with the same results. I've managed to get it working using Git in terminal, but SourceTree doesn't seem to want to cooperate.

Does anyone have any ideas as to what I could do?


Answers:
author: Dylan Greene
body: It's all right now. Apparently I had to configure it in the setting on Google Code. Hooray!