Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improved source repository validation #34

Merged

Conversation

michallachowski
Copy link

@michallachowski michallachowski commented Mar 6, 2024

This PR is to resolve an issue that blocks execution of orchestrator:prepare commmand. I create all artifacts from the same repository, but due to pipeline migration the way of checking out the repo has changed (ssh vs. https) - as a result, repository_url property sometimes may be different. Here's an example of the exception:

Error: Artifacts must originate from the same source repository, for deployment to work. The artifact [ARTIFACT_NAME] has repository URL that doesn't meet the current repository URL {"ref":"https://bitbucket.org/[ORG_NAME]/[REPO_NAME]","hostName":"bitbucket.org","pathName":"/[ORG_NAME]/[REPO_NAME]"} not equal {"ref":"[email protected]:[ORG_NAME]/[REPO_NAME].git","hostName":null,"pathName":null}.

In my opinion, the following urls should be considered as valid / matched:

  • https://bitbucket.org/[ORG_NAME]/[REPO_NAME]
  • [email protected]:[ORG_NAME]/[REPO_NAME].git

Please let me know if you agree this is sth that should be fixed. Also, this PR introduces new dependency to the project - do we have any rules or additional tasks that I have to do in such case?

Checklist

All items have to be completed before a PR is merged

  • Adhere to Contribution Guidelines
  • Updates to Decision Records considered?
  • Updates to documentation at flxbl-sfp Guide considered?
  • Tested changes?
  • Unit Tests new and existing passing locally?

@azlam-abdulsalam
Copy link

@michallachowski this looks nice, lets have a look at the dependency's code and it should be good to go.

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.26%. Comparing base (616c637) to head (62b3662).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #34   +/-   ##
=======================================
  Coverage   46.26%   46.26%           
=======================================
  Files          73       73           
  Lines        2823     2823           
  Branches      323      323           
=======================================
  Hits         1306     1306           
  Misses       1492     1492           
  Partials       25       25           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@CLAassistant
Copy link

CLAassistant commented Mar 26, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ michallachowski
❌ azlam-abdulsalam
You have signed the CLA already but the status is still pending? Let us recheck it.

@azlam-abdulsalam azlam-abdulsalam merged commit 4bacfa9 into flxbl-io:main Mar 26, 2024
6 of 7 checks passed
azlam-abdulsalam added a commit that referenced this pull request Mar 26, 2024
* improved source repository validation

* chore: update pnpm lock

* fix: update deps locks

---------

Co-authored-by: Azlam <[email protected]>
Co-authored-by: azlam-abdulsalam <[email protected]>
@michallachowski michallachowski deleted the source-repository-validation branch March 27, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants