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

TRUNK-4730 Verify that all relevant domain objects have changed_by and date_changed fields #1880

Closed
wants to merge 1 commit into from

Conversation

manuela-grindei
Copy link
Contributor

@manuela-grindei manuela-grindei commented Dec 1, 2016

Description

Added new attributes to classes, added new mappings to Hibernate files, added corresponding Liquibase patches

Related Issue

see https://issues.openmrs.org/browse/TRUNK-4730

Checklist:

  • My pull request only contains one single commit.
  • My pull request is based on the latest master branch
    git pull --rebase upstream master.
  • I ran mvn clean package right before creating this pull request and
    added all formatting changes to my commit.
  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@mention-bot
Copy link

@manuela-grindei, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bmamlin, @WolfSchlegel and @ivange94 to be potential reviewers.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 55.747% when pulling 5cd7729 on manuela-grindei:master into 4dc0e2c on openmrs:master.

@dkayiwa
Copy link
Member

dkayiwa commented Dec 3, 2016

@manuela-grindei thanks again for working on this! 👍
Could you fix the integration test failure that happen with these changes?
To see the failures, just run: mvn clean install -Pintegration-test

<changeSet id="TRUNK-4730-20161114-1000" author="grindei" dbms="mysql">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="concept_class" columnName="date_changed"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the fix version is 2.1, can you move these changesets to liquibase-update-to-2.1.xml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

@manuela-grindei
Copy link
Contributor Author

Fixed integration test failures.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 55.825% when pulling 78a6ad6 on manuela-grindei:master into 76aa48d on openmrs:master.

@dkayiwa
Copy link
Member

dkayiwa commented Dec 4, 2016

@manuela-grindei can you squash these commits into one as advised at https://wiki.openmrs.org/display/docs/Pull+Request+Tips

@manuela-grindei
Copy link
Contributor Author

Squashed commits

@@ -83,7 +83,6 @@ public void addAttribute(A attribute) {
if (getAttributes() == null) {
setAttributes(new LinkedHashSet<A>());
}
// TODO validate
Copy link
Member

@dkayiwa dkayiwa Dec 4, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these three TODO removals also part of this ticket?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to squash everything, including a merge of upstream master, which gave those TODO removals.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There used to be 3 commits, one of which was a master upstream merge

subscription.maxElementsInMemory=500
subscription.eternal=false
subscription.timeToIdleSeconds=300
subscription.timeToLiveSeconds=300
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file also part of this ticket?

* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
* the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this part of this ticket?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this comes from the upstream merge

@dkayiwa
Copy link
Member

dkayiwa commented Dec 4, 2016

@manuela-grindei i see so many changes that have nothing to do with this ticket. Can you fix that?

@manuela-grindei
Copy link
Contributor Author

I'm afraid I don't know how...

@dkayiwa
Copy link
Member

dkayiwa commented Dec 4, 2016

@manuela-grindei
Copy link
Contributor Author

Absolutely, I read it

@dkayiwa
Copy link
Member

dkayiwa commented Dec 4, 2016

As a last resort, if you do not find it easy to separate your changes from other commits that have already been merged, you may just create a new branch and put back your changes one by one before making a new pull request.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 55.825% when pulling 338f1f2 on manuela-grindei:master into 76aa48d on openmrs:master.

@manuela-grindei
Copy link
Contributor Author

This looks very strange, I think I will need to delete the repo again and recreate everything using patches... However, we need to merge quickly next time, so that we do not need to squash anything again. Please let me know if you are fine with the actual changes, as we need the final version in the next PR to be able to quickly merge it into master. We could choose a time of very low activity in the repo, maybe during Christmas, to prevent upstream master changes from happening.

@dkayiwa
Copy link
Member

dkayiwa commented Dec 4, 2016

@manuela-grindei there will always be a possibility of commits before your pull request is merged. Even if a pull request is open and reviewed in 30 minutes, there will always be a chance of commits that happen within for instance 15 minutes before the merging. This is the nature of distributed development. :)
You could choose a time of low activity when the activity is too low to even have anyone to review and merge your changes. :)
So the ultimate solution is frequently pulling upstream changes into your local ones and getting to master how to squash commits.
In the ideal world, we would merge pull requests immediately, but this is not always possible because of lots of other pull requests we need to test and review, amidst other activities.
Even after a review which may look like the final version, trying to test out your changes by running the web application may prove otherwise. :)

@manuela-grindei
Copy link
Contributor Author

You're totally right in what you say.
I don't know why squashing commits doesn't work properly on my machine, I'll need to investigate and fix it, otherwise I'll be unable to contribute to openmrs.

@manuela-grindei
Copy link
Contributor Author

In the meantime, I can provide a patch with the changes to you or someone else who can squash without issues, so we can still finish the story and merge the code in the repo.

@dkayiwa
Copy link
Member

dkayiwa commented Dec 4, 2016

@manuela-grindei if you fail to get it right, you can post on talk, detailing the exact steps or commands you executed and the results. Then you will get answers from other contributors who have been there before. For i have seem many of them successfully squash their commits. So be sure that you will get help from others' experiences! :)

@dkayiwa
Copy link
Member

dkayiwa commented Dec 4, 2016

@manuela-grindei my advice is that you do not miss out on the chance to learn this. As long as you plan to have a software development career, there are things you will have no option but patiently learn, regardless of the project you will chose to work on! :)
So this is not just about merging your contributions, but also giving you back an opportunity to learn from others! I never knew any of the things am sharing with you now, until when i decided to get my feet wet in an open source community like this. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants