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

course-automation: Automatic verification for mandatory parts of course-automation final #1629

Merged
merged 13 commits into from
Mar 31, 2022

Conversation

landeholt
Copy link

@landeholt landeholt commented Mar 30, 2022

Assignment Proposal

Title

Automatic verification for mandatory parts of course-automation final

Names and KTH ID

Deadline

Deadline to complete task 1: April 5, 17h Stockholm time

Category

Course Automation

Description

In order to alleviate redundant work for this course TAs I propose to automate verification of the following mandatory parts for "course-automation":

  • timeliness: the automation is done before the first task deadline (in order to be useful for the course)
    The first task deadline should be a set as a variable that can be changed for each year. If the final pull request to this repo is after first task, the pull request should become invalid.
  • repo: the code for the task is available in a public repo
    Check through the readme.md for a github-url and check whether the repo is public or not

The automation should perform the following :

  • Run for each new pull request that is the course automation task
  • Check if it is a final submission (i.e has a repo-link)
    • if final: check if it is before first task deadline and if repo is public
    • if not final: check if it is before first task
  • Give feedback accordingly to the pull request

@dd2482-bot
Copy link
Collaborator

Missing student registration :asim

@dd2482-bot
Copy link
Collaborator

Missing student registration :asim

@dd2482-bot
Copy link
Collaborator

Missing student registration :asim

@dd2482-bot
Copy link
Collaborator

Student paulinev already registered for this task

@dd2482-bot
Copy link
Collaborator

Student paulinev already registered for this task

@dd2482-bot
Copy link
Collaborator

Student paulinev already registered for this task

@dd2482-bot
Copy link
Collaborator

Student paulinev already registered for this task

@landeholt
Copy link
Author

Student paulinev already registered for this task

No and no

@khaes-kth khaes-kth self-assigned this Mar 31, 2022
@khaes-kth
Copy link

Thanks @landeholt for this proposal

it is relevant and interesting.

By "if not final: check if it is before first task", do you mean check if the selected deadline is before the first task or if the PR creation date is before that?

@khaes-kth
Copy link

Student paulinev already registered for this task

No and no

Don't worry about this message. We're fixing it.

@landeholt
Copy link
Author

Thanks @landeholt for this proposal

it is relevant and interesting.

By "if not final: check if it is before first task", do you mean check if the selected deadline is before the first task or if the PR creation date is before that?

I will have to check whether a PR is a proposal or a final one.

The reason for why is that it cannot be asked to have a repo already at the proposal stage. I was thinking that I could still invalidate proposals after the deadline.

@khaes-kth
Copy link

I see. My question is what do you check if you identify the PR as a proposal? Do you check the deadline suggested in the readme or do you check the creation date of the PR?

@landeholt
Copy link
Author

I see. My question is what do you check if you identify the PR as a proposal? Do you check the deadline suggested in the readme or do you check the creation date of the PR?

Ah, now I follow. I am not sure for the time being. I am investigating the template, and would like to propose a change to explicitly state whether it is a final submission or a proposal. This would also make it much easier to automate the labeling.

When regarded to course-automation, you have these following possible scenarios:

  1. the PR was created before deadline but doesn't have a repository link in it.
    This could indicate that it is a proposal and should therefore be accepted and could further be labeled as proposal
  2. the PR was created before deadline and has a repository link in it
    This could indicate that it is a final submission and should therefore be accepted and could futher be labeled as final submission
  3. the PR was created after deadline
    This should not be accepted

@khaes-kth
Copy link

I think this is an acceptable proposal. My understanding is that when a PR is created, your GHAction does the following:
1- Checks if it is a course automation by reading the text under "Category".
2- Checks if it is a proposal or final submission by reading the title, description, and readme and looking for a repo link.
3- If it is a proposal, it checks a) the selected deadline (in the readme) is task one and the PR is created before the deadline.
4- If it is a final submission, it checks that the PR is created before the selected deadline.
5- If 3 and 4 conditions are not met, the build fails.

@khaes-kth
Copy link

Student paulinev already registered for this task

No and no

Don't worry about this message. We're fixing it.

To fix this, can you please pull the latest version from upstream (KTH/devops-course 2022 branch)?

@landeholt
Copy link
Author

I think this is an acceptable proposal. My understanding is that when a PR is created, your GHAction does the following: 1- Checks if it is a course automation by reading the text under "Category". 2- Checks if it is a proposal or final submission by reading the title, description, and readme and looking for a repo link. 3- If it is a proposal, it checks a) the selected deadline (in the readme) is task one and the PR is created before the deadline. 4- If it is a final submission, it checks that the PR is created before the selected deadline. 5- If 3 and 4 conditions are not met, the build fails.

I am right now evaluating what would be best practice. Should I read the PR body, or the readme from contributions/course-automation/*/*.md?

Will GHAction trigger on PR body updates?

I know that it does it on commits, hence might be better to read from file instead.

Regarding if it is a proposal or final, I've setup a switch case:

repo_urls = get_repo_urls(body)
if len(repo_urls) == 0 and is_final:
    raise MissingRepoError("No repository url found in provided pull request. Please provide one, or clearly state in your pull request that it is only a proposal.")

elif len(repo_urls) == 0 and not stage:
    # when stage (proposal or submission) is not explictly defined
    raise UnclearPullRequest("Cannot evaluate whether PR is final submission or proposal. Please state it explicitly in your PR")
elif len(repo_urls) == 1 and not is_final and stage:
    # explicitly stated that it is a proposal but has a repo-link (edge case for when someone already has a repo before being accepted)
    return
elif len(repo_urls) == 1 and not stage:
    # when repo-link exists, but not explicitly stated that it is a final submission
    is_final = True
    payload["__result__"]["stage"] = "final_submission"
    
elif len(repo_urls) > 1:
    raise AmbiguousRepoError("More than one repo was provided in the pull request")

Regarding checking deadline, I will be using the created_at attribute for the pull_request payload.

@khaes-kth
Copy link

Should I read the PR body, or the readme from contributions/course-automation/*/*.md?

I think it makes sense to focus on the README file.

@khaes-kth khaes-kth merged commit 2323c1c into KTH:2022 Mar 31, 2022
Eyskha added a commit to Eyskha/devops-course that referenced this pull request Apr 6, 2022
* Executable tutorial: How to automate E2E-testing in React & Jest, using Github actions. (KTH#1589)

* Project proposal for Executable tutorial

* fix: renamed itle

* doc: Add readme for the task (KTH#1591)

* Added README.md for Project Proposal (KTH#1588)

* Added README.md for Project Proposal (KTH#1590)

Co-authored-by: Johanna Loev <[email protected]>

* Presentation Proposal: Optimization Strategies for Test Suite Runtimes in Large Software Applications (KTH#1573)

* Project proposal

* Project proposal

* Move readme to correct location

* Rename proposal dir

* Rename proposal dir

* Rename proposal dir

* Small format change

* Small format change

* Small format change

* Small format change

Co-authored-by: Luke LeVasseur <[email protected]>

* Presentation Proposal: gatien-myechui (KTH#1597)

* Executable Tutotial: Adding bugs to code to evaluate tests Using Stryker Mutator in JS (KTH#1575)

* feat: test

* feat: first proporsal

* feat: first proporsal

* demo proposal: Automated embedded testing of FreeRTOS using Jenkins and AWS (KTH#1578)

* assignment proposal: demonstration for week1: testing & continuous integration

* Rename markdown file

* not ignoring cases anymore

* fix titles

* Delete Readme.md

* put proposal inside week folder

* fix schema

* Update README.md

* Update README.md

* Open source proposal: enhancement of embedded Rust libraries (testing) (KTH#1587)

* open source proposal: embedded rust libraries

* changed email email

* added missing assignment

* Demo proposal - Real-Time testing of a video game (KTH#1581)

* Add README for demo

* moved the readme

* fixed readme

* Demo: Testing frameworks for JavaScript in frontend and backend (KTH#1594)

* added our demo proposal

* modified demo proposal

* Weekly schedules

We'll update the schedule for presentations and demos here

* Update sessions on bots and dependencies

* update the script based on the new folder structure

* action: update the target branch name (KTH#1609)

* added README describing our presentation proposal (KTH#1593)

* added README describing our presentation proposal

* updated readme to fit the expected format

* Update week 2 agenda

* Update demo + presentation weeks

* First proposal for course automation (KTH#1579)

* Add proposal for course automation task (KTH#1586)

* Add proposal for course automation task

* Rework proposal

* Slight modification

* Update README.md

Co-authored-by: Khashayar Etemadi <[email protected]>

* Essay proposal: CI comparison (KTH#1598)

* docs: add README for proposal (KTH#1603)

* executable-tutorial: proposal GH Action optimization (KTH#1572)

* executable-tutorial: proposal GH Action optimization

* fix: formatting of README.md

* Update readme.md

* Update readme.md

* Presentation proposal - Facebook blackout (KTH#1592)

* added our presentation proposal

* added presentation

* Rename contributions/presentation/README.md to contributions/presentation/week2-testing-and-CI/svanhol-libl/README.md

Co-authored-by: vladomitrovic <[email protected]>

* Update readme.md

* Presentation proposal - Code Coverage (KTH#1582)

* Added a presentation proposal for code coverage.

* Correct folder

* Changed readme to comply with necessary formatting.

* Reformulated our proposal to be more specific.

Co-authored-by: vladomitrovic <[email protected]>

* Update week 2 agenda

* Update readme.md

* Update README.md

* Presentation : robot framework and end user test (KTH#1611)

* Delete README.md

* Update readme.md

* Delete README.md

* Added demo proposal (KTH#1614)

Co-authored-by: Preston Chao <[email protected]>

* Create README.md (KTH#1612)

* Create Proposal for presentation: deployment of code with Buddy (KTH#1604)

* Create Proposal for presentation: deployment of code with Buddy

* Rename contributions/presentation/week3-CD-and-feature-flag/lhagm-shotaro/Proposal for presentation: deployment of code with Buddy to contributions/presentation/week3-CD-and-feature-flag/lhagm-shotaro: README.md

* Update lhagm-shotaro: README.md

* DEMO Proposal: Eiffel Protocol demonstration of usage (KTH#1610)

* Update README.md

* moved proposal to correct space

* added slides used in the presentation and a link to them (if needed) in the README. (KTH#1621)

* Presentation Proposal Update: Add link to slides (KTH#1613)

* link to slides

* format

* ugh format

Co-authored-by: Luke LeVasseur <[email protected]>

* Final submission: Presentation (gatien-myechui) (KTH#1620)

* unregistere user removed from foldername

* unregistered user removed from the readme

* Update and rename readme.md to README.md

* Update README.md

* Demo proposal : Continuous Delivery of a Tauri app (KTH#1628)

* Added task 1 proposal

* Fixed typo

* Updated folder name

* Added demo proposal

* Fixed email address

* Fixed typos

* Course automation proposal - Automatic labeling of PRs (KTH#1608)

* add proposal for course automation task

* add new proposal

* align demo length with presentation length (KTH#1618)

* course-automation: Automatic verification for mandatory parts of course-automation final (KTH#1629)

* docs: 📝 task: course-automation complete

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Adds proposal for course automation task. (KTH#1606)

Adds proposal for a course automation task that would automatically fetch calendar events for the course to display in a file of choice.

* Add slides week 1 presentation slides (KTH#1640)

* Presentation proposal : Robot framework


Assignment Proposal
Robot framework and user test 


Names and KTH ID

    Pauline Vaillant ([email protected])
    Asim Jarrar ([email protected])

Deadline

Task 1
Category
Presentation


Description
Presentation of robot framework

* Change readme place

* Delete paulinev-asmi

* Create readme

* Correction file name

* Delete typo directory

* Correct typo 2

* Delete paulinev-asim

* Create readme.md

* Remove wrong typo directory

* Update readme.md

* Add presentation slide

* Add presentation slides

* Delete useless directory

* Demo proposal: Demonstration of continuous deployment using Bitbucket Pipes (KTH#1641)

* Create proposal template

* Update readme.md

* Added task proposal

* Fixed kth name

* fix readme

* Finished Executable Tutorial - Build automation with Maven and Selenium to maintain test automation  (KTH#1632)

* Added README.md for Project Proposal

* Added grading information for the executable tutorial

* cleaning

* executed tutorial: Github Action CI pipeline using CodeQL for static code scanning (DevSecOps Application) (KTH#1616)

* Adding Assignment proposal

* Update README.md

Adding links to our GitHub handles

* Update README.md

Edit description

* Update README.md

Removing Github handles as it crashes the script

* Updating folder name

* Add repository links of "Testing frameworks for JavaScript in frontend and backend" demo to respective readme (KTH#1625)

* ADD tutorial proposal for Randoop (KTH#1648)

* added readme for demo proposal (KTH#1642)

* Presentation Proposal: An overview of continuous deployment in the Microsoft Azure environment (KTH#1644)

* Create README.md

* Update README.md

* Update README.md

* Added readme for presentation proposal (KTH#1637)

* presentation: Serverless in a hybrid architecture (KTH#1615)

* Adding initial proposal

* Fixing folder name

* Added readme for tutorial (KTH#1627)

* executable tutorial (KTH#1643)

* demo proposal for argocd (KTH#1649)

* Course Automation: Enforcing course submission rules (KTH#1650)

* civjan-palagi course automation proposal

* Update README.md

Co-authored-by: Khashayar Etemadi <[email protected]>

* demo proposal: CD using React Native and Google Cloud (KTH#1635)

Co-authored-by: Filip Bäck <[email protected]>

* Course Automation Proposal: Make Pull Request shell script (KTH#1645)

* add proposal for mpr shell script

* update readme

* update

Co-authored-by: Luke LeVasseur <[email protected]>

* Essay proposal - Continuous deployment - How does feature toggle fit in? (KTH#1630)

* Demo proposal: CD of a Node.js web service on Heroku with a Github Actions pipeline (KTH#1636)

* Create demo proposal readme

* Update README.md

* Update README.md

* Update README.md

Co-authored-by: Khashayar Etemadi <[email protected]>

* Presentation proposal: Canary Deployment - Why you and your friends might have different versions of the same app (KTH#1623)

* Added README for presentation for week three

* Blank line for PR update

Now that the asim not registered problem is fixed

* Added presentation in Category

Co-authored-by: tobiasgg <[email protected]>

* Add files via upload (KTH#1653)

* Proposal Executable Tutorial: Test automation using Cucumber with Gradle (KTH#1658)

* WIP: program of week 3 (KTH#1647)

* Update readme.md

* Update readme.md

* Update week 4 presentation/demo schedule (KTH#1672)

Co-authored-by: Khashayar Etemadi <[email protected]>

* Create README.md (KTH#1651)

* Update readme.md (KTH#1676)

* Update readme.md

* Delete README.md

* Update readme.md

* Update required number of words for essays check

* Essay: Gitlab CI vs Github Actions (KTH#1688)

* Presentation Proposal: Handling multiple services in a monorepo using Docker (KTH#1677)

Co-authored-by: Luciano <[email protected]>

* Update readme.md

* Course Automation: Implementation of MPR shell script (KTH#1654)

* initial script

* MPR functionality working

* Clean up

* Update alias in help

* Clean Up

* Small change for demo

* Small change for demo

* Auto-fill description body with readme contents

* Update description logic

* Update description logic

* Tweaks

* Only use GH Username if user not populated

* Tweak

* Add link to readme for submission

* Remove script from submission

Co-authored-by: Luke LeVasseur <[email protected]>

* Proposal: Contribution to open-source (KTH#1721)

* Add completed demo branch (KTH#1719)

* Create demo proposal readme

* Update README.md

* Update README.md

* Update README.md

* Add demo repo link

* Remove unnecessary section

Co-authored-by: Khashayar Etemadi <[email protected]>

* Tutorial proposal: Massively cutting server costs for model training with spot instances on Azure (KTH#1718)

* Add proposal for course automation task

* Rework proposal

* Slight modification

* Update README.md

* Add essay proposal

* Add Khalid to proposal

* Delete README.md

Co-authored-by: Khashayar Etemadi <[email protected]>
Co-authored-by: César Soto Valero <[email protected]>

* Submission : Demonstration of Continuous Deployment of a Tauri app (KTH#1717)

* Updated readme for submission

* Fixed some typos

* Fixed README

* Final Submission for Task 1 (KTH#1715)

* demo proposal for argocd

* Submission for Task 1

* Update README.md

* update submission git link

* Update README.md

* Update README.md

* Final submission - Github Action CI pipeline using CodeQL for static code scanning (DevSecOps Application) (KTH#1714)

* Adding Assignment proposal

* Update README.md

Adding links to our GitHub handles

* Update README.md

Edit description

* Update README.md

Removing Github handles as it crashes the script

* Updating folder name

* Adding assignment description

* Final Submission: Docker swarm executable tutorial (KTH#1709)

* docs: add README for proposal

* Final submission: exec tutorial

* Final Submission for Task 1 - CI/CD pipeline for K8s Cluster in Digital Ocean for Microservices application. (KTH#1701)

* added readme for demo proposal

* Submission for Task 1

Co-authored-by: César Soto Valero <[email protected]>

* Final Submission: Fuzzing Executable Tutorial (KTH#1705)

* Proposal for OSS-Fuzz executable tutorial

* final submission README

* working on final submission

* marked easter-egg

Co-authored-by: Palagi, Brad <[email protected]>

* Finished E2E testing with React executable tutorial (KTH#1699)

* Final Submission: Deployment of Ccde Using Buddy (KTH#1697)

* Adds Assignment Proposal (KTH#1689)

Co-authored-by: Pontus Cowling Mantefors <[email protected]>

* Added demo repo & key takeaway (KTH#1702)

* Create proposal template

* Update readme.md

* Added task proposal

* Fixed kth name

* fix readme

* Add bitbucket repo link

* Submission: Essay: DevOps and Security - How to fit them together? (KTH#1706)

* Create README.md

* Create DevSecOps.pdf

* Updated to pass word count

* Less word count

* Update DevOps_and_Security - How_to_fit_them_together.pdf

* Created final submission for civjan-palagi course automation (KTH#1704)

* Mockito Presentation (KTH#1595)

* Update README.md

* Update README.md

* Rename contributions/presentation/README.md to contributions/presentation/week2-testing-and-CI/ddnadjar/README.md

* Update README.md

Co-authored-by: Khashayar Etemadi <[email protected]>
Co-authored-by: vladomitrovic <[email protected]>

* Final Submission: Executable Tutorial (KTH#1692)

* executable-tutorial: proposal GH Action optimization

* fix: formatting of README.md

* [ Final Submission ] executable tutorial

* fix: assignment and README seperation

* fix: added links

* fix: put links in proposal README

* fix: removed header to pass action

Co-authored-by: lucianozapata <[email protected]>
Co-authored-by: isabelredtzer <[email protected]>
Co-authored-by: joloev <[email protected]>
Co-authored-by: Johanna Loev <[email protected]>
Co-authored-by: Luke LeVasseur <[email protected]>
Co-authored-by: Luke LeVasseur <[email protected]>
Co-authored-by: EDChui <[email protected]>
Co-authored-by: Diego Chahuan <[email protected]>
Co-authored-by: Fabian Segatz <[email protected]>
Co-authored-by: vladomitrovic <[email protected]>
Co-authored-by: Aïssata Maiga <[email protected]>
Co-authored-by: lnsandnkth <[email protected]>
Co-authored-by: elibon99 <[email protected]>
Co-authored-by: Benoit Baudry <[email protected]>
Co-authored-by: gluckzhang <[email protected]>
Co-authored-by: Per Arn <[email protected]>
Co-authored-by: Deepika Tiwari <[email protected]>
Co-authored-by: Philip Hamelink <[email protected]>
Co-authored-by: Neproxx <[email protected]>
Co-authored-by: Khashayar Etemadi <[email protected]>
Co-authored-by: Niko <[email protected]>
Co-authored-by: Joakim Olsson <[email protected]>
Co-authored-by: Arvid Gotthard <[email protected]>
Co-authored-by: Fredrik Svanholm <[email protected]>
Co-authored-by: vladomitrovic <[email protected]>
Co-authored-by: Max Persson <[email protected]>
Co-authored-by: paulinev-kth <[email protected]>
Co-authored-by: Martin Monperrus <[email protected]>
Co-authored-by: pdchao23 <[email protected]>
Co-authored-by: Preston Chao <[email protected]>
Co-authored-by: Zehao Jiang <[email protected]>
Co-authored-by: Linnea55 <[email protected]>
Co-authored-by: LukasGutenberg <[email protected]>
Co-authored-by: corentinguilloteau <[email protected]>
Co-authored-by: Daniel Gustafsson <[email protected]>
Co-authored-by: John Landeholt <[email protected]>
Co-authored-by: Johan Edman <[email protected]>
Co-authored-by: Abyel Tesfay <[email protected]>
Co-authored-by: Bassam Gamal <[email protected]>
Co-authored-by: nalenz <[email protected]>
Co-authored-by: Mustafa Ali <[email protected]>
Co-authored-by: Abdullah <[email protected]>
Co-authored-by: Noah Rahimzadagan <[email protected]>
Co-authored-by: sandy-e <[email protected]>
Co-authored-by: FilipSannervik <[email protected]>
Co-authored-by: Ayushman Khazanchi <[email protected]>
Co-authored-by: Ben Civjan <[email protected]>
Co-authored-by: Filip Bäck <[email protected]>
Co-authored-by: Filip Bäck <[email protected]>
Co-authored-by: persman96 <[email protected]>
Co-authored-by: Nick Smyrnioudis <[email protected]>
Co-authored-by: Samuel Söderberg <[email protected]>
Co-authored-by: tobiasgg <[email protected]>
Co-authored-by: gogo432754 <[email protected]>
Co-authored-by: shotaroi <[email protected]>
Co-authored-by: Javier Ron Arteaga <[email protected]>
Co-authored-by: simonebonato <[email protected]>
Co-authored-by: Bror Sebastian Sjövald <[email protected]>
Co-authored-by: Luciano <[email protected]>
Co-authored-by: César Soto Valero <[email protected]>
Co-authored-by: Brad Palagi <[email protected]>
Co-authored-by: Palagi, Brad <[email protected]>
Co-authored-by: Pontus Mantefors <[email protected]>
Co-authored-by: Pontus Cowling Mantefors <[email protected]>
Co-authored-by: mindany2 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants