Skip to content

Commit

Permalink
Merge branch 'main' into bump_golang_1.20.3_main
Browse files Browse the repository at this point in the history
  • Loading branch information
wy65701436 authored Apr 8, 2023
2 parents 468fa5b + 1a8b918 commit 77f1a80
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 30 deletions.
17 changes: 14 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,22 @@ The main location for the documentation is the [website repository](https://gith

Documents are written with Markdown. See [Writing on GitHub](https://help.github.com/categories/writing-on-github/) for more details.

## Design new features
## Develop and propose new features.
### The following simple process can be used to submit new features or changes to the existing code.

You can propose new designs for existing Harbor features. You can also design entirely new features, Please submit a proposal in GitHub.(https://github.com/goharbor/community/tree/master/proposals). Harbor maintainers will review this proposal as soon as possible. This is necessary to ensure the overall architecture is consistent and to avoid duplicated work in the roadmap.
- See if your feature is already being worked on. Check both the [Issues](https://github.com/goharbor/harbor/issues) and the [PRs](https://github.com/goharbor/harbor/pulls) in the main Harbor repository as well as the [Community repository](https://github.com/goharbor/community).
- Submit(open PR) the new proposal at [community/proposals/new](https://github.com/goharbor/community/tree/main/proposals/new) using the already existing [template](https://github.com/goharbor/community/blob/main/proposals/TEMPLATE.md)
- The proposal must be labeled as "kind/proposal" - check examples [here](https://github.com/goharbor/community/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc+label%3Akind%2Fproposal)
- The proposal can be modified and adapted to meet the requirements from the community, other maintainers and contributors. The overall architecture needs to be consistent to avoid duplicate work in the [Roadmap](https://github.com/goharbor/harbor/wiki#roadmap).
- Proposal should be discussed at Community meeting [Community Meeting agenda](https://github.com/goharbor/community/wiki/Harbor-Community-Meetings) to be presented to maintainers and contributors.
- When reviewed and approved it can be implemented either by the original submitter or anyone else from the community which we highly encourage, as the project is community driven. Open PRs in the respective repositories with all the necessary code and test changes as described in the current document.
- Once implemented or during the implementation, the PRs are reviewed by maintainers and contributors, following the best practices and methods.
- After merging the new PRs, the proposal must be moved to [community/proposals](https://github.com/goharbor/community/tree/main/proposals) and marked as done!
- You have made Harbor even better, congratulations. Thank you!

[community-meetings]: https://github.com/goharbor/community/blob/master/MEETING_SCHEDULE.md


[community-meetings]: https://github.com/goharbor/community/blob/main/MEETING_SCHEDULE.md
[past-meetings]: https://www.youtube.com/playlist?list=PLgInP-D86bCwTC0DYAa1pgupsQIAWPomv
[users-slack]: https://cloud-native.slack.com/archives/CC1E09J6S
[dev-slack]: https://cloud-native.slack.com/archives/CC1E0J0MC
Expand Down
18 changes: 9 additions & 9 deletions tests/resources/Harbor-Pages/Project-Copy.robot
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ Documentation This resource provides any keywords related to the Harbor private
Resource ../../resources/Util.robot

*** Keywords ***

Copy Image
[Arguments] ${tag} ${projectname} ${reponame}
[Arguments] ${tag} ${projectname} ${reponame} ${is_success}=${true}
Retry Element Click xpath=//clr-dg-row[contains(.,'${tag}')]//label
Sleep 1
Retry Action Keyword Copy Image Action ${projectname} ${reponame} ${is_success}

Copy Image Action
[Arguments] ${projectname} ${reponame} ${is_success}=${true}
Retry Element Click ${artifact_action_xpath}
Sleep 1
Retry Element Click ${artifact_action_copy_xpath}
Sleep 1
#input necessary info
Retry Text Input xpath=${copy_project_name_xpath} ${projectname}
Retry Text Input xpath=${copy_repo_name_xpath} ${reponame}
Retry Double Keywords When Error Retry Element Click ${confirm_btn} Retry Wait Until Page Not Contains Element ${confirm_btn}
Retry Text Input ${copy_project_name_xpath} ${projectname}
Retry Text Input ${copy_repo_name_xpath} ${reponame}
Retry Double Keywords When Error Retry Element Click ${confirm_btn} Wait Until Element Is Not Visible ${confirm_btn}
Run Keyword If '${is_success}' == '${true}' Retry Wait Until Page Contains Copy artifact successfully
14 changes: 8 additions & 6 deletions tests/resources/Harbor-Pages/Project-P2P-Preheat.robot
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,21 @@ Execute P2P Preheat
Verify Latest Execution Result
[Arguments] ${project_name} ${policy_name} ${contain} ${not_contain}=${null} ${expected_status}=Success
Retry Double Keywords When Error Select P2P Preheat Policy ${policy_name} Wait Until Element Is Visible ${p2p_preheat_executions_refresh_xpath}
${latest_execution_id}= Get Text ${p2p_preheat_latest_execute_id_xpath}
Retry P2P Preheat Be Successful ${project_name} ${policy_name} ${latest_execution_id} ${contain} ${not_contain}
Retry Keyword N Times When Error 5 Retry P2P Preheat Be Successful ${project_name} ${policy_name} ${contain} ${not_contain}

Retry P2P Preheat Be Successful
[Arguments] ${project_name} ${policy_name} ${execution_id} ${contain} ${not_contain}=${null} ${expected_status}=Success
Retry Keyword N Times When Error 15 P2P Preheat Be Successful ${project_name} ${policy_name} ${execution_id} ${contain} ${not_contain} ${expected_status}
[Arguments] ${project_name} ${policy_name} ${contain} ${not_contain}=${null} ${expected_status}=Success
Retry Element Click ${p2p_preheat_executions_refresh_xpath}
${latest_execution_id}= Get Text ${p2p_preheat_latest_execute_id_xpath}
P2P Preheat Be Successful ${project_name} ${policy_name} ${latest_execution_id} ${contain} ${not_contain} ${expected_status}

P2P Preheat Be Successful
[Arguments] ${project_name} ${policy_name} ${execution_id} ${contain} ${not_contain}=${null} ${expected_status}=Success
${rc} ${output}= Run And Return Rc And Output curl -u ${HARBOR_ADMIN}:${HARBOR_PASSWORD} -i --insecure -H "Content-Type: application/json" -X GET "https://${ip}/api/v2.0/projects/${project_name}/preheat/policies/${policy_name}/executions/${execution_id}/tasks"
Log All ${output}
Should Be Equal As Integers ${rc} 0
Should Contain Any ${output} ${expected_status} @{contain}
Should Contain ${output} ${expected_status}
Should Contain ${output} @{contain}
${out} Run Keyword And Ignore Error Get Length ${not_contain}
Run Keyword If '${out[0]}'=='PASS' Should Not Contain Any ${output} @{not_contain}

Expand Down Expand Up @@ -158,4 +160,4 @@ Get P2P Preheat Logs
Log All cmd:${cmd}
${rc} ${output}= Run And Return Rc And Output ${cmd}
Log All ${output}
[Return] ${output}
[Return] ${output}
8 changes: 3 additions & 5 deletions tests/resources/Harbor-Pages/Replication.robot
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,11 @@ Create A Rule With Existing Endpoint
... ${mode}=Manual ${cron}="* */59 * * * *" ${del_remote}=${false} ${filter_tag}=${false} ${filter_tag_model}=matching ${filter_label}=${false} ${filter_label_model}=matching
... ${flattening}=Flatten 1 Level ${bandwidth}=-1 ${bandwidth_unit}=Kbps
#click new
Retry Element Click ${new_name_xpath}
Retry Double Keywords When Error Retry Element Click ${new_name_xpath} Wait Until Element Is Enabled ${rule_name}
#input name
Retry Text Input ${rule_name} ${name}
Run Keyword If '${replication_mode}' == 'push' Run Keywords Retry Element Click ${replication_mode_radio_push} AND Select Dest Registry ${endpoint}
Retry Text Input ${rule_name} ${name}
Run Keyword If '${replication_mode}' == 'push' Run Keywords Retry Element Click ${replication_mode_radio_push} AND Select Dest Registry ${endpoint}
... ELSE Run Keywords Retry Element Click ${replication_mode_radio_pull} AND Select Source Registry ${endpoint}

#set filter
Retry Password Input ${filter_name_id} ${filter_project_name}
Run Keyword If '${filter_tag_model}' != 'matching' Select Filter Tag Model ${filter_tag_model}
Expand All @@ -137,7 +136,6 @@ Create A Rule With Existing Endpoint
#set bandwidth
Run Keyword If '${bandwidth}' != '-1' Retry Text Input ${bandwidth_input} ${bandwidth}
Run Keyword If '${bandwidth_unit}' != 'Kbps' Select Bandwidth Unit ${bandwidth_unit}

#click save
Retry Double Keywords When Error Retry Element Click ${rule_save_button} Retry Wait Until Page Not Contains Element ${rule_save_button}
Sleep 2
Expand Down
2 changes: 1 addition & 1 deletion tests/resources/Harbor-Pages/Replication_Elements.robot
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Documentation This resource provides any keywords related to the Harbor private registry appliance
*** Variables ***
${new_name_xpath} //hbr-list-replication-rule//button[contains(.,'New')]
${new_name_xpath} //*[@id='new_replication_rule_id']
${policy_name_xpath} //*[@id='policy_name']
${policy_description_xpath} //*[@id='policy_description']
${policy_enable_checkbox} //input[@id='policy_enable']/../label
Expand Down
8 changes: 2 additions & 6 deletions tests/robot-cases/Group1-Nightly/Common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ Test Case - Copy A Image
Sleep 1
Go Into Repo project${random_num1}/redis
Copy Image ${image_tag} project${random_num1}${random_num2} ${target_image_name}
Retry Wait Element Not Visible ${repo_retag_confirm_dlg}
Navigate To Projects
Go Into Project project${random_num1}${random_num2}
Sleep 1
Expand Down Expand Up @@ -531,7 +530,6 @@ Test Case - Copy A Image And Accessory
Retry Double Keywords When Error Go Into Repo ${source_project}/${image} Should Be Signed By Cosign ${tag}

Copy Image ${tag} ${target_project} ${image}
Retry Wait Until Page Contains Copy artifact successfully

Retry Double Keywords When Error Go Into Project ${target_project} Retry Wait Until Page Contains ${image}
Retry Double Keywords When Error Go Into Repo ${target_project}/${image} Retry Wait Until Page Contains Element //clr-dg-row[contains(.,${tag})]
Expand Down Expand Up @@ -595,11 +593,9 @@ Test Case - Project Quotas Control Under Copy
Go Into Project project_a_${d}
Go Into Repo project_a_${d}/${image_a}
Copy Image ${image_a_ver} project_b_${d} ${image_a}
Retry Wait Element Not Visible ${repo_retag_confirm_dlg}
Go Into Project project_a_${d}
Go Into Repo project_a_${d}/${image_b}
Copy Image ${image_b_ver} project_b_${d} ${image_b}
Retry Wait Element Not Visible ${repo_retag_confirm_dlg}
Copy Image ${image_b_ver} project_b_${d} ${image_b} is_success=${false}
Sleep 2
Go Into Project project_b_${d}
Sleep 2
Expand Down Expand Up @@ -726,7 +722,7 @@ Test Case - Can Not Copy Image In ReadOnly Mode
Sleep 1
Enable Read Only
Go Into Repo project${random_num1}/redis
Copy Image ${image_tag} project${random_num1}${random_num2} ${target_image_name}
Copy Image ${image_tag} project${random_num1}${random_num2} ${target_image_name} is_success=${false}
Retry Wait Element Not Visible ${repo_retag_confirm_dlg}
Navigate To Projects
Go Into Project project${random_num1}${random_num2} has_image=${false}
Expand Down

0 comments on commit 77f1a80

Please sign in to comment.